Fixed post swing values, requires HttpSiraStatus update
This commit is contained in:
parent
4af5f462ed
commit
babfa22ff8
@ -24,7 +24,7 @@ export default class Overlay extends Component {
|
|||||||
showPlayerStats: true,
|
showPlayerStats: true,
|
||||||
showScore: false,
|
showScore: false,
|
||||||
showSongInfo: false,
|
showSongInfo: false,
|
||||||
textColor: undefined,
|
textColor: undefined,
|
||||||
|
|
||||||
socket: undefined,
|
socket: undefined,
|
||||||
isVisible: false,
|
isVisible: false,
|
||||||
@ -248,6 +248,8 @@ export default class Overlay extends Component {
|
|||||||
"noteFullyCut": (data) => {
|
"noteFullyCut": (data) => {
|
||||||
const { noteCut } = data;
|
const { noteCut } = data;
|
||||||
|
|
||||||
|
console.log(noteCut)
|
||||||
|
|
||||||
// Left Saber
|
// Left Saber
|
||||||
if (noteCut.saberType === 'SaberA') {
|
if (noteCut.saberType === 'SaberA') {
|
||||||
const data = this.state.leftHand;
|
const data = this.state.leftHand;
|
||||||
@ -260,8 +262,8 @@ export default class Overlay extends Component {
|
|||||||
if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) {
|
if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) {
|
||||||
data.averagePostSwing = [];
|
data.averagePostSwing = [];
|
||||||
}
|
}
|
||||||
data.averagePreSwing.push(noteCut.initialScore > 70 ? 70 : noteCut.initialScore);
|
data.averagePreSwing.push(noteCut.beforeSwingRating * 70);
|
||||||
data.averagePostSwing.push(noteCut.finalScore - noteCut.initialScore);
|
data.averagePostSwing.push(noteCut.afterSwingRating * 30);
|
||||||
data.averageCut.push(noteCut.cutDistanceScore);
|
data.averageCut.push(noteCut.cutDistanceScore);
|
||||||
this.setState({ leftHand: data });
|
this.setState({ leftHand: data });
|
||||||
}
|
}
|
||||||
@ -278,8 +280,8 @@ export default class Overlay extends Component {
|
|||||||
if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) {
|
if (data.averagePostSwing.includes(30) && data.averagePostSwing.length === 1) {
|
||||||
data.averagePostSwing = [];
|
data.averagePostSwing = [];
|
||||||
}
|
}
|
||||||
data.averagePreSwing.push(noteCut.initialScore > 70 ? 70 : noteCut.initialScore);
|
data.averagePreSwing.push(noteCut.beforeSwingRating * 70);
|
||||||
data.averagePostSwing.push(noteCut.finalScore - noteCut.initialScore);
|
data.averagePostSwing.push(noteCut.afterSwingRating * 30);
|
||||||
data.averageCut.push(noteCut.cutDistanceScore);
|
data.averageCut.push(noteCut.cutDistanceScore);
|
||||||
this.setState({ rightHand: data });
|
this.setState({ rightHand: data });
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user