private void OnButtonClicked(TicTacToeButton ticTacToeButton) { if (_currentTween != null) { _currentTween.Pause(); } if (_selectedButton != null) { _selectedButton.SymbolImage.sprite = null; var col = _selectedButton.SymbolImage.color; col.a = 0f; _selectedButton.SymbolImage.color = col; _selectedButton.GetComponent <Button>().interactable = true; } _selectedButton = ticTacToeButton; _selectedButton.SymbolImage.sprite = CrossImage; _selectedButton.GetComponent <Button>().interactable = false; var symbolImageColor = _selectedButton.SymbolImage.color; symbolImageColor.a = 0f; _selectedButton.SymbolImage.color = symbolImageColor; _currentTween = _selectedButton.SymbolImage.DOFade(1f, .5f).SetLoops(-1, LoopType.Yoyo); }
private void Start() { MyMaterial = GetComponent <MeshRenderer>().material; CachedColorTween = MyMaterial.DOColor(HoverColor, FadeTime); CachedColorTween.SetAutoKill(false); CachedColorTween.Pause(); }
protected void SetTween(TweenerCore <Vector3, Path, PathOptions> tween) { if (direction == AnimationDirection.From) { tween.From(); } tween.SetEase(ease); tween.SetRelative(isRelative); tween.Pause(); tweener = tween; }
public override void OnPauseObstacle() { if (!isPlayingTween) { return; } if (pathTweener != null) { if (pathTweener.IsPlaying()) { pathTweener.Pause(); } } base.OnPauseObstacle(); }
public void play(Unit unit, string pathName, bool autoPaly, bool inverse) { start(unit); Vector3[] path = iTweenPath.GetPath(pathName); if (inverse) { System.Array.Reverse(path); } Vector3 d = path[0] - vTarget; for (int i = 0; i < path.Length; ++i) { path[i] = path[i] - d; } mPathTween = unit.transform.DOPath(path, mSpeed, PathType.CatmullRom, PathMode.Full3D); if (!autoPaly) { mPathTween.Pause(); } mPathTween.SetSpeedBased(true); mPathTween.timeScale = unit.scale; mPathTween.SetLookAt(0).SetEase(Ease.Linear).OnWaypointChange(onWaypointChange).OnComplete(delegate { mPathTween = null; }); }
private void StartAnimateRoom(Color endValue) { coloringTween.Pause(); coloringTween = DOTween.To(GetCurrentColor, ColorAllTiles, endValue, 2f); coloringTween.Play(); }
protected override void stop(Unit unit, bool arrived) { unit.move.moveState = State.None; mPathTween.Pause(); }