private void removeSceneRef() { if (!SceneRefs.IsSet <IScreenContainerStateHandler>()) { SceneRefs.Remove((IScreenContainerStateHandler)this); } }
public void OnDestroy() { if (dispatcher != null) { dispatcher.DispatchEvent(new InputEvents.MoveEvent(Vector2.zero)); } if (SceneRefs.IsSet <VirtualJoystick>() && SceneRefs.Get <VirtualJoystick>() == this) { SceneRefs.Remove(this); } }
private void OnDestroy() { this.ObjectAdded = null; this.ObjectRemoved = null; SceneRefs.Remove(this); awakeEvents.RemoveAllListeners(); for (int i = 0; i < sceneModifiers.Length; i++) { sceneModifiers[i].Destroy(); } }
private void Awake() { if (SceneRefs.IsSet <VirtualJoystick>()) { SceneRefs.Remove(SceneRefs.Get <VirtualJoystick>()); } SceneRefs.Set(this); joystick = GetComponent <RectTransform>(); joystickBase = base.transform.GetChild(0).GetComponent <RectTransform>(); joystickPad = base.transform.GetChild(0).GetChild(0).GetComponent <RectTransform>(); dispatcher = Service.Get <EventDispatcher>(); }
private void setSceneRef() { if (SceneRefs.IsSet <IScreenContainerStateHandler>()) { IScreenContainerStateHandler screenContainerStateHandler = SceneRefs.Get <IScreenContainerStateHandler>(); if (!object.ReferenceEquals(screenContainerStateHandler, this)) { SceneRefs.Remove(screenContainerStateHandler); SceneRefs.Set((IScreenContainerStateHandler)this); } } else { SceneRefs.Set((IScreenContainerStateHandler)this); } }
private void OnDestroy() { SceneRefs.Remove(prefabCacheTracker); }
private void OnDestroy() { SceneRefs.Remove(this); }