public override void OnUpdate() { if (Input.GetKeyUp(Key)) { State = !State; } if (State && !prevState) { OnEnable?.Invoke(); OnToggle?.Invoke(); } else if (!State && prevState) { OnDisable?.Invoke(); OnToggle?.Invoke(); } if (State) { Funky?.Invoke(); } prevState = State; }
public void Disable() { entityInformationView.SetActive(false); EntityDeselected(); entityInformationView.SetCurrentEntity(null); OnDisable?.Invoke(); }
private void Disable() { Containers[group.SelectedButton.ID].Active = false; Containers[group.SelectedButton.ID].DeFocus(); group.UnlockSelected(); OnDisable?.Invoke(); }
public void SetInActive() { setInactiveDelegate(this); if (active) { OnDisable?.Invoke(this); } active = false; }
// Start is called before the first frame update void Start() { DisableButton.onClick.AddListener(() => { GetComponent <Prototype>().ReturnToPool(); OnDisable?.Invoke(); OnDisable = null; }); }
void Start() { DisableButton.onClick.AddListener(() => { gameObject.SetActive(false); OnDisable?.Invoke(); OnDisable = null; }); //gameObject.SetActive(false); }
private void OnBecameInvisible() { if (transform != null) { if (transform.position.y < Camera.main.ScreenToWorldPoint(Vector3.zero).y) { OnDisable?.Invoke(); gameObject.SetActive(false); } } }
public void Switch() { if (select == ESelect.DISABLE) { select = ESelect.ENABLE; OnEnable?.Invoke(entity); } else { select = ESelect.DISABLE; OnDisable?.Invoke(entity); } }
private void Update() { if (isActive) { gameObject.transform.Translate(0, 0, -0.1f); if (gameObject.transform.position.z < -5) { SetIsActive(false); OnDisable?.Invoke(); } } }
private ApplicationLauncherButton BuildButton() { return(ApplicationLauncher.Instance.AddModApplication( onTrue: () => OnEnable?.Invoke(), onFalse: () => OnDisable?.Invoke(), onHover: null, onHoverOut: null, onEnable: null, onDisable: null, visibleInScenes: ApplicationLauncher.AppScenes.ALWAYS, /* MAPVIEW does not work in 1.2.2 */ texture: m_texture )); }
void Update() { if (isActive) { gameObject.transform.Translate(0, 0, -0.05f); if (gameObject.transform.position.z < -5) { isActive = false; OnDisable?.Invoke(); } } }
public void Disable() { IsEnabled = false; OnDisable.Invoke(); }
public void Disable() { OnDisable?.Invoke(); }
public void Disable() { _isActiveInput = false; OnDisable?.Invoke(); }
/// <summary> /// Call this to disable the cube /// </summary> public void Disable() { OnDisable?.Invoke(this); gameObject.SetActive(false); }