Пример #1
0
        private void EnemyController_OnBoatActivityCompleted(BoatController boatController)
        {
            var boatType = boatController.GetType();

            //We just care about the normal and advance enemy controller, because the firing enemy controller's TURN will be controlled by the effect manager
            if (boatType == typeof(NormalEnemyController) || boatType == typeof(AdvanceEnemyController))
            {
                currentChangeTurn++;

                if (currentChangeTurn == transform.childCount)
                {
                    currentChangeTurn = 0;
                    OnAllEnemyActivityCompleted();
                }
            }
            else if (boatType == typeof(FiringEnemyController))
            {
                if (boatController.GetComponent <FiringEnemyController>().CanFire)
                {
                    currentChangeTurn = 0; //this will be controled by the effect manager
                }
                else
                {
                    currentChangeTurn++;
                    if (currentChangeTurn == transform.childCount)
                    {
                        currentChangeTurn = 0;
                        OnAllEnemyActivityCompleted();
                    }
                }
            }
        }
Пример #2
0
 private void PlayerController_OnBoatActivityCompleted(BoatController player)
 {
     if (player.GetType() == typeof(PlayerController))
     {
         if (!effectPlaying)
         {
             //Debug.Log("Chane state in player not effect, old state:"  + TurnBasedSystemManager.Instance.BattleState);
             OnAllBehaviourCompleted(TurnBasedSystemManager.Instance.BattleState);
             //stateChangedCount++;
         }
     }
 }