Esempio n. 1
0
    void OnGUI()
    {
        GUILayout.BeginArea(
            new Rect((Screen.width - width) / 2.0f, 0, width, height),
            GUI.skin.box
            );

        GUI.Label(
            new Rect(5, 3, 100, 25),
            String.Format("Villagers: {0} / {1}", villagerCount, SpawnVillagers.TotalVillagerCapacity()),
            CurrentCountSkin()
            );

        GUI.Label(new Rect(width - 150, 3, 150, 25), String.Format("Currently {0}", HutBuilding.CurrentStateDescriptor()));

        GUI.Label(
            new Rect(5, 28, 100, 25),
            String.Format("Orcs: {0} / {1}", Ork.AllOrks().Count(), Fort.TotalOrkCapacity())
            );

        GUI.Label(
            new Rect(width - 150, 28, 150, 25),
            String.Format("Time until next fort: {0}s", SpawnForts.TimeUntilNextSpawn())
            );

        GUI.Label(
            new Rect((width / 2f) - 35, 50, 80, 25),
            String.Format("Time: {0}", ProgressTracker.FormattedPlaytime())
            );

        GUILayout.EndArea();
    }
Esempio n. 2
0
 // Use this for initialization
 void Start()
 {
     theInstance        = this;
     timeSinceLastSpawn = Random.value;
     spawnRate          = initialFortSpawnRate;
     spawner            = new RandomSpawner(this.transform, minRange, maxRange);
     SpawnInitialFort();
 }