This commit is contained in:
ntr 2019-09-09 22:29:59 +10:00
parent 0f8164c774
commit 2c9cba31f3
41 changed files with 48 additions and 43 deletions

View File

@ -90,7 +90,7 @@ class Absorb extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -78,7 +78,7 @@ class Amplify extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -59,7 +59,7 @@ class Attack extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -100,7 +100,7 @@ class Bash extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -103,7 +103,7 @@ class Bash extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -88,7 +88,7 @@ class Blast extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -53,7 +53,7 @@ class Block extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -107,7 +107,7 @@ class Break extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -81,7 +81,7 @@ class Buff extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -120,7 +120,7 @@ class Chaos extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -85,7 +85,7 @@ class Counter extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -78,7 +78,7 @@ class Curse extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -83,7 +83,7 @@ class Debuff extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -68,7 +68,7 @@ class Decay extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -109,7 +109,7 @@ class Electrify extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -101,7 +101,7 @@ class Electrocute extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -83,7 +83,7 @@ class Haste extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -81,7 +81,7 @@ class Heal extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -88,7 +88,7 @@ class Hex extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -153,7 +153,7 @@ class Hybrid extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -96,7 +96,7 @@ class Intercept extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -91,7 +91,7 @@ class Link extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -81,7 +81,7 @@ class Purge extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -115,7 +115,7 @@ class Purify extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -95,7 +95,7 @@ class Recharge extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -76,7 +76,7 @@ class Block extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -82,7 +82,7 @@ class Intercept extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -77,7 +77,7 @@ class Refl extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -102,7 +102,7 @@ class Restrict extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -100,7 +100,7 @@ class Ruin extends Component {
this.animations[i].reset(); this.animations[i].reset();
} }
try { try {
this.props.animCb(); this.props.animCb && this.props.animCb();
} catch (e) { } catch (e) {
console.log(e); console.log(e);
} }

View File

@ -97,7 +97,7 @@ class Silence extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -69,7 +69,7 @@ class Siphon extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -116,7 +116,7 @@ class SiphonTick extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -152,7 +152,7 @@ class Slay extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -140,7 +140,7 @@ class Sleep extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -120,7 +120,7 @@ class Strike extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -78,7 +78,7 @@ class Stun extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -127,7 +127,7 @@ class Sustain extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -80,7 +80,7 @@ class Triage extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -79,7 +79,7 @@ class TriageTick extends Component {
for (let i = this.animations.length - 1; i >= 0; i--) { for (let i = this.animations.length - 1; i >= 0; i--) {
this.animations[i].reset(); this.animations[i].reset();
} }
this.props.animCb(); this.props.animCb && this.props.animCb();
} }
} }

View File

@ -173,18 +173,23 @@ function Demo(args) {
setTimeout(() => { setTimeout(() => {
setAnimTarget({ setAnimTarget({
skill: sample(itemInfo.items.filter(i => i.skill)).item, skill: sample(itemInfo.items.filter(i => i.skill)).item,
constructId: [sample(demo[1].constructs).id], constructId: [this.state.side ? demo[1].constructs[0].id : demo[1].constructs[1].id],
player: Math.round(Math.random()), player: Math.round(Math.random()),
direction: 0, direction: 0,
}); });
this.setState({ side: !this.state.side });
// setTimeout(setAnimTarget(null), 5000); // setTimeout(setAnimTarget(null), 5000);
}, 2000); }, 6000);
const gameDemo = () => { const gameDemo = () => {
return ( return (
<div class="game-demo"> <div class="game-demo">
<div>
<h2>GAME PHASE</h2> <h2>GAME PHASE</h2>
<p>Outplay noobs wahtever write tomorrow, fix the tiemout shit.</p>
</div>
<div class="game"> <div class="game">
<div class="game-construct"> <div class="game-construct">
<ConstructAvatar construct={demo[1].constructs[0]} /> <ConstructAvatar construct={demo[1].constructs[0]} />