Esempio n. 1
0
    public override void OnLoadSystem()
    {
        if (baseSeed == 0)
        {
            baseSeed = DateTime.Now.GetHashCode();

            seed = new System.Random(baseSeed);
        }

        onDayTick.AddListener(OnNewDay);
    }
Esempio n. 2
0
 private void Start()
 {
     weatherEvent.AddListener(OnWeatherChanged);
     timeEvent.AddListener(OnDayPassed);
 }
Esempio n. 3
0
 private void OnEnable()
 {
     weatherEvent.AddListener(OnWeatherChanged);
     timeEvent.AddListener(OnDayPassed);
 }
Esempio n. 4
0
    /// <summary>
    /// Removes a day from the counter, and invokes the event if possible
    /// Reason for the returning is for saving.
    /// </summary>
    /// <returns> Has the event attached to the Day Counter been invoked? </returns>

    private void Start()
    {
        eventObject?.AddListener(OnDayTick);
    }