public override void UpdateEventHandler() { if (target.activeSelf != lastActive) { lastActive = target.activeSelf; SetActiveEvent newEvent = new SetActiveEvent(); newEvent.activate = target.activeSelf; TimeController.instance.AddEvent(newEvent, this); } }
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; }