protected override void DrawOnlyForPrabInScene()
        {
            base.DrawOnlyForPrabInScene();

            EditorLayout.BeginVerticalBox();
            {
                EditorGUILayout.LabelField("Transition status", EditorStyles.boldLabel);

                EditorLayout.BeginHorizontal();
                {
                    EditorGUILayout.LabelField("Total transitions: " + CallObject.TransitionCount);
                }
                EditorLayout.EndHorizontal();

                /*
                 * if (CallObject.InTransition)
                 * {
                 *  string status =
                 *      "RUNNING (" +
                 *      (CallObject.Fading ? "Fading" : "Brightening") +
                 *      ") - " +
                 *      Mathf.RoundToInt(CallObject.TransitionPercent * 100) +
                 *      "%"
                 *  ;
                 *  EditorLayout.BeginHorizontal();
                 *  {
                 *      EditorGUILayout.LabelField(status);
                 *  }
                 *  EditorLayout.EndHorizontal();
                 * }
                 */
            }
            EditorLayout.EndVertical();
        }
コード例 #2
0
        protected override void DrawOnlyForPrabInScene()
        {
            base.DrawOnlyForPrabInScene();

            EditorLayout.BeginVerticalBox();
            {
                EditorLayout.BeginHorizontal();
                {
                    string status      = CallObject.Pause ? "Resume" : "Pause";
                    var    buttonStyle = new GUIStyle(GUI.skin.button);

                    if (GUILayout.Button(status, buttonStyle, GUILayout.Width(50)))
                    {
                        CallObject.Pause = !CallObject.Pause;
                    }

                    if (GUILayout.Button("Restart", buttonStyle, GUILayout.Width(50)))
                    {
                        CallObject.RestartCurrentLevel();
                    }
                }
                EditorLayout.EndHorizontal();
            }
            EditorLayout.EndVertical();
        }
コード例 #3
0
        protected override void DrawOnlyForPrabInScene()
        {
            base.DrawOnlyForPrabInScene();

            AudioClip currentAudioClip = CallObject.CurrentAudioClip;

            EditorLayout.BeginVerticalBox();
            {
                EditorGUILayout.LabelField("Music manager", EditorStyles.boldLabel);

                EditorLayout.BeginHorizontal();
                {
                    EditorGUILayout.LabelField("Total songs: " + CallObject.MusicPlaylistList.Count);
                }
                EditorLayout.EndHorizontal();

                EditorLayout.BeginHorizontal();
                {
                    EditorGUILayout.LabelField("Current song: " + currentAudioClip.name);
                }
                EditorLayout.EndHorizontal();

                EditorLayout.BeginHorizontal();
                {
                    EditorGUILayout.LabelField(Utility.ConvertTimeToString(CallObject.AudioSource.time) + " / " + Utility.ConvertTimeToString(currentAudioClip.length));
                }
                EditorLayout.EndHorizontal();

                EditorLayout.BeginHorizontal();
                {
                    var buttonStyle = new GUIStyle(GUI.skin.button);
                    if (GUILayout.Button("Play", buttonStyle, GUILayout.Width(50)))
                    {
                        CallObject.Play();
                    }
                    if (GUILayout.Button(CallObject.IsPaused() ? "UnPause" : "Pause", buttonStyle, GUILayout.Width(60)))
                    {
                        CallObject.Pause();
                    }
                    if (GUILayout.Button("Next", buttonStyle, GUILayout.Width(50)))
                    {
                        CallObject.Next();
                    }
                    if (GUILayout.Button("Stop", buttonStyle, GUILayout.Width(50)))
                    {
                        CallObject.Stop();
                    }
                }
                EditorLayout.EndHorizontal();
            }
            EditorLayout.EndVertical();
        }
        protected override void DrawOnlyForPrabInScene()
        {
            base.DrawOnlyForPrabInScene();

            if (this.CallObject.InTransitionSafe())
            {
                EditorLayout.BeginVerticalBox();
                {
                    string status =
                        "RUNNING (" +
                        (CallObject.GetTransitionStatus().TransitionFading ? "Fading" : "Brightening") +
                        ") - " +
                        Mathf.RoundToInt(CallObject.GetTransitionStatus().TransitionPercent * 100) +
                        "%"
                    ;
                    EditorLayout.BeginHorizontal();
                    {
                        EditorGUILayout.LabelField(status);
                    }
                    EditorLayout.EndHorizontal();
                }
                EditorLayout.EndVertical();
            }
        }