private void disableAndLockForActionSequence(GameObject overrideObject = null) { bool flag = true; if (overrideObject != null) { ButtonDisablerOverride component = overrideObject.GetComponent <ButtonDisablerOverride>(); if (component != null && component.buttonsToOverride.Length > 0) { TrayInputButtonDisabler componentInParent = GetComponentInParent <TrayInputButtonDisabler>(); string[] buttonsToOverride = component.buttonsToOverride; foreach (string a in buttonsToOverride) { if (a == componentInParent.UIElementID) { flag = false; break; } } } } if (flag && !inputButton.IsLocked) { inputButton.Lock(TrayInputButton.ButtonState.Disabled); isLockedByActionSequence = true; } }
private void getButtonDisabler() { buttonDisabler = GetComponentInParent <TrayInputButtonDisabler>(); if (buttonDisabler == null) { UnityEngine.Object.Destroy(this); } }
private void Start() { animator = getPenguinAnimator(); buttonDisabler = getButtonDisabler(); checkInitialButtonState(); Service.Get <EventDispatcher>().AddListener <UIDisablerEvents.DisableUIElement>(onUiElementDisabled); Service.Get <EventDispatcher>().AddListener <UIDisablerEvents.EnableUIElement>(onUiElementEnabled); }
private void Start() { TrayInputButtonDisabler buttonDisabler = getButtonDisabler(); if (buttonDisabler != null) { buttonDisabler.DisableElement(hide: false); } }
private void OnDestroy() { TrayInputButtonDisabler buttonDisabler = getButtonDisabler(); if (buttonDisabler != null) { buttonDisabler.EnableElement(); } }