public virtual void ZeroOut() { canvas.interactable = false; canvas.blocksRaycasts = false; canvas.alpha = 0.0f; if (currentTween != null) { currentTween.Stop(); } }
void Update() { if (mainGameScript.gameState == GameState.Fishing) { if (!hasResetOnFishing) { currentTween?.Stop(); ResetValues(); hasResetOnFishing = true; } } else if (mainGameScript.gameState == GameState.Returning) { hasResetOnFishing = false; } else if (mainGameScript.gameState == GameState.Selling) { hasResetOnFishing = false; } else if (mainGameScript.gameState == GameState.Menu) { hasResetOnFishing = false; } if (gameScript.state == EnemyState.Hungry) { currentTween?.Stop(); ResetValues(); Move(transform.position, point2); } else if (gameScript.state == EnemyState.Attacking) { if (currentTarget == point2 && currentTween.Status == Tween.TweenStatus.Finished) { Move(transform.position, point1); currentTarget = point1; } else if (currentTarget == point1 && currentTween.Status == Tween.TweenStatus.Finished) { Move(transform.position, point2); currentTarget = point2; } } else if (gameScript.state == EnemyState.Defeated) { currentTween?.Stop(); Move(transform.position, point1); } }
private void ColorReset() { //stop running tweens: if (_colorTweenImage != null) { _colorTweenImage.Stop(); } if (_colorTweenMaterial != null) { _colorTweenMaterial.Stop(); } if (!applyColor) { return; } //reset material color: if (colorRendererTarget != null && colorRendererTarget.material.HasProperty("_Color")) { colorRendererTarget.material.color = _normalColorRenderer; } //reset image color: if (colorImageTarget != null) { colorImageTarget.color = _normalColorImage; } }
private void ScaleReset() { if (_scaleTween != null) { _scaleTween.Stop(); } scaleTarget.localScale = normalScale; }
void StopRoomHighlight(Room _room) { switch (_room) { case Room.MEETING: meetingTween?.Stop(); meetingAlpha = 0; //meetingTween = Tween.Value(meetingAlpha, 0f, UpdateMeetingAlpha, 0.5f, 0f, Tween.EaseInOut); break; case Room.PRESENTATION: presentationTween?.Stop(); presentationAlpha = 0; //presentationTween = Tween.Value(presentationAlpha, 0f, UpdatePresentationAlpha, 0.5f, 0f, Tween.EaseInOut); break; case Room.RELAX: idleTween?.Stop(); idleAlpha = 0; //idleTween = Tween.Value(idleAlpha, 0f, UpdateIdleAlpha, 0.5f, 0f, Tween.EaseInOut); break; case Room.TASK_1: task1Tween?.Stop(); task1Alpha = 0; //task1Tween = Tween.Value(task1Alpha, 0f, UpdateTask1Alpha, 0.5f, 0f, Tween.EaseInOut); break; case Room.TASK_2: task2Tween?.Stop(); task2Alpha = 0; //task2Tween = Tween.Value(task2Alpha, 0f, UpdateTask2Alpha, 0.5f, 0f, Tween.EaseInOut); break; case Room.TASK_3: task3Tween?.Stop(); task3Alpha = 0; //task3Tween = Tween.Value(task3Alpha, 0f, UpdateTask3Alpha, 0.5f, 0f, Tween.EaseInOut); break; } }
private void ColorReset() { if (_colorTween != null) { _colorTween.Stop(); } if (colorRendererTarget != null) { colorRendererTarget.material.color = normalColor; } if (colorImageTarget != null) { colorImageTarget.color = normalColor; } }
public void ShowTip(TipsInfo info) { CancelInvoke(); tipTxt.text = info.tipStr; closeTween.Stop(); closeTween.ForceTo(0); closeTween.gameObject.SetActive(true); mask.SetActive(info.openMask); if (info.autoClose) { if (info.duration > 0) { Invoke("CloseTip", info.duration); } else { CloseTip(); } } }
private void ColorReset() { if (_colorTween != null) { if (colorRendererTarget != null && colorRendererTarget.material.HasProperty("_Color")) { _colorTween.Stop(); } } if (colorRendererTarget != null && colorRendererTarget != null) { if (colorRendererTarget.material.HasProperty("_Color")) { colorRendererTarget.material.color = normalColor; } } if (colorImageTarget != null) { colorImageTarget.color = normalColor; } }