Skip to content

Commit

Permalink
fix stand animation for player 2 (#9)
Browse files Browse the repository at this point in the history
  • Loading branch information
neolao authored Apr 2, 2020
1 parent fe82098 commit 2b464c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "mugen-quick-versus-launcher",
"author": "neolao",
"license": "MIT",
"version": "0.29.0",
"version": "0.29.1",
"description": "Mugen launcher for Quick Versus",
"keywords": [
"mugen",
Expand Down
2 changes: 1 addition & 1 deletion src/input/useGamepad.hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export default function useGamepads() {
}
if (!currentButtonStates[gamepadIndex] || !currentButtonStates[gamepadIndex][buttonIndex]) {
const code = String.fromCharCode(65 + gamepadIndex) + buttonIndex;
console.log("Gamepad", code);
// console.log("Gamepad", code);
emitter.dispatchEvent(new Event(code));
emitter.dispatchEvent(new CustomEvent("button", { detail: code }));
}
Expand Down
5 changes: 5 additions & 0 deletions src/side/right/standAnimation.view.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,5 +43,10 @@ export default function StandAnimation({ character, colorIndex }) {
xScale *= options.scaleFactor;
yScale *= options.scaleFactor;

if (character.standOptions && character.standOptions.scale > 0) {
xScale *= character.standOptions.scale;
yScale *= character.standOptions.scale;
}

return <Image src={standAnimation} x={x} y={y} xScale={xScale} yScale={yScale} key={JSON.stringify(character)}/>;
}

0 comments on commit 2b464c3

Please sign in to comment.