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; }
private void Disable() { Containers[group.SelectedButton.ID].Active = false; Containers[group.SelectedButton.ID].DeFocus(); group.UnlockSelected(); OnDisable?.Invoke(); }
public void Disable() { entityInformationView.SetActive(false); EntityDeselected(); entityInformationView.SetCurrentEntity(null); OnDisable?.Invoke(); }
// Start is called before the first frame update void Start() { DisableButton.onClick.AddListener(() => { GetComponent <Prototype>().ReturnToPool(); OnDisable?.Invoke(); OnDisable = null; }); }
public void SetInActive() { setInactiveDelegate(this); if (active) { OnDisable?.Invoke(this); } active = false; }
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); } } }
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 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(); } } }
public Perk(string name, string description, int inheritIDs, float x, float y, PerkCategory category, float size, int levelRequirement, OnApply applyMethods, OnDisable disableMethods) { Name = name; Description = description; InheritIDs = new int[] { inheritIDs }; PosOffsetX = x; PosOffsetY = y; Category = category; Size = size; Endless = false; LevelRequirement = levelRequirement; ApplyMethods = applyMethods; DisableMethods = disableMethods; ID = AllPerks.Count; Applied = false; AllPerks.Add(this); }
public void Disable() { IsEnabled = false; OnDisable.Invoke(); }
/// <summary> /// Call this to disable the cube /// </summary> public void Disable() { OnDisable?.Invoke(this); gameObject.SetActive(false); }
public void OpenCheatTriggerForm(OnDisable onDisable) { Singleton <CUIManager> .GetInstance().OpenForm(s_cheatTriggerFormPath, false, false); this.m_onDisable = onDisable; }
public void Disable() { _isActiveInput = false; OnDisable?.Invoke(); }
public void Disable() { OnDisable?.Invoke(); }