public void SpawnAIShips(int number) { for (int i = 0; i < number; i++) { string connectionidAI = Guid.NewGuid().ToString(); ShipAI shipAI = new ShipAI(RespawnManager.GetRandomStartPosition(), GameHandler.BulletManager, this); UserAI userAI = new UserAI(connectionidAI, shipAI) { Controller = false }; UserHandler.AddUser(userAI); GameHandler.AddShipToGame(shipAI); } }
public void SpawnAIShips(int number) { for (int i = 0; i < number; i++) { string connectionidAI = Guid.NewGuid().ToString(); ShipAI shipAI = new ShipAI(RespawnManager.GetRandomStartPosition(), GameHandler.BulletManager); UserAI userAI = new UserAI(connectionidAI, shipAI) { Controller = false }; UserHandler.AddUser(userAI); GameHandler.AddShipToGame(shipAI); } }