void OnBecameInvisible() { for (int i = 0; i < OnInvisibleEvents.Count; ++i) { HDRSystem.PostEvent(gameObject, OnInvisibleEvents[i]); } }
void OnDestroy() { for (int i = 0; i < OnDestroyEvents.Count; ++i) { HDRSystem.PostEvent(gameObject, OnDestroyEvents[i]); } }
void Start() { for (int i = 0; i < OnStartEvents.Count; ++i) { HDRSystem.PostEvent(gameObject, OnStartEvents[i]); } }
void OnDisable() { for (int i = 0; i < OnDisableEvents.Count; ++i) { HDRSystem.PostEvent(gameObject, OnDisableEvents[i]); } }
// Update is called once per frame void Update() { if (Input.GetKeyDown(KeyCode.E)) { if (canSignal) { canSignal = false; HDRSystem.PostEvent(gameObject, SignalEvent); StartCoroutine(SignalReset()); } var signalStation = SignalMaster.Master.GetLastActivated(); if (Vector3.Distance(signalStation.transform.position, transform.position) < _activationRadius && !waiting) { waiting = true; StartCoroutine(ActivateNext()); } } }