private static void _ApplyTweenGradient(UILabel targetLabel, AllochroicPreset style) { Tools_LabelStyle._ResetLabel(targetLabel); TweenGradient tweenGradient = Tools_LabelStyle._GetTweenScript(targetLabel); tweenGradient.SetStyle(style); tweenGradient.ActivateTweenCoroutines(); targetLabel.effectStyle = style.effectType; targetLabel.effectColor = style.effectColor; targetLabel.effectDistance = Vector2.one * 2f; }
private void OnEnable() { if (TweenGradient.IsColorArrayIllegal(this.gradientTopColArr)) { return; } if (TweenGradient.IsColorArrayIllegal(this.gradientBottomColArr)) { return; } this.theLabel = base.gameObject.GetComponent <UILabel>(); this.theUiCamera = UICamera.currentCamera; this.ResetFields(); base.StartCoroutine(this.UpdateVisibleState()); this.ActivateTweenCoroutines(); }
private void CheckObjectVisible() { Plane[] planes = GeometryUtility.CalculateFrustumPlanes(this.theUiCamera); bool flag = GeometryUtility.TestPlanesAABB(planes, TweenGradient.GetWidgetBoundsInWorldPosition(this.theLabel)); if (this.visibleFlag == flag) { return; } this.visibleFlag = flag; if (this.visibleFlag) { this.cMgr.ResumeAllCoroutine(); } else { this.cMgr.PauseAllCoroutine(); } }