// Update is called once per frame void Update() { // 行動開始するまでの待機処理 StandBy(); isLeft = moveX.GetIsLeft(); // 攻撃中なら攻撃間隔時間を減らして0以下になれば // 次の攻撃が出来る if (isAttack) { AttackStandByTime(); } // 行動開始しているなら if (isStartAct) { // 行動後時間中待機処理 if (isActed) { AttackStandByTime(); } else { Act(); // 行動後時間中でなければ行動 } } // ダメージ時間処理 bool IsDamage = boatDamage.Damage(); // 一斉攻撃待機中か確認 bool AllOutAttackStandBy = boatManager.AllOutAttackStandBy(); if (AllOutAttackStandBy) { return; // 一斉攻撃待機中は普通の攻撃はしないので抜ける } // ダメージ中の処理 // ダメージ時間中でなければ攻撃する if (!IsDamage) { isAttack = spearManager.Fire( false, isAttack, isLeft, this.gameObject.transform, boatSpear.gameObject.transform.position.x, boatSpear.gameObject.transform.position.y, boatSpear, boatType ); } // 削除された銛をListから削除 spearManager.DeleteSpears(); }