Beispiel #1
0
    //Now, i call functions to draw everyting
    private void DrawMap()
    {
        drawMap.Init(World.Map);
        drawMap.Draw();

        IEnumerator <Village> iterator = World.GetVillages();

        while (iterator.MoveNext())
        {
            Village    currentVillage       = iterator.Current;
            GameObject villageManagerObject =
                Instantiate(PrefabLoader.GetVillage(), Vector3.zero, Quaternion.identity) as GameObject;
            villageManagerObject.name = currentVillage.Name;
            VillageManager villageManager = villageManagerObject.GetComponent <VillageManager>();
            villageManager.Init(currentVillage);
            villageManagers.Add(villageManager);
        }
    }