public void Set(bool value, bool instant = false, NothingDelegate callback2 = null) { if (value == IsActive) return; if (value == true && DeactivateWhenFadeDeactive) { gameObject.SetActive(true); } IsActive = value; if (TransitionTimer.Procentage > 0.05f) TransitionTimer.Reset(); else TransitionTimer.Finish(); if (instant) { TransitionTimer.Finish(); UpdateColor(Value); } callback = callback2; if (group) group.blocksRaycasts = IsActive; }
public void Reset() { BG2 = GetComponent<UnityEngine.UI.RawImage>(); lastValue = -1f; callback = null; bool wanted2 = IsActive; bool wanted = StartAs; IsActive = !wanted; Set(wanted, true); IsActive = !wanted2; Set(wanted2, InstantStart); }
public void Show(bool instant = false, NothingDelegate callback2 = null) { Set(true, instant, callback2); }
public void Hide(bool instant = false, NothingDelegate callback2 = null) { Set(false, instant, callback2); }