Esempio n. 1
0
 public void EnemyEntered()
 {
     if (mState != State.INACTIVE || mState != State.DEATH || mState != State.WON)
     {
         enemyEntered++;
         mTurretAgent.AddReward(-1.0f);
         GameObject    manager = GameObject.Find("Manager");
         TurretManager tm      = manager.GetComponent <TurretManager>();
         if (enemyEntered >= tm.EnemyEnterToLose)
         {
             tm.ClearAllUnits();
             tm.gameEndState = "You Lost";
             state           = State.DEATH;
         }
     }
 }