示例#1
0
        public override void ShowGUI()
        {
            if (KickStarter.inventoryManager == null)
            {
                numSockets = 0;
                EditorGUILayout.HelpBox("An Inventory Manager must be defined to use this Action", MessageType.Warning);
                return;
            }

            objectiveID = InventoryManager.ObjectiveSelectorList(objectiveID);

            Objective objective = KickStarter.inventoryManager.GetObjective(objectiveID);

            if (objective != null)
            {
                numSockets = objective.NumStates + 1;

                if (KickStarter.inventoryManager.ObjectiveIsPerPlayer(objectiveID))
                {
                    setPlayer = EditorGUILayout.Toggle("Check specific Player?", setPlayer);
                    if (setPlayer)
                    {
                        playerID = ChoosePlayerGUI(playerID, false);
                    }
                }
            }
            else
            {
                numSockets = 1;
            }
        }
示例#2
0
        public override void ShowGUI()
        {
            if (KickStarter.inventoryManager == null)
            {
                numSockets = 0;
                EditorGUILayout.HelpBox("An Inventory Manager must be defined to use this Action", MessageType.Warning);
                return;
            }

            objectiveID = InventoryManager.ObjectiveSelectorList(objectiveID);

            Objective objective = KickStarter.inventoryManager.GetObjective(objectiveID);

            if (objective != null)
            {
                newStateID = objective.StateSelectorList(newStateID, "Set to state:");

                if (KickStarter.inventoryManager.ObjectiveIsPerPlayer(objectiveID))
                {
                    setPlayer = EditorGUILayout.Toggle("Affect specific Player?", setPlayer);
                    if (setPlayer)
                    {
                        playerID = ChoosePlayerGUI(playerID, false);
                    }
                    else
                    {
                        selectAfter = EditorGUILayout.Toggle("Select after?", selectAfter);
                    }
                }
                else
                {
                    selectAfter = EditorGUILayout.Toggle("Select after?", selectAfter);
                }
            }

            AfterRunningOption();
        }