Пример #1
0
 private void SpawnEnemy()
 {
     if (this.enemy == null)
     {
         int chance = Random.Range(0, 150);
         if (chance >= 30 && chance <= (30 + SpawnChance))
         {
             ExploringEnemy newEnemy = level.GetRandomEnemy(this.transform.position);
             if (newEnemy != null)
             {
                 this.enemy   = Instantiate(newEnemy, this.transform.position, new Quaternion(0, 0, 0, 0));
                 enemy.myTile = this;
             }
         }
     }
 }
Пример #2
0
 public bool CanWalkHereEnemy(ExploringEnemy requestingEnemy)
 {
     if (NotWalkable)
     {
         return(false);
     }
     if (enemy != null)
     {
         return(false);
     }
     if (hasPlayer)
     {
         CombatTriggered(requestingEnemy);
     }
     return(true);
 }
Пример #3
0
 private void MayNotMove(ExploringEnemy enemy)
 {
     canMove = false;
 }
Пример #4
0
 public void combatTriggered(ExploringEnemy enemy)
 {
     cameraController.SwitchCamera();
     Destroy(enemy.gameObject);
     CombatTriggered(true);
 }