private void AfterReload() { _afterReload = null; if (FightUtils.StopAttacking(this)) { StopAttack(); return; } Arrow.gameObject.SetActive(false); AnimationUtils.PlayAnimation( "Attack", Avatar , playImediatly: true , accessory: Cape, accessoryName: "Body" , accessory2: Bow, accessory2Name: "Bow" ); var animTime = AnimationUtils.GetAnimationLength(Avatar, "Attack_Body", basedOnSpeed: true); var arrowExpirationTime = animTime / 6; Timer._.InternalWait(FireProjectile, arrowExpirationTime); // _fireProjectile = Game.WaitForSeconds(arrowExpirationTime, FireProjectile); // StartCoroutine(_fireProjectile); Timer._.InternalWait(AfterAttack, animTime); // _afterAttack = Game.WaitForSeconds(animTime, AfterAttack); // StartCoroutine(_afterAttack); }
private void AfterReload() { _afterReload = null; if (FightUtils.StopAttacking(this)) { StopAttack(); return; } AnimationUtils.PlayAnimation("Attack", Avatar , attackPhase: AttackPhase, singleVariation: false , playImediatly: true , accessory: Weapon, accessoryName: "Axe" , accessory2: Shield, accessory2Name: "Shield"); AxeHitArea.gameObject.SetActive(true); AxeHitArea.Reset(); var animTime = AnimationUtils.GetAnimationLength(Avatar, "Attack_Body_" + AttackPhase.Value, basedOnSpeed: true); Timer._.InternalWait(AfterAttack, animTime); // _afterAttack = Game.WaitForSeconds(animTime, AfterAttack); // StartCoroutine(_afterAttack); }
private void AfterAttack() { _afterAttack = null; if (FightUtils.StopAttacking(this)) { StopAttack(); return; } InternalAttack(); }
private void AfterReload() { _afterReload = null; if (FightUtils.StopAttacking(this)) { StopAttack(); return; } AnimationUtils.PlayAnimation( "Attack", Avatar ); FireProjectile(); var animTime = Avatar["Attack_Body"].length; Timer._.InternalWait(AfterAttack, animTime); // _afterAttack = Game.WaitForSeconds(animTime, AfterAttack); // StartCoroutine(_afterAttack); }
private void AfterAttack() { _afterAttack = null; AxeHitArea.gameObject.SetActive(false); if (FightUtils.StopAttacking(this)) { StopAttack(); return; } if (AttackPhase.Value == 3) { AttackPhase = 1; } else { AttackPhase++; } InternalAttack(); }