Ejemplo n.º 1
0
        private void Start()
        {
            players = new Player[]
            {
                new Human("Player 1", Color.red),
                new Human("Player 2", Color.blue)
            };

            neutral = new Player("Neutral", Color.white);

            PlayerData[] allPlayers = new PlayerData[players.Length + 1];
            for (int i = 0; i < players.Length; i++)
            {
                allPlayers[i] = players[i].GetData();
            }
            allPlayers[players.Length] = neutral.GetData();

            foreach (Player player in players)
            {
                player.Initialize(allPlayers);
            }
            neutral.Initialize(allPlayers);

            CommunicationController.Initialize(World.Width, World.Height, Unit.unitTypes);

            World.GenerateWorld(players);

            foreach (Player player in players)
            {
                if (revealMap)
                {
                    player.RevealMap();
                }
            }

            ActivePlayer.StartTurn();
        }