// Initialization of variables and data structures in AIPlayer void InitAI() { currentMana = 0; // initialize mana variables according to PublicLevel this.manaAmount = PublicLevel.GetManaAmount(); this.manaRegenTime = PublicLevel.GetManaRegenTime(); this.creatureSpawnTime = PublicLevel.GetCreatureSpawnTime(); hostileCreatureList = new GameObject[PublicLevel.hostileTypeCreatureNum]; PublicLevel.GetHostileCreatureList(hostileCreatureList); // deciding how much creatures will be spawned, and its composition SetCreatureArray(); minimumCost = GetMinimumCost(); SetCreatureRatio(); SetCreatureFlag(); }