コード例 #1
0
        override public void ShowGUI(List <ActionParameter> parameters)
        {
            sceneToCheck  = (SceneToCheck)EditorGUILayout.EnumPopup("Check previous or current:", sceneToCheck);
            chooseSceneBy = (ChooseSceneBy)EditorGUILayout.EnumPopup("Choose scene by:", chooseSceneBy);

            EditorGUILayout.BeginHorizontal();
            if (chooseSceneBy == ChooseSceneBy.Name)
            {
                EditorGUILayout.LabelField("Scene name is:", GUILayout.Width(100f));
                intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                sceneNameParameterID = Action.ChooseParameterGUI("", parameters, sceneNameParameterID, ParameterType.String);
                if (sceneNameParameterID < 0)
                {
                    sceneName = EditorGUILayout.TextField(sceneName);
                }
            }
            else
            {
                EditorGUILayout.LabelField("Scene number is:", GUILayout.Width(100f));
                intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                sceneNumberParameterID = Action.ChooseParameterGUI("", parameters, sceneNumberParameterID, ParameterType.Integer);
                if (sceneNumberParameterID < 0)
                {
                    sceneNumber = EditorGUILayout.IntField(sceneNumber);
                }
            }
            EditorGUILayout.EndHorizontal();
        }
コード例 #2
0
        /**
         * <summary>Creates a new instance of the 'Scene: Check' Action</summary>
         * <param name = "sceneName">The build index number of the scene to check for</param>
         * <param name = "sceneToCheck">Which scene type to check for</param>
         * <returns>The generated Action</returns>
         */
        public static ActionSceneCheck CreateNew(int sceneNumber, SceneToCheck sceneToCheck = SceneToCheck.Current)
        {
            ActionSceneCheck newAction = (ActionSceneCheck)CreateInstance <ActionSceneCheck>();

            newAction.sceneToCheck  = sceneToCheck;
            newAction.chooseSceneBy = ChooseSceneBy.Number;
            newAction.sceneNumber   = sceneNumber;
            return(newAction);
        }
コード例 #3
0
        /**
         * <summary>Creates a new instance of the 'Scene: Check' Action</summary>
         * <param name = "sceneName">The name of the scene to check for</param>
         * <param name = "sceneToCheck">Which scene type to check for</param>
         * <returns>The generated Action</returns>
         */
        public static ActionSceneCheck CreateNew(string sceneName, SceneToCheck sceneToCheck = SceneToCheck.Current)
        {
            ActionSceneCheck newAction = (ActionSceneCheck)CreateInstance <ActionSceneCheck>();

            newAction.sceneToCheck  = sceneToCheck;
            newAction.chooseSceneBy = ChooseSceneBy.Name;
            newAction.sceneName     = sceneName;
            return(newAction);
        }
コード例 #4
0
        override public void ShowGUI()
        {
            chooseSceneBy = (ChooseSceneBy)EditorGUILayout.EnumPopup("Choose scene by:", chooseSceneBy);

            EditorGUILayout.BeginHorizontal();
            sceneToCheck = (SceneToCheck)EditorGUILayout.EnumPopup(sceneToCheck);
            if (chooseSceneBy == ChooseSceneBy.Name)
            {
                EditorGUILayout.LabelField("scene name is:", GUILayout.Width(100f));
                intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);
                sceneName    = EditorGUILayout.TextField(sceneName);
            }
            else
            {
                EditorGUILayout.LabelField("scene number is:", GUILayout.Width(100f));
                intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);
                sceneNumber  = EditorGUILayout.IntField(sceneNumber);
            }
            EditorGUILayout.EndHorizontal();
        }
コード例 #5
0
        public override void ShowGUI(List <ActionParameter> parameters)
        {
            if (KickStarter.settingsManager != null && KickStarter.settingsManager.playerSwitching == PlayerSwitching.Allow)
            {
                playerParameterID = ChooseParameterGUI("Player:", parameters, playerParameterID, ParameterType.Integer);
                if (playerParameterID < 0)
                {
                    playerID = ChoosePlayerGUI(playerID, true);
                }
            }

            sceneToCheck  = (SceneToCheck)EditorGUILayout.EnumPopup("Check type:", sceneToCheck);
            chooseSceneBy = (ChooseSceneBy)EditorGUILayout.EnumPopup("Choose scene by:", chooseSceneBy);

            EditorGUILayout.BeginHorizontal();
            if (chooseSceneBy == ChooseSceneBy.Name)
            {
                EditorGUILayout.LabelField("Scene name is:", GUILayout.Width(100f));
                intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                sceneNameParameterID = ChooseParameterGUI(string.Empty, parameters, sceneNameParameterID, ParameterType.String);
                if (sceneNameParameterID < 0)
                {
                    sceneName = EditorGUILayout.TextField(sceneName);
                }
            }
            else
            {
                EditorGUILayout.LabelField("Scene number is:", GUILayout.Width(100f));
                intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                sceneNumberParameterID = ChooseParameterGUI(string.Empty, parameters, sceneNumberParameterID, ParameterType.Integer);
                if (sceneNumberParameterID < 0)
                {
                    sceneNumber = EditorGUILayout.IntField(sceneNumber);
                }
            }
            EditorGUILayout.EndHorizontal();
        }
コード例 #6
0
ファイル: ActionSceneCheck.cs プロジェクト: mcbodge/eidolon
        public override void ShowGUI()
        {
            sceneToCheck = (SceneToCheck) EditorGUILayout.EnumPopup ("Check previous or current:", sceneToCheck);
            chooseSceneBy = (ChooseSceneBy) EditorGUILayout.EnumPopup ("Choose scene by:", chooseSceneBy);

            EditorGUILayout.BeginHorizontal();
                if (chooseSceneBy == ChooseSceneBy.Name)
                {
                    EditorGUILayout.LabelField ("Scene name is:", GUILayout.Width (100f));
                    intCondition = (IntCondition) EditorGUILayout.EnumPopup (intCondition);
                    sceneName = EditorGUILayout.TextField (sceneName);
                }
                else
                {
                    EditorGUILayout.LabelField ("Scene number is:", GUILayout.Width (100f));
                    intCondition = (IntCondition) EditorGUILayout.EnumPopup (intCondition);
                    sceneNumber = EditorGUILayout.IntField (sceneNumber);
                }
            EditorGUILayout.EndHorizontal();
        }
コード例 #7
0
        public override void ShowGUI(List <ActionParameter> parameters)
        {
            bool showPlayerOptions = false;

            if (KickStarter.settingsManager != null && KickStarter.settingsManager.playerSwitching == PlayerSwitching.Allow)
            {
                playerParameterID = ChooseParameterGUI("Player:", parameters, playerParameterID, ParameterType.Integer);
                if (playerParameterID < 0)
                {
                    playerID          = ChoosePlayerGUI(playerID, true);
                    showPlayerOptions = (playerID >= 0);
                }
                else
                {
                    showPlayerOptions = true;
                }
            }

            if (showPlayerOptions)
            {
                sceneToCheck = (SceneToCheck)EditorGUILayout.EnumPopup("Check type:", sceneToCheck);
                if (chooseSceneByPlayerSwitching == -1)
                {
                    chooseSceneByPlayerSwitching = (int)chooseSceneBy;
                }
                ChooseSceneByPlayerSwitching csbps = (ChooseSceneByPlayerSwitching)chooseSceneByPlayerSwitching;
                csbps = (ChooseSceneByPlayerSwitching)EditorGUILayout.EnumPopup("Choose scene by:", csbps);
                chooseSceneByPlayerSwitching = (int)csbps;
                chooseSceneBy = (ChooseSceneBy)chooseSceneByPlayerSwitching;

                EditorGUILayout.BeginHorizontal();
                switch (csbps)
                {
                case ChooseSceneByPlayerSwitching.Name:
                    EditorGUILayout.LabelField("Scene name is:", GUILayout.Width(100f));
                    intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                    sceneNameParameterID = ChooseParameterGUI(string.Empty, parameters, sceneNameParameterID, ParameterType.String);
                    if (sceneNameParameterID < 0)
                    {
                        sceneName = EditorGUILayout.TextField(sceneName);
                    }
                    break;

                case ChooseSceneByPlayerSwitching.Number:
                    EditorGUILayout.LabelField("Scene number is:", GUILayout.Width(100f));
                    intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                    sceneNumberParameterID = ChooseParameterGUI(string.Empty, parameters, sceneNumberParameterID, ParameterType.Integer);
                    if (sceneNumberParameterID < 0)
                    {
                        sceneNumber = EditorGUILayout.IntField(sceneNumber);
                    }
                    break;

                default:
                    break;
                }
                EditorGUILayout.EndHorizontal();
            }
            else
            {
                sceneToCheck  = (SceneToCheck)EditorGUILayout.EnumPopup("Check type:", sceneToCheck);
                chooseSceneBy = (ChooseSceneBy)EditorGUILayout.EnumPopup("Choose scene by:", chooseSceneBy);

                EditorGUILayout.BeginHorizontal();
                switch (chooseSceneBy)
                {
                case ChooseSceneBy.Name:
                    EditorGUILayout.LabelField("Scene name is:", GUILayout.Width(100f));
                    intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                    sceneNameParameterID = ChooseParameterGUI(string.Empty, parameters, sceneNameParameterID, ParameterType.String);
                    if (sceneNameParameterID < 0)
                    {
                        sceneName = EditorGUILayout.TextField(sceneName);
                    }
                    break;

                case ChooseSceneBy.Number:
                    EditorGUILayout.LabelField("Scene number is:", GUILayout.Width(100f));
                    intCondition = (IntCondition)EditorGUILayout.EnumPopup(intCondition);

                    sceneNumberParameterID = ChooseParameterGUI(string.Empty, parameters, sceneNumberParameterID, ParameterType.Integer);
                    if (sceneNumberParameterID < 0)
                    {
                        sceneNumber = EditorGUILayout.IntField(sceneNumber);
                    }
                    break;

                default:
                    break;
                }
                EditorGUILayout.EndHorizontal();
            }
        }