Esempio n. 1
0
 private void Play()
 {
     Time.timeScale = 1.0f;
     IsPause        = false;
     fondoPausa.SetActive(false);
     DOTween.PlayAll();
 }
Esempio n. 2
0
 public void CreatePartAgain()
 {
     statsGroup.DOFade(0f, 1f);
     statsGroup.blocksRaycasts = false;
     partCreationGroup.DOFade(1f, 1f);
     DOTween.PlayAll();
 }
Esempio n. 3
0
 public void Resume()
 {
     isPaused = false;
     DOTween.PlayAll();
     GameManager.Instance.state = game.game;
     UpdateDisplay();
     UpdateManagerState();
 }
Esempio n. 4
0
 void Start()
 {
     DoColor();
     DoComplete();
     DoText();
     DoPath();
     DoSlider();
     DOTween.PlayAll();
 }
        public override void OnEnter()
        {
            int numberOfTweensPlayed = DOTween.PlayAll();

            if (debugThis.Value)
            {
                State.Debug("DOTween Control Methods Play All - Played " + numberOfTweensPlayed + " tweens");
            }
            Finish();
        }
Esempio n. 6
0
 void OnUnpauseGame(bool isFire)
 {
     m_isGamePaused     = false;
     MBehavior.isPaused = false;
     DOTween.PlayAll();
     if (isFire)
     {
         M_Event.FireLogicEvent(LogicEvents.UnpauseGame, new LogicArg(this));
     }
 }
        public override void OnEnter()
        {
            int numberOfTweensPlayed = DOTween.PlayAll();

            if (debugThis.Value)
            {
                Debug.Log("GameObject [" + State.Fsm.GameObjectName + "] FSM [" + State.Fsm.Name + "]  State [" + State.Name + "] - DOTween Control Methods Play All - SUCCESS! - Played " + numberOfTweensPlayed + " tweens");
            }

            Finish();
        }
 private void Instance_SimulationPaused(object sender, PipelineManager.SimulationEventArgs e)
 {
     if (e.IsPaused)
     {
         DOTween.PauseAll();
     }
     else
     {
         DOTween.PlayAll();
     }
 }
Esempio n. 9
0
    internal void SetState(eStateGame state)
    {
        State = state;

        if (State == eStateGame.PAUSE)
        {
            DOTween.PauseAll();
        }
        else
        {
            DOTween.PlayAll();
        }
    }
Esempio n. 10
0
    private IEnumerator ShowIntroPowers()
    {
        DOTween.PauseAll();
        panelPowers.SetActive(true);
        float aux = Time.timeScale;

        Time.timeScale = 0;
        yield return(new WaitForSecondsRealtime(heroTime));

        panelPowers.SetActive(false);
        powerBlocked.SetActive(false);
        powerSlow.SetActive(false);
        Time.timeScale = aux;
        DOTween.PlayAll();
    }
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.R))
     {
         DOTween.KillAll();
         this.transform.position = initialPosition;
         this.transform.rotation = initialRotation;
         state  = muscleStates.landing;
         paused = false;
         startPanel.SetActive(true);
         startText.text = "GET READY!";
         countDown      = startDelay;
         if (frontParticle.isPlaying)
         {
             frontParticle.Stop();
         }
         if (!backParticle.isPlaying)
         {
             backParticle.Play();
         }
         if (leftParticle.isPlaying)
         {
             leftParticle.Stop();
         }
         if (rightParticle.isPlaying)
         {
             rightParticle.Stop();
         }
     }
     if (Input.GetKeyDown(KeyCode.Space))
     {
         if (!paused)
         {
             DOTween.PauseAll();
         }
         else
         {
             DOTween.PlayAll();
         }
         paused = !paused;
     }
     if (Input.GetKeyDown(KeyCode.S))
     {
         StartCoroutine(startCountDown());
         state = muscleStates.start;
     }
 }
Esempio n. 12
0
    private IEnumerator PartCreationSequence()
    {
        partPreview[_activePart].transform.DOLocalMoveX(-0.1f, 1.5f);
        partPreview[_activePart].transform.DOLocalMoveY(-0.15f, 1.5f);
        DOTween.PlayAll();

        yield return(new WaitForSecondsRealtime(2f));

        partPreview[_activePart].transform.DOLocalMoveX(0f, 1.5f);
        partPreview[_activePart].transform.DOLocalMoveY(0f, 1.5f);
        partPreview[_activePart].transform.DOLocalRotate(Vector3.up * 720f, 2f, RotateMode.FastBeyond360).OnComplete(() =>
        {
            statsGroup.DOFade(1f, 1f).Play();
            statsGroup.blocksRaycasts = true;
        });
        DOTween.PlayAll();
    }
Esempio n. 13
0
        void MoveTo(GameObject target)
        {
            if (_canMoveToTarget)
            {
                //Smoothly move to target and align to its rotation
                transform.DOMove(target.transform.position, 3.0f);
                transform.DORotate(new Vector3(0, target.transform.eulerAngles.y, 0), 3.0f);
                myCamera.transform.DOLocalMove(new Vector3(0, 0, 0), 3.0f);
                myCamera.transform.DOLocalRotate(target.transform.localRotation.eulerAngles, 3.0f);

                DOTween.PlayAll();

                currenEulerRotation = originalEulerRotation;

                _canMoveToTarget = false;
            }
        }
Esempio n. 14
0
 // Update is called once per frame
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Escape))
     {
         if (!isPaused)
         {
             DOTween.PauseAll();
         }
         if (isPaused)
         {
             DOTween.PlayAll();
         }
         isPaused = !isPaused;
         UpdateManagerState();
         UpdateDisplay();
     }
 }
Esempio n. 15
0
    void OnGUI()
    {
        DGUtils.BeginGUI();

        if (GUILayout.Button("Play"))
        {
            DOTween.PlayAll();
        }
        if (GUILayout.Button("Kill"))
        {
            DOTween.KillAll();
        }
        if (GUILayout.Button("Rewind"))
        {
            DOTween.RewindAll();
        }

        DGUtils.EndGUI();
    }
Esempio n. 16
0
    public void ToggleView()
    {
        if (_onPotionRoom)
        {
            techTreeCollection.DOAnchorPosX(0f, 1.5f);
            potionRoomCollection.DOAnchorPosX(2500f, 1.5f).OnComplete(() =>
            {
                partCreationGroup.alpha   = 1f;
                statsGroup.alpha          = 0f;
                statsGroup.blocksRaycasts = false;
            });
        }
        else
        {
            techTreeCollection.DOAnchorPosX(-2500f, 1.5f);
            potionRoomCollection.DOAnchorPosX(0f, 1.5f);
        }

        _onPotionRoom = !_onPotionRoom;
        DOTween.PlayAll();
    }
Esempio n. 17
0
    void OnGUI()
    {
        DGUtils.BeginGUI();

        GUILayout.Label("Is backwards: " + pathTweens[0].isBackwards);
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Play"))
        {
            DOTween.PlayAll();
        }
        if (GUILayout.Button("Flip"))
        {
            DOTween.FlipAll();
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Goto duration x 2"))
        {
            DOTween.GotoAll(duration * 2);
        }
        if (GUILayout.Button("Goto duration x 0.5"))
        {
            DOTween.GotoAll(duration * 0.5f);
        }
        if (GUILayout.Button("Goto WP 0"))
        {
            pathTweens[0].GotoWaypoint(0);
        }
        if (GUILayout.Button("Goto WP 2"))
        {
            pathTweens[0].GotoWaypoint(2);
        }
        if (GUILayout.Button("Goto WP 15"))
        {
            pathTweens[0].GotoWaypoint(15);
        }
        GUILayout.EndHorizontal();

        DGUtils.EndGUI();
    }
Esempio n. 18
0
 private static void OnApplicationResumed()
 {
     DOTween.PlayAll();
 }
Esempio n. 19
0
    void OnGUI()
    {
        DGUtils.BeginGUI();

        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Play All"))
        {
            Debug.Log("Played tweens: " + DOTween.PlayAll());
        }
        if (GUILayout.Button("Pause All"))
        {
            Debug.Log("Paused tweens: " + DOTween.PauseAll());
        }
        if (GUILayout.Button("Kill All"))
        {
            Debug.Log("Killed tweens: " + DOTween.KillAll());
        }
        if (GUILayout.Button("Complete+Kill All"))
        {
            Debug.Log("Killed tweens: " + DOTween.KillAll(true));
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Rewind All"))
        {
            Debug.Log("Rewinded tweens: " + DOTween.RewindAll());
        }
        if (GUILayout.Button("Restart All"))
        {
            Debug.Log("Restarted tweens: " + DOTween.RestartAll());
        }
        if (GUILayout.Button("Complete All"))
        {
            Debug.Log("Completed tweens: " + DOTween.CompleteAll());
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("PlayForward All"))
        {
            Debug.Log("PlayForwarded tweens: " + DOTween.PlayForwardAll());
        }
        if (GUILayout.Button("PlayBackwards All"))
        {
            Debug.Log("PlayBackwarded tweens: " + DOTween.PlayBackwardsAll());
        }
        if (GUILayout.Button("Flip All"))
        {
            Debug.Log("Flipped tweens: " + DOTween.FlipAll());
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Goto 1.5 All"))
        {
            Debug.Log("Goto-ed tweens: " + DOTween.GotoAll(1.5f));
        }
        if (GUILayout.Button("Goto 3 All"))
        {
            Debug.Log("Goto-ed tweens: " + DOTween.GotoAll(3));
        }
        if (GUILayout.Button("Goto 4.5 All"))
        {
            Debug.Log("Goto-ed tweens: " + DOTween.GotoAll(4.5f));
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Play by Id"))
        {
            Debug.Log("Played tweens: " + DOTween.Play(intId));
        }
        if (GUILayout.Button("Play by StringId"))
        {
            Debug.Log("Played tweens: " + DOTween.Play(stringId));
        }
        if (GUILayout.Button("Play by UnityObjectId"))
        {
            Debug.Log("Played tweens: " + DOTween.Play(this));
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Pause by Id"))
        {
            Debug.Log("Paused tweens: " + DOTween.Pause(intId));
        }
        if (GUILayout.Button("Pause by StringId"))
        {
            Debug.Log("Paused tweens: " + DOTween.Pause(stringId));
        }
        if (GUILayout.Button("Pause by UnityObjectId"))
        {
            Debug.Log("PlaPausedyed tweens: " + DOTween.Pause(this));
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        if (GUILayout.Button("Kill by Id"))
        {
            Debug.Log("Killed tweens: " + DOTween.Kill(intId));
        }
        if (GUILayout.Button("Complete+Kill by Id"))
        {
            Debug.Log("Killed tweens: " + DOTween.Kill(intId, true));
        }
        if (GUILayout.Button("Kill by StringId"))
        {
            Debug.Log("Killed tweens: " + DOTween.Kill(stringId));
        }
        if (GUILayout.Button("Kill by UnityObjectId"))
        {
            Debug.Log("Killed tweens: " + DOTween.Kill(this));
        }
        if (GUILayout.Button("Clear"))
        {
            Debug.Log(":::::::::::: CLEAR");
            DOTween.Clear();
        }
        if (GUILayout.Button("Clear & Reload"))
        {
            Debug.Log(":::::::::::: CLEAR AND RELOAD");
            int level = SceneManager.GetActiveScene().buildIndex;
            DOTween.Clear();
            SceneManager.LoadScene(level);
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal();
        foreach (Tween t in tweens)
        {
            if (GUILayout.Button("Direct Kill"))
            {
                t.Kill();
            }
        }
        GUILayout.EndHorizontal();

        GUILayout.Space(5);

        GUILayout.Label("Global DOTween Timescale");
        GUILayout.BeginHorizontal();
        DOTween.timeScale = GUILayout.HorizontalSlider(DOTween.timeScale, 0.0f, 20.0f);
        if (GUILayout.Button("Reset", GUILayout.Width(80)))
        {
            DOTween.timeScale = 1;
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        for (int i = 0; i < tweens.Length; ++i)
        {
            GUILayout.Label("Single Timescale");
        }
        GUILayout.EndHorizontal();
        GUILayout.BeginHorizontal();
        foreach (Tween t in tweens)
        {
            t.timeScale = GUILayout.HorizontalSlider(t.timeScale, 0.0f, 20.0f, GUILayout.Width(60));
            if (GUILayout.Button("Reset", GUILayout.Width(80)))
            {
                t.timeScale = 1;
            }
        }
        GUILayout.EndHorizontal();

        GUILayout.BeginHorizontal();
        foreach (Tween t in tweens)
        {
            GUILayout.Label("Elapsed: " + t.Elapsed(false) +
                            "\nFullElapsed: " + t.Elapsed() +
                            "\nElapsed %: " + t.ElapsedPercentage(false) +
                            "\nFullElapsed %: " + t.ElapsedPercentage() +
                            "\nCompleted Loops: " + t.CompletedLoops()
                            );
        }
        GUILayout.EndHorizontal();

        DGUtils.EndGUI();
    }
Esempio n. 20
0
 /// <summary>
 /// 恢复播放动画
 /// </summary>
 public static void UnPauseAll()
 {
     _isPause = false;
     DOTween.PlayAll();
 }
Esempio n. 21
0
 private void PlayAllEffectInGamePlay()
 {
     DOTween.PlayAll();
 }
Esempio n. 22
0
        override public void OnInspectorGUI()
        {
            EditorGUIUtils.SetGUIStyles();

            int totActiveTweens        = TweenManager.totActiveTweens;
            int totPlayingTweens       = TweenManager.TotalPlayingTweens();
            int totPausedTweens        = totActiveTweens - totPlayingTweens;
            int totActiveDefaultTweens = TweenManager.totActiveDefaultTweens;
            int totActiveLateTweens    = TweenManager.totActiveLateTweens;

            GUILayout.Space(4);
            GUILayout.Label(_title, TweenManager.isDebugBuild ? EditorGUIUtils.redLabelStyle : EditorGUIUtils.boldLabelStyle);

            GUILayout.Space(6);
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Documentation"))
            {
                Application.OpenURL("http://dotween.demigiant.com/documentation.php");
            }
            if (GUILayout.Button("Check Updates"))
            {
                Application.OpenURL("http://dotween.demigiant.com/download.php?v=" + DOTween.Version);
            }
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            if (GUILayout.Button(_settings.showPlayingTweens ? "Hide Playing Tweens" : "Show Playing Tweens"))
            {
                _settings.showPlayingTweens = !_settings.showPlayingTweens;
                EditorUtility.SetDirty(_settings);
            }
            if (GUILayout.Button(_settings.showPausedTweens ? "Hide Paused Tweens" : "Show Paused Tweens"))
            {
                _settings.showPausedTweens = !_settings.showPausedTweens;
                EditorUtility.SetDirty(_settings);
            }
            GUILayout.EndHorizontal();
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Play all"))
            {
                DOTween.PlayAll();
            }
            if (GUILayout.Button("Pause all"))
            {
                DOTween.PauseAll();
            }
            if (GUILayout.Button("Kill all"))
            {
                DOTween.KillAll();
            }
            GUILayout.EndHorizontal();

            GUILayout.Space(8);
            _strBuilder.Length = 0;
            _strBuilder.Append("Active tweens: ").Append(totActiveTweens)
            .Append(" (").Append(TweenManager.totActiveTweeners)
            .Append("/").Append(TweenManager.totActiveSequences).Append(")")
            .Append("\nDefault/Late tweens: ").Append(totActiveDefaultTweens)
            .Append("/").Append(totActiveLateTweens)
            .Append("\nPlaying tweens: ").Append(totPlayingTweens);
            if (_settings.showPlayingTweens)
            {
                foreach (Tween t in TweenManager._activeTweens)
                {
                    if (t != null && t.isPlaying)
                    {
                        _strBuilder.Append("\n   - [").Append(t.tweenType).Append("] ").Append(t.target);
                    }
                }
            }
            _strBuilder.Append("\nPaused tweens: ").Append(totPausedTweens);
            if (_settings.showPausedTweens)
            {
                foreach (Tween t in TweenManager._activeTweens)
                {
                    if (t != null && !t.isPlaying)
                    {
                        _strBuilder.Append("\n   - [").Append(t.tweenType).Append("] ").Append(t.target);
                    }
                }
            }
            _strBuilder.Append("\nPooled tweens: ").Append(TweenManager.TotalPooledTweens())
            .Append(" (").Append(TweenManager.totPooledTweeners)
            .Append("/").Append(TweenManager.totPooledSequences).Append(")");
            GUILayout.Label(_strBuilder.ToString());

            GUILayout.Space(8);
            _strBuilder.Remove(0, _strBuilder.Length);
            _strBuilder.Append("Tweens Capacity: ").Append(TweenManager.maxTweeners).Append("/").Append(TweenManager.maxSequences)
            .Append("\nMax Simultaneous Active Tweens: ").Append(DOTween.maxActiveTweenersReached).Append("/").Append(DOTween.maxActiveSequencesReached);
            GUILayout.Label(_strBuilder.ToString());

            GUILayout.Space(8);
            _strBuilder.Remove(0, _strBuilder.Length);
            _strBuilder.Append("SETTINGS ▼");
            _strBuilder.Append("\nSafe Mode: ").Append(DOTween.useSafeMode ? "ON" : "OFF");
            _strBuilder.Append("\nLog Behaviour: ").Append(DOTween.logBehaviour);
            _strBuilder.Append("\nShow Unity Editor Report: ").Append(DOTween.showUnityEditorReport);
            _strBuilder.Append("\nTimeScale (Unity/DOTween): ").Append(Time.timeScale).Append("/").Append(DOTween.timeScale);
            GUILayout.Label(_strBuilder.ToString());
            GUILayout.Label("NOTE: DOTween's TimeScale is not the same as Unity's Time.timeScale: it is actually multiplied by it except for tweens that are set to update independently", EditorGUIUtils.wordWrapItalicLabelStyle);

            GUILayout.Space(8);
            _strBuilder.Remove(0, _strBuilder.Length);
            _strBuilder.Append("DEFAULTS ▼");
            _strBuilder.Append("\ndefaultRecyclable: ").Append(DOTween.defaultRecyclable);
            _strBuilder.Append("\ndefaultUpdateType: ").Append(DOTween.defaultUpdateType);
            _strBuilder.Append("\ndefaultTSIndependent: ").Append(DOTween.defaultTimeScaleIndependent);
            _strBuilder.Append("\ndefaultAutoKill: ").Append(DOTween.defaultAutoKill);
            _strBuilder.Append("\ndefaultAutoPlay: ").Append(DOTween.defaultAutoPlay);
            _strBuilder.Append("\ndefaultEaseType: ").Append(DOTween.defaultEaseType);
            _strBuilder.Append("\ndefaultLoopType: ").Append(DOTween.defaultLoopType);
            GUILayout.Label(_strBuilder.ToString());

            GUILayout.Space(10);
        }
        override public void OnInspectorGUI()
        {
            _isRuntime = EditorApplication.isPlaying;
            ConnectToSource();

            EditorGUIUtils.SetGUIStyles();

            // Header img
            GUILayout.Space(4);
            GUILayout.BeginHorizontal();
            Rect headeR = GUILayoutUtility.GetRect(0, 93, 18, 18);

            GUI.DrawTexture(headeR, _headerImg, ScaleMode.ScaleToFit, true);
            GUILayout.Label(_isRuntime ? "RUNTIME MODE" : "EDITOR MODE");
            GUILayout.FlexibleSpace();
            GUILayout.EndHorizontal();

            int totActiveTweens        = TweenManager.totActiveTweens;
            int totPlayingTweens       = TweenManager.TotalPlayingTweens();
            int totPausedTweens        = totActiveTweens - totPlayingTweens;
            int totActiveDefaultTweens = TweenManager.totActiveDefaultTweens;
            int totActiveLateTweens    = TweenManager.totActiveLateTweens;
            int totActiveFixedTweens   = TweenManager.totActiveFixedTweens;
            int totActiveManualTweens  = TweenManager.totActiveManualTweens;

            GUILayout.Label(_title, TweenManager.isDebugBuild ? EditorGUIUtils.redLabelStyle : EditorGUIUtils.boldLabelStyle);

            if (!_isRuntime)
            {
                GUI.backgroundColor = new Color(0f, 0.31f, 0.48f);
                GUI.contentColor    = Color.white;
                GUILayout.Label(
                    "This component is <b>added automatically</b> by DOTween at runtime." +
                    "\nAdding it yourself is <b>not recommended</b> unless you really know what you're doing:" +
                    " you'll have to be sure it's <b>never destroyed</b> and that it's present <b>in every scene</b>.",
                    EditorGUIUtils.infoboxStyle
                    );
                GUI.backgroundColor = GUI.contentColor = GUI.contentColor = Color.white;
            }

            GUILayout.Space(6);
            GUILayout.BeginHorizontal();
            if (GUILayout.Button("Documentation"))
            {
                Application.OpenURL("http://dotween.demigiant.com/documentation.php");
            }
            if (GUILayout.Button("Check Updates"))
            {
                Application.OpenURL("http://dotween.demigiant.com/download.php?v=" + DOTween.Version);
            }
            GUILayout.EndHorizontal();

            if (_isRuntime)
            {
                GUILayout.BeginHorizontal();
                if (GUILayout.Button(_settings.showPlayingTweens ? "Hide Playing Tweens" : "Show Playing Tweens"))
                {
                    _settings.showPlayingTweens = !_settings.showPlayingTweens;
                    EditorUtility.SetDirty(_settings);
                }
                if (GUILayout.Button(_settings.showPausedTweens ? "Hide Paused Tweens" : "Show Paused Tweens"))
                {
                    _settings.showPausedTweens = !_settings.showPausedTweens;
                    EditorUtility.SetDirty(_settings);
                }
                GUILayout.EndHorizontal();
                GUILayout.BeginHorizontal();
                if (GUILayout.Button("Play all"))
                {
                    DOTween.PlayAll();
                }
                if (GUILayout.Button("Pause all"))
                {
                    DOTween.PauseAll();
                }
                if (GUILayout.Button("Kill all"))
                {
                    DOTween.KillAll();
                }
                GUILayout.EndHorizontal();

                GUILayout.Space(8);
                GUILayout.Label("<b>Legend: </b> TW = Tweener, SE = Sequence", EditorGUIUtils.wordWrapRichTextLabelStyle);

                GUILayout.Space(8);
                _strb.Length = 0;
                _strb.Append("Active tweens: ").Append(totActiveTweens)
                .Append(" (").Append(TweenManager.totActiveTweeners).Append(" TW, ")
                .Append(TweenManager.totActiveSequences).Append(" SE)")
                .Append("\nDefault/Late/Fixed/Manual tweens: ").Append(totActiveDefaultTweens)
                .Append("/").Append(totActiveLateTweens)
                .Append("/").Append(totActiveFixedTweens)
                .Append("/").Append(totActiveManualTweens)
                .Append(_playingTweensHex).Append("\nPlaying tweens: ").Append(totPlayingTweens);
                if (_settings.showPlayingTweens)
                {
                    foreach (Tween t in TweenManager._activeTweens)
                    {
                        if (t == null || !t.isPlaying)
                        {
                            continue;
                        }
                        _strb.Append("\n   - [").Append(t.tweenType == TweenType.Tweener ? "TW" : "SE");
                        AppendTweenIdLabel(_strb, t);
                        _strb.Append("] ").Append(GetTargetTypeLabel(t.target));
                    }
                }
                _strb.Append("</color>");
                _strb.Append(_pausedTweensHex).Append("\nPaused tweens: ").Append(totPausedTweens);
                if (_settings.showPausedTweens)
                {
                    foreach (Tween t in TweenManager._activeTweens)
                    {
                        if (t == null || t.isPlaying)
                        {
                            continue;
                        }
                        _strb.Append("\n   - [").Append(t.tweenType == TweenType.Tweener ? "TW" : "SE");
                        AppendTweenIdLabel(_strb, t);
                        _strb.Append("] ").Append(GetTargetTypeLabel(t.target));
                    }
                }
                _strb.Append("</color>");
                _strb.Append("\nPooled tweens: ").Append(TweenManager.TotalPooledTweens())
                .Append(" (").Append(TweenManager.totPooledTweeners).Append(" TW, ")
                .Append(TweenManager.totPooledSequences).Append(" SE)");
                GUILayout.Label(_strb.ToString(), EditorGUIUtils.wordWrapRichTextLabelStyle);

                GUILayout.Space(8);
                _strb.Remove(0, _strb.Length);
                _strb.Append("Tweens Capacity: ").Append(TweenManager.maxTweeners).Append(" TW, ").Append(TweenManager.maxSequences).Append(" SE")
                .Append("\nMax Simultaneous Active Tweens: ").Append(DOTween.maxActiveTweenersReached).Append(" TW, ")
                .Append(DOTween.maxActiveSequencesReached).Append(" SE");
                GUILayout.Label(_strb.ToString(), EditorGUIUtils.wordWrapRichTextLabelStyle);
            }

            GUILayout.Space(8);
            _strb.Remove(0, _strb.Length);
            _strb.Append("<b>SETTINGS ▼</b>");
            _strb.Append("\nSafe Mode: ").Append((_isRuntime ? DOTween.useSafeMode : _settings.useSafeMode) ? "ON" : "OFF");
            _strb.Append("\nLog Behaviour: ").Append(_isRuntime ? DOTween.logBehaviour : _settings.logBehaviour);
            _strb.Append("\nShow Unity Editor Report: ").Append(_isRuntime ? DOTween.showUnityEditorReport : _settings.showUnityEditorReport);
            _strb.Append("\nTimeScale (Unity/DOTween): ").Append(Time.timeScale).Append("/").Append(_isRuntime ? DOTween.timeScale : _settings.timeScale);
            GUILayout.Label(_strb.ToString(), EditorGUIUtils.wordWrapRichTextLabelStyle);
            GUILayout.Label(
                "NOTE: DOTween's TimeScale is not the same as Unity's Time.timeScale: it is actually multiplied by it except for tweens that are set to update independently",
                EditorGUIUtils.wordWrapRichTextLabelStyle
                );

            GUILayout.Space(8);
            _strb.Remove(0, _strb.Length);
            _strb.Append("<b>DEFAULTS ▼</b>");
            _strb.Append("\ndefaultRecyclable: ").Append(_isRuntime ? DOTween.defaultRecyclable : _settings.defaultRecyclable);
            _strb.Append("\ndefaultUpdateType: ").Append(_isRuntime ? DOTween.defaultUpdateType : _settings.defaultUpdateType);
            _strb.Append("\ndefaultTSIndependent: ").Append(_isRuntime ? DOTween.defaultTimeScaleIndependent : _settings.defaultTimeScaleIndependent);
            _strb.Append("\ndefaultAutoKill: ").Append(_isRuntime ? DOTween.defaultAutoKill : _settings.defaultAutoKill);
            _strb.Append("\ndefaultAutoPlay: ").Append(_isRuntime ? DOTween.defaultAutoPlay : _settings.defaultAutoPlay);
            _strb.Append("\ndefaultEaseType: ").Append(_isRuntime ? DOTween.defaultEaseType : _settings.defaultEaseType);
            _strb.Append("\ndefaultLoopType: ").Append(_isRuntime ? DOTween.defaultLoopType : _settings.defaultLoopType);
            GUILayout.Label(_strb.ToString(), EditorGUIUtils.wordWrapRichTextLabelStyle);

            GUILayout.Space(10);
        }
Esempio n. 24
0
 public virtual void ResumeGame(bool tutorial = false)
 {
     DOTween.PlayAll();
     paused = false;
 }
Esempio n. 25
0
 public void PlayScene()
 {
     DOTween.PlayAll();
 }
Esempio n. 26
0
 // Called by PLAY button OnClick event. Starts all tweens
 public void StartTweens()
 {
     DOTween.PlayAll();
 }
Esempio n. 27
0
 public void OnClickStar()
 {
     //播放该物体所有的DOTween 动画
     DOTween.PlayAll();
 }