Esempio n. 1
0
    public static void RaiseAnEvent(RandomEventScriptable raise = null)
    {
        EventRaise randomEvent = new EventRaise
        {
            InCaseSpecificEvent = raise
        };

        if (raise != null)
        {
            randomEvent.SpecificEventRaise = true;
        }
        GameEventSystem.DoEvent(
            Event_Type.TRIGGER_EVENT,
            randomEvent
            );
    }
Esempio n. 2
0
    public GameEvent(RandomEventScriptable eventScriptable, bool isThisTimed = false, int timer = 0)
    {
        scriptable     = eventScriptable;
        fire_locations = eventScriptable.fire_locations;
        prerequisites  = eventScriptable.Prerequisites;

        //Timed event
        isTimed   = isThisTimed;
        fireTime  = timer;
        firedOnce = eventScriptable.fireOnce;
        fireWeeks = eventScriptable.weeksFromStartForFire;
        if (isTimed)
        {
            LocationHandler.OnTurnEnd += CheckForFiring;
        }
        //Timed event
        ResetButton.onReset += unInit;
    }