Skip to content

Instantly share code, notes, and snippets.

@flushpot1125
Created June 26, 2022 10:21
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
private _swordSlashAnimNoExeFlag : boolean;
public onUpdate(): void {
if(this._swordSlashAnimNoExeFlag == false){//剣を振るアニメーションが発動されていたらif文を通過する
if(this._animSwordAndShieldSlash.animatables[0].animationStarted == true){//アニメーションが実行されていないと、animationStartedが存在しないと表示され処理が止まる
if (this._animSwordAndShieldSlash.animatables[0].masterFrame < 0.8 && this._animSwordAndShieldSlash.animatables[0].masterFrame > 0.7){
this._impluseShot();//衝撃波を発生させる関数
this._swordSlashAnimFlag = true;//もう一度呼ばれないようにtrueに変更
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment