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; } } } }
public bool CanWalkHereEnemy(ExploringEnemy requestingEnemy) { if (NotWalkable) { return(false); } if (enemy != null) { return(false); } if (hasPlayer) { CombatTriggered(requestingEnemy); } return(true); }
private void MayNotMove(ExploringEnemy enemy) { canMove = false; }
public void combatTriggered(ExploringEnemy enemy) { cameraController.SwitchCamera(); Destroy(enemy.gameObject); CombatTriggered(true); }