void GenerateMonster() { while (monsterCount > 0) { Transform RandomTile = map.GetRandomOpenTile(); AI_Scripts newMonster = Instantiate(Monster, RandomTile.position + Vector3.forward * -1, Quaternion.identity) as AI_Scripts; newMonster.transform.parent = gameObject.transform; monsterCount--; } }
void BattleStarts() { FindThis = GameObject.FindGameObjectWithTag("InBattle"); Enemy = FindThis.GetComponent(typeof(AI_Scripts)) as AI_Scripts; Enemy.OnDeath += onEnemyDeath; BattleStart = true; PlayerTurn = true; Player.SetMyTurn(true); }