Example #1
0
 public override void UpdateEventHandler()
 {
     if (target.activeSelf != lastActive)
     {
         lastActive = target.activeSelf;
         SetActiveEvent newEvent = new SetActiveEvent();
         newEvent.activate = target.activeSelf;
         TimeController.instance.AddEvent(newEvent, this);
     }
 }
Example #2
0
    public override void ApplyEvent(TimeEvent timeEvent, bool reverse)
    {
        SetActiveEvent newEvent = (SetActiveEvent)timeEvent;

        if (reverse)
        {
            target.SetActive(!newEvent.activate);
        }
        else
        {
            target.SetActive(newEvent.activate);
        }
        lastActive = target.activeSelf;
    }