示例#1
0
 private void InitializeDebug(Tribe tribe)
 {
     sitesPresent.Add(new Site("Home of DeGnats"));
     tribesPresent.Add(tribe);
     tribe.Initialize();
     Debug.LogWarning("DEBUG MODE ENABLED");
     areaSize          = new Vector3(256, 10, 256);
     allThings         = new List <Thing>();
     thingContainer    = new GameObject("ThingContainer");
     creatureContainer = new GameObject("CreatureContainer");
     if (disabledContainer == null)
     {
         disabledContainer = new GameObject("DisabledContainer");
     }
     for (int i = 0; i < 0; i++)
     {
         Vector3 position = new Vector3(Random.Range(10f, 200), Random.Range(3f, 15f), Random.Range(10f, 200));
         addThingToWorld("fruit", position, false);
     }
     for (int i = 0; i < 200; i++)
     {
         Vector3 position = new Vector3(Random.Range(10f, 200), Random.Range(3f, 15f), Random.Range(10f, 200));
         addCreatureToWorldDEBUG(BASE_SPECIES.Gnat.ToString(), position, false, tribe);
     }
     CreatureUtilities.OptimizeUpdateTimes(allThings);
     FruitTree[] trees = GameObject.FindObjectsOfType <FruitTree>();
     for (int count = 0; count < trees.Length; count++)
     {
         AddThingToAllThingsSync(trees[count]);
         trees[count].initialize("FruitTree");
     }
     Debug.LogWarning("Updates balanced");
 }
示例#2
0
        public void LoadArea(HexCell cell)
        {
            masterTerrain.Initialize(this, cell);
            hexGrid.gameObject.SetActive(false);
            Tribe tribe = tribes[cell];

            if (tribe != null)
            {
                CurrentArea = cell.MakeArea(this, tribe);
                tribe.Initialize();
            }
            else
            {
                Debug.LogError("Civ is null during area load");
            }
            MenuController.ChangeMenu(RootMenu.CreatureBrowser);
        }