Beispiel #1
0
 protected WorldEvent(int day, WorldEventImportance importance, WorldEventType type, string text)
 {
     this.day        = day;
     this.type       = type;
     this.importance = importance;
     this.text       = text;
 }
Beispiel #2
0
 public static void TriggerEvent(WorldEventType type, Vector3 vector3)
 {
     if (m_worldEvents.ContainsKey(type))
     {
         m_worldEvents[type].Raise(vector3);
     }
 }
Beispiel #3
0
    public void DisplayEventPanel(WorldEventType eventType, string description)
    {
        eventTitle.text       = eventType.ToString();
        eventDescription.text = description;

        if (!eventPanel.activeSelf)
        {
            eventPanel.SetActive(true);
        }
    }
Beispiel #4
0
    public bool isPastEvent; // < ------- flag to allow Manager to set a new current event and store this one for an event log

    // The Manager for world events will take care of telling the Cities manager to affect a city (e.g. Decrease Population, Decrease a stat, etc)
    // for the duration of this world event (in months). (i.e. Decrease Population takes x # of citizen's lives every month for (duration) months.)
    // The length of a month (in seconds) is set in the Manager and could be set by the player at the start of the game (clamped to something like 60f to 300f);
    // There can ONLY be one world event of the same type happening per month.

    public WorldEvent(WorldEventType _type, int _duration)
    {
        eventType = _type;
        duration  = _duration;
    }