Example #1
0
 void Start()
 {
     AddTimer((a) => {
         gameTime.NextHalfHour();
     }, 0.5f);
     DebugPanel.AddDebug(() => { return(GetCurrentTime().ToString()); }, "Time");
 }
Example #2
0
    void Start()
    {
        resources.Add(ResType.FOOD, 4);
        resources.Add(ResType.WATER, 4);
        resources.Add(ResType.STONE, 60);

        DebugPanel.AddDebug(() => {
            return(foodAlarms);
        }, "Food Alarms");
        DebugPanel.AddDebug(() => {
            return(waterAlarms);
        }, "Water Alarms");

        Clock.AddTimer((id) => {
            if (FoodLow())
            {
                foodAlarms++;
                Clock.AddOneTimeTimer((nid) => { foodAlarms--; }, alarmTimeHours);
            }
        }, 1);

        Clock.AddTimer((id) => {
            if (WaterLow())
            {
                waterAlarms++;
                Clock.AddOneTimeTimer((nid) => { waterAlarms--; }, alarmTimeHours);
            }
        }, 1);
    }
Example #3
0
    void Start()
    {
        var rnd = new System.Random(DateTime.Now.Millisecond);

        names = names.OrderBy(x => rnd.Next()).ToArray();

        newCitizensTimerId = Clock.AddTimer(TimerEnded, newCitizenTimerIngameHours);

        DebugPanel.AddDebug(() => { return(newCitizensNum.ToString()); }, "Max Arrivals");
        DebugPanel.AddDebug(() => { return(ActualArrivals().ToString()); }, "Actual Arrivals");

        SpawnNew();
        //Clock.AddOneTimeTimer((s) => { SpawnNew(8); }, 4);
        //Clock.AddOneTimeTimer((s) => { SpawnNew(8); }, 8);
    }
Example #4
0
 void Start()
 {
     DebugPanel.AddDebug(() => { return(GetVacantPlacesNum().ToString()); }, "Vacant rooms");
 }