public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 5);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Movement Speed:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items = { "4-ways (up, down, left, right)", "8-ways (up, down, left, right, up left, up right, etc)" };
            GetDropDownField.BuildField("Which directions can player move?:", actionParams, heroAction.actionFields[3], new GenericListField(items));
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items2 = { "4-ways (up, down, left, right)", "8-ways (up, down, left, right, up left, up right, etc)" };
            GetDropDownField.BuildField("Which animations can player use?:", actionParams, heroAction.actionFields[4], new GenericListField(items2));
            SimpleLayout.EndVertical();
        }
Esempio n. 2
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            // Field: Skip (hidden, only for else if)
            GetConditionalField.BuildField(actionParams, heroAction.actionFields[0]);

            // Field: Integer A
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldA("If this hero object:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // Field: Operator
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items = { "in front of", "behind", "to the right of", "to the left of" };
            GetDropDownField.BuildField("is:", actionParams, heroAction.actionFields[2], new GenericListField(items), true);
            SimpleLayout.EndVertical();

            // Field: Integer B
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldA("this hero object:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
Esempio n. 3
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 2);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);

            // list of values
            string[] items = new string[RpgEditor.HeroKitCommon.moneyDatabase.propertiesList.properties.Count];
            for (int i = 0; i < RpgEditor.HeroKitCommon.moneyDatabase.propertiesList.properties.Count; i++)
            {
                items[i] = RpgEditor.HeroKitCommon.moneyDatabase.propertiesList.properties[i].itemProperties.strings.items[0].value;
            }
            GetDropDownField.BuildField("Currency type:", actionParams, heroAction.actionFields[0], new GenericListField(items));
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("New value:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();
        }
Esempio n. 4
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 6);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldA("Force of the jump:", actionParams, heroAction.actionFields[2]);

            string[] items  = { "jump straight up", "jump left", "jump right" };
            int      result = GetDropDownField.BuildField("Which directions can object jump?:", actionParams, heroAction.actionFields[3], new GenericListField(items));

            if (result > 1)
            {
                GetIntegerField.BuildFieldA("Force of the direction (0 to 100):", actionParams, heroAction.actionFields[4]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Play next action before this action completes?", actionParams, heroAction.actionFields[5], true);
            SimpleLayout.EndVertical();
        }
Esempio n. 5
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldB("Integer A:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("Operator:", actionParams, heroAction.actionFields[2], new MathOperatorField());
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Integer B:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
Esempio n. 6
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetSceneObjectValue.BuildField("layer", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items = new string[32];
            for (int i = 0; i < 32; i++)
            {
                items[i] = "Layer " + i + ": " + LayerMask.LayerToName(i);
            }
            GetDropDownField.BuildField("Use this layer:", actionParams, heroAction.actionFields[2], new GenericListField(items));
            SimpleLayout.EndVertical();
        }
Esempio n. 7
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetStringField.BuildFieldA("The name of the pool:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("The number of objects to add to the pool:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items  = { "Hero Object", "Prefab" };
            int      result = GetDropDownField.BuildField("Object type: ", actionParams, heroAction.actionFields[2], new GenericListField(items));

            // prefab
            if (result == 2)
            {
                GetPrefabValue.BuildField("Prefab used by the object pool:", actionParams, heroAction.actionFields[3]);
            }
            SimpleLayout.EndVertical();
        }
Esempio n. 8
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            // Field: Skip (hidden, only for else if)
            GetConditionalField.BuildField(actionParams, heroAction.actionFields[0]);

            // Field: Integer A
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldB("Hero Object A:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // Field: Operator
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("Operator:", actionParams, heroAction.actionFields[2], new TrueFalseField());
            SimpleLayout.EndVertical();

            // Field: Integer B
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldA("Hero Object B:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
Esempio n. 9
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 5);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Update a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetChildObjectField.BuildField("Is collider on a child object?", actionParams, heroAction.actionFields[2], heroAction.actionFields[3]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("The type of collider to update:", actionParams, heroAction.actionFields[4], new ColliderTypeField());
            SimpleLayout.EndVertical();
        }
Esempio n. 10
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Change the layer for a different hero object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Include hero object's children?", actionParams, heroAction.actionFields[2], true);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("The new layer for the hero object:");
            GetDropDownField.BuildField("", actionParams, heroAction.actionFields[3], new LayerListField());
            SimpleLayout.EndVertical();
        }
Esempio n. 11
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 5);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            // Field: Skip (hidden, only for else if)
            GetConditionalField.BuildField(actionParams, heroAction.actionFields[0]);

            // Field: Integer A (Enum A)
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldB("Enum:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // Field: Operator
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("Operator:", actionParams, heroAction.actionFields[2], new TrueFalseField());
            SimpleLayout.EndVertical();

            // Field: Integer B (Enum B)
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items = { "heads", "tails" };
            GetDropDownField.BuildField("New value:", actionParams, heroAction.actionFields[3], new GenericListField(items));
            SimpleLayout.EndVertical();
        }
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Rotate a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] direction = { "Clockwise", "Counterclockwise" };
            GetDropDownField.BuildField("Direction to rotate:", actionParams, heroAction.actionFields[2], new GenericListField(direction));
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Speed:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
Esempio n. 13
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 4);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldD("The hero object to save:", actionParams, heroAction.actionFields[3], false);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("Operation:", actionParams, heroAction.actionFields[0], new HeroObjectOperatorField());
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldB("Save the hero object here:", actionParams, heroAction.actionFields[1]);
            GetIntegerField.BuildFieldA("Maximum number of hero objects to save:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
Esempio n. 14
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 11);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Get the hero objects here:");
            GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[10]);

            SimpleLayout.Label("Hero object to reference:");
            GetHeroObjectField.BuildFieldA("", actionParams, heroAction.actionFields[3]);

            SimpleLayout.Label("Longest distance objects can be from this hero object:");
            SimpleLayout.BeginHorizontal();
            bool useX = GetBoolValue.BuildField("X", actionParams, heroAction.actionFields[4]);
            bool useY = GetBoolValue.BuildField("Y", actionParams, heroAction.actionFields[5]);
            bool useZ = GetBoolValue.BuildField("Z", actionParams, heroAction.actionFields[6]);

            SimpleLayout.EndHorizontal();

            if (useX || useY || useZ)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                if (showContent(heroAction, 4))
                {
                    GetFloatField.BuildFieldA("X:", actionParams, heroAction.actionFields[7], true);
                }
                if (showContent(heroAction, 5))
                {
                    GetFloatField.BuildFieldA("Y:", actionParams, heroAction.actionFields[8], true);
                }
                if (showContent(heroAction, 6))
                {
                    GetFloatField.BuildFieldA("Z:", actionParams, heroAction.actionFields[9], true);
                }
                SimpleLayout.EndVertical();
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Operation:");
            GetDropDownField.BuildField("", actionParams, heroAction.actionFields[0], new HeroObjectOperatorField());
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Save the hero objects here:");
            GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[1]);

            SimpleLayout.Label("Maximum number of hero objects to save:");
            GetIntegerField.BuildFieldA("", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
Esempio n. 15
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 12);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetCameraField.BuildField("", actionParams, heroAction.actionFields[0], heroAction.actionFields[11]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items    = { "Pan to Position", "Pan to Object" };
            int      moveType = GetDropDownField.BuildField("Move the camera here:", actionParams, heroAction.actionFields[1], new GenericListField(items));

            // move to position
            if (moveType == 1)
            {
                bool changeX = GetBoolValue.BuildField("Move to X?", actionParams, heroAction.actionFields[2], true);
                if (changeX)
                {
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[3]);
                }

                bool changeY = GetBoolValue.BuildField("Move to Y?", actionParams, heroAction.actionFields[4], true);
                if (changeY)
                {
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[5]);
                }

                bool changeZ = GetBoolValue.BuildField("Move to Z?", actionParams, heroAction.actionFields[6], true);
                if (changeZ)
                {
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[7]);
                }
            }

            // move to object
            else if (moveType == 2)
            {
                GetSceneObjectValue.BuildField("Scene Object", actionParams, heroAction.actionFields[8], heroAction.actionFields[9]);
                GetBoolValue.BuildField("Move to X?", actionParams, heroAction.actionFields[2], true);
                GetBoolValue.BuildField("Move to Y?", actionParams, heroAction.actionFields[4], true);
                GetBoolValue.BuildField("Move to Z?", actionParams, heroAction.actionFields[6], true);
            }

            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Movement time: (ex: 1=fast, 100=slow)", actionParams, heroAction.actionFields[10]);
            SimpleLayout.EndVertical();
        }
Esempio n. 16
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 11);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Get the hero objects here:");
            GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[10]);

            SimpleLayout.Label("Get hero objects in the scene at a specific position:");
            SimpleLayout.BeginHorizontal();
            GetBoolValue.BuildField("X", actionParams, heroAction.actionFields[3]);
            GetBoolValue.BuildField("Y", actionParams, heroAction.actionFields[4]);
            GetBoolValue.BuildField("Z", actionParams, heroAction.actionFields[5]);
            SimpleLayout.EndHorizontal();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            if (showContent(heroAction, 3))
            {
                GetFloatField.BuildFieldA("X:", actionParams, heroAction.actionFields[6], true);
            }
            if (showContent(heroAction, 4))
            {
                GetFloatField.BuildFieldA("Y:", actionParams, heroAction.actionFields[7], true);
            }
            if (showContent(heroAction, 5))
            {
                GetFloatField.BuildFieldA("Z:", actionParams, heroAction.actionFields[8], true);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.Label("Radius to include around each coordinate:");
            GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[9]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Operation:");
            GetDropDownField.BuildField("", actionParams, heroAction.actionFields[0], new HeroObjectOperatorField());
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Save the hero objects here:");
            GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[1]);

            SimpleLayout.Label("Maximum number of hero objects to save:");
            GetIntegerField.BuildFieldA("", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
Esempio n. 17
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 21);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.Label("Move a hero object:");
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Move a different hero object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.Label("To this scene:");
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetUnityObjectField.BuildFieldA <SceneAsset>("", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            SimpleLayout.Label("At this location:");
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetCoordinatesField.BuildField("", actionParams, heroAction.actionFields[3], heroAction.actionFields[4], heroAction.actionFields[5], heroAction.actionFields[6], heroAction.actionFields[7], heroAction.actionFields[8]);
            SimpleLayout.EndVertical();

            SimpleLayout.Label("Facing this direction:");
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items  = { "Retain", "Left", "Right", "Up", "Down", "Custom" };
            int      result = GetDropDownField.BuildField("", actionParams, heroAction.actionFields[9], new GenericListField(items));

            // custom
            if (result == 6)
            {
                GetCoordinatesField.BuildField("", actionParams, heroAction.actionFields[10], heroAction.actionFields[11], heroAction.actionFields[12], heroAction.actionFields[13], heroAction.actionFields[14], heroAction.actionFields[15]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.Label("Other settings:");
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Move camera to object's position?", actionParams, heroAction.actionFields[16], true);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Move camera to object's rotation?", actionParams, heroAction.actionFields[17], true);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Use default scene state?", actionParams, heroAction.actionFields[18], true);
            GetBoolValue.BuildField("Destroy clones of persistent objects?", actionParams, heroAction.actionFields[19], true);
            GetBoolValue.BuildField("Don't save state of current scene?", actionParams, heroAction.actionFields[20], true);
            SimpleLayout.EndVertical();
        }
Esempio n. 18
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 10);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            int rayType = GetDropDownField.BuildField("What type of object the should ray originate from?", actionParams, heroAction.actionFields[6], new RayOriginField());

            // use main camera
            if (rayType == 1)
            {
                GetDropDownField.BuildField("Direction of the ray:", actionParams, heroAction.actionFields[4], new RayDirectionTypeBField());
            }
            // use another camera
            else if (rayType == 2)
            {
                GetHeroObjectField.BuildFieldA("Origin of the ray:", actionParams, heroAction.actionFields[3]);
                GetDropDownField.BuildField("Direction of the ray:", actionParams, heroAction.actionFields[4], new RayDirectionTypeBField());
            }
            // use hero object
            else if (rayType == 3)
            {
                GetHeroObjectField.BuildFieldA("Origin of the ray:", actionParams, heroAction.actionFields[3]);
                GetChildObjectField.BuildField("Is ray coming from a child object?", actionParams, heroAction.actionFields[7], heroAction.actionFields[8]);
                GetDropDownField.BuildField("Direction of the ray:", actionParams, heroAction.actionFields[4], new RayDirectionTypeField());
                GetIntegerField.BuildFieldA("Distance the ray should travel:", actionParams, heroAction.actionFields[5]);
            }

            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("Operation:", actionParams, heroAction.actionFields[0], new HeroObjectOperatorField());
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldB("Save the hero objects here:", actionParams, heroAction.actionFields[1]);
            GetIntegerField.BuildFieldA("Maximum number of hero objects to save:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Draw a line that represents the ray? (only visible in scene editor)", actionParams, heroAction.actionFields[9]);
            SimpleLayout.EndVertical();
        }
Esempio n. 19
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 9);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetGameObjectField.BuildFieldB("The game object that contains the child game object:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool useName = GetBoolValue.BuildField("Get child game object with a specific name?", actionParams, heroAction.actionFields[2], true);

            if (useName)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                GetStringField.BuildFieldA("Name:", actionParams, heroAction.actionFields[3], true, false, -80);
                SimpleLayout.EndVertical();
            }

            bool useTag = GetBoolValue.BuildField("Get child game object with a specific tag?", actionParams, heroAction.actionFields[4], true);

            if (useTag)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                GetTagField.BuildField("Tag:", actionParams, heroAction.actionFields[5], true);
                SimpleLayout.EndVertical();
            }

            bool useLayer = GetBoolValue.BuildField("Get child game object on a specific layer?", actionParams, heroAction.actionFields[6], true);

            if (useLayer)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                GetDropDownField.BuildField("Layer", actionParams, heroAction.actionFields[7], new LayerListField(), true);
                SimpleLayout.EndVertical();
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetGameObjectField.BuildFieldB("Save the child game object here:", actionParams, heroAction.actionFields[8]);
            SimpleLayout.EndVertical();
        }
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 23);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Change move settings for a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeSpeed = GetBoolValue.BuildField("Change move speed?", actionParams, heroAction.actionFields[5], true);

            if (changeSpeed)
            {
                SimpleLayout.Line();
                GetIntegerField.BuildFieldA("Movement Speed:", actionParams, heroAction.actionFields[2]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeMoveDirection = GetBoolValue.BuildField("Change move directions?", actionParams, heroAction.actionFields[6], true);

            if (changeMoveDirection)
            {
                SimpleLayout.Line();
                string[] items = { "4-ways (up, down, left, right)", "8-ways (up, down, left, right, up left, up right, etc)" };
                GetDropDownField.BuildField("Which directions can player move?:", actionParams, heroAction.actionFields[3], new GenericListField(items));
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeMoveFace = GetBoolValue.BuildField("Change animation type?", actionParams, heroAction.actionFields[7], true);

            if (changeMoveFace)
            {
                SimpleLayout.Line();
                string[] items2 = { "4-ways (up, down, left, right)", "8-ways (up, down, left, right, up left, up right, etc)" };
                GetDropDownField.BuildField("Which animations can player use?:", actionParams, heroAction.actionFields[4], new GenericListField(items2));
            }
            SimpleLayout.EndVertical();
        }
Esempio n. 21
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 8);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Change a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changePrefab = GetBoolValue.BuildField("Use a new prefab?", actionParams, heroAction.actionFields[2], true);

            if (changePrefab)
            {
                GetPrefabValue.BuildField("", actionParams, heroAction.actionFields[3]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeRigidbody = GetBoolValue.BuildField("Use a new rigidbody?", actionParams, heroAction.actionFields[4], true);

            if (changeRigidbody)
            {
                GetRigidbodyValue.BuildField("", actionParams, heroAction.actionFields[5]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeHidden = GetBoolValue.BuildField("Show or hide visuals?", actionParams, heroAction.actionFields[6], true);

            if (changeHidden)
            {
                string[] choices = { "Show Visuals", "Hide Visuals" };
                GetDropDownField.BuildField("", actionParams, heroAction.actionFields[7], new GenericListField(choices), true);
            }
            SimpleLayout.EndVertical();
        }
Esempio n. 22
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 9);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Rotate a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] direction = { "Clockwise", "Counterclockwise" };
            bool     changeX   = GetBoolValue.BuildField("X Axis", actionParams, heroAction.actionFields[2], true);

            if (changeX)
            {
                GetDropDownField.BuildField("", actionParams, heroAction.actionFields[3], new GenericListField(direction));
            }
            bool changeY = GetBoolValue.BuildField("Y Axis", actionParams, heroAction.actionFields[4], true);

            if (changeY)
            {
                GetDropDownField.BuildField("", actionParams, heroAction.actionFields[5], new GenericListField(direction));
            }
            bool changeZ = GetBoolValue.BuildField("Z Axis", actionParams, heroAction.actionFields[6], true);

            if (changeZ)
            {
                GetDropDownField.BuildField("", actionParams, heroAction.actionFields[7], new GenericListField(direction));
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Speed:", actionParams, heroAction.actionFields[8]);
            SimpleLayout.EndVertical();
        }
Esempio n. 23
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetStringField.BuildFieldA("Name of the setting:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            int valueType = GetDropDownField.BuildField("Type of value to load:", actionParams, heroAction.actionFields[0], new PlayerPrefTypeField());

            if (valueType != 0)
            {
                SimpleLayout.Label("Save the value here:");
            }

            if (valueType == 1)
            {
                GetIntegerField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            else if (valueType == 2)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            else if (valueType == 3)
            {
                GetBoolField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            else if (valueType == 4)
            {
                GetStringField.BuildFieldB("", actionParams, heroAction.actionFields[1]);
            }
            SimpleLayout.EndVertical();
        }
Esempio n. 24
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 10);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            HeroObject targetHeroObject = GetHeroObjectField.BuildFieldE("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);

            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Movement Speed:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items         = { "Object has animatior controller", "Object has animation component", "Don't animate this object" };
            int      animationType = GetDropDownField.BuildField("Animation system:", actionParams, heroAction.actionFields[3], new GenericListField(items));

            SimpleLayout.EndVertical();

            if (animationType != 3)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                if (animationType <= 1)
                {
                    ActionCommon.GetAnimation("Walk Animation:", actionParams, heroAction.actionFields[4], heroAction.actionFields[5], heroAction.actionFields[6], AnimatorControllerParameterType.Bool, targetHeroObject);
                }
                else
                {
                    ActionCommon.GetAnimation_Legacy("Walk Animation:", actionParams, heroAction.actionFields[4], heroAction.actionFields[5], heroAction.actionFields[6], targetHeroObject);
                    ActionCommon.GetAnimation_Legacy("Idle Animation:", actionParams, heroAction.actionFields[7], heroAction.actionFields[8], heroAction.actionFields[9], targetHeroObject);
                }
                SimpleLayout.EndVertical();
            }
        }
Esempio n. 25
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 6);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Image ID:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Speed:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] choices    = { "Rotate X number of degrees", "Rotate clockwise for X amount of time", "Rotate counterclockwise for X amount of time" };
            int      rotateType = GetDropDownField.BuildField("Type:", actionParams, heroAction.actionFields[2], new GenericListField(choices));

            // rotate x number of degrees
            if (rotateType == 1)
            {
                GetIntegerField.BuildFieldA("Degrees to Rotate:", actionParams, heroAction.actionFields[3]);
            }

            // rotate clockwise / counterclockwise
            else if (rotateType == 2 || rotateType == 3)
            {
                GetIntegerField.BuildFieldA("Length of time (seconds):", actionParams, heroAction.actionFields[4]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Don't play next action until this action completes?", actionParams, heroAction.actionFields[5], true);
            SimpleLayout.EndVertical();
        }
Esempio n. 26
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Change a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetDropDownField.BuildField("Turn physics on or off:", actionParams, heroAction.actionFields[2], new OnOffField());
            SimpleLayout.EndVertical();
        }
Esempio n. 27
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 2);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            string[] items = { "heads", "tails" };
            GetDropDownField.BuildField("New value:", actionParams, heroAction.actionFields[0], new GenericListField(items));
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldB("Store result in this Integer:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();
        }
Esempio n. 28
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 9);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Get the hero objects to filter here:");
            GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[4]);
            SimpleLayout.Line();
            GetHeroObjectField.BuildFieldA("The hero object which has the field of view:", actionParams, heroAction.actionFields[3]);
            GetChildObjectField.BuildField("Is field of view coming from a child object?", actionParams, heroAction.actionFields[5], heroAction.actionFields[6], false, -20);
            SimpleLayout.Line();
            GetDropDownField.BuildField("Side of the hero object which has the field of view:", actionParams, heroAction.actionFields[7], new RayDirectionTypeField());
            GetIntegerField.BuildFieldA("Size of the field of view (in degrees):", actionParams, heroAction.actionFields[8]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Operation:");
            GetDropDownField.BuildField("", actionParams, heroAction.actionFields[0], new HeroObjectOperatorField());
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.Label("Save the hero objects here:");
            GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[1]);

            SimpleLayout.Label("Maximum number of hero objects to save:");
            GetIntegerField.BuildFieldA("", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
Esempio n. 29
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 24);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changePrintSettings = GetBoolValue.BuildField("Change print message settings?", actionParams, heroAction.actionFields[0], true);

            if (changePrintSettings)
            {
                bool printMessage = GetBoolValue.BuildField("Print message character by character?", actionParams, heroAction.actionFields[1], true);
                if (printMessage)
                {
                    GetSliderValue.BuildFieldB("Speed:", actionParams, heroAction.actionFields[2], 0, 100, true);
                }
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeAlignment = GetBoolValue.BuildField("Change alignment of message?", actionParams, heroAction.actionFields[3], true);

            if (changeAlignment)
            {
                string[] alignmentTypes = { "Top Left",    "Top Center",    "Top Right",
                                            "Middle Left", "Middle Center", "Middle Right",
                                            "Bottom Left", "Bottom Center", "Bottom Right", };
                GetDropDownField.BuildField("", actionParams, heroAction.actionFields[4], new GenericListField(alignmentTypes));
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeBackgroundSettings = GetBoolValue.BuildField("Change background alpha?", actionParams, heroAction.actionFields[5], true);

            if (changeBackgroundSettings)
            {
                GetSliderValue.BuildFieldB("", actionParams, heroAction.actionFields[6], 0, 100, true);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeBackgroundImage = GetBoolValue.BuildField("Change background image?", actionParams, heroAction.actionFields[7], true);

            if (changeBackgroundImage)
            {
                GetUnityObjectField.BuildFieldA <Sprite>("", actionParams, heroAction.actionFields[8]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeButtonImage = GetBoolValue.BuildField("Change button image?", actionParams, heroAction.actionFields[9], true);

            if (changeButtonImage)
            {
                GetUnityObjectField.BuildFieldA <Sprite>("", actionParams, heroAction.actionFields[10]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeButtonLayout = GetBoolValue.BuildField("Change button layout?", actionParams, heroAction.actionFields[11], true);

            if (changeButtonLayout)
            {
                string[] items = { "Horizontal", "Vertical" };
                GetDropDownField.BuildField("", actionParams, heroAction.actionFields[12], new GenericListField(items));
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeTextColor = GetBoolValue.BuildField("Change text body color?", actionParams, heroAction.actionFields[13], true);

            if (changeTextColor)
            {
                GetColorValue.BuildField("", actionParams, heroAction.actionFields[14]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeHeadingColor = GetBoolValue.BuildField("Change text heading color?", actionParams, heroAction.actionFields[15], true);

            if (changeHeadingColor)
            {
                GetColorValue.BuildField("", actionParams, heroAction.actionFields[16]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeButtonTextColor = GetBoolValue.BuildField("Change button text color?", actionParams, heroAction.actionFields[17], true);

            if (changeButtonTextColor)
            {
                GetColorValue.BuildField("", actionParams, heroAction.actionFields[18]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeButtonAlpha = GetBoolValue.BuildField("Change background button alpha?", actionParams, heroAction.actionFields[19], true);

            if (changeButtonAlpha)
            {
                GetSliderValue.BuildFieldB("", actionParams, heroAction.actionFields[20], 0, 100, true);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeButtonActiveColor = GetBoolValue.BuildField("Change selected button color?", actionParams, heroAction.actionFields[21], true);

            if (changeButtonActiveColor)
            {
                GetColorValue.BuildField("", actionParams, heroAction.actionFields[22]);
            }
            SimpleLayout.EndVertical();
        }
Esempio n. 30
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

            //-----------------------------------------
            // create the action fields if they don't exist
            //-----------------------------------------
            ActionCommon.CreateActionFieldsOnHeroObject(heroAction, 35);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------

            // title
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeTitle = GetBoolValue.BuildField("Change Title?", actionParams, heroAction.actionFields[0], true);

            if (changeTitle)
            {
                GetStringField.BuildFieldA("", actionParams, heroAction.actionFields[1]);
                bool changeAlignment = GetBoolValue.BuildField("Change Alignment?", actionParams, heroAction.actionFields[26], true);
                if (changeAlignment)
                {
                    string[] items = { "Left", "Center", "Right" };
                    GetDropDownField.BuildField("", actionParams, heroAction.actionFields[27], new GenericListField(items));
                }
            }
            SimpleLayout.EndVertical();

            // message
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetStringField.BuildFieldA("Message:", actionParams, heroAction.actionFields[2], false, true);
            GetUnityObjectField.BuildFieldA <AudioClip>("Audio (Optional):", actionParams, heroAction.actionFields[28]);
            SimpleLayout.EndVertical();

            // portrait left
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changePortraitLeft = GetBoolValue.BuildField("Change Portrait on Left?", actionParams, heroAction.actionFields[3], true);

            if (changePortraitLeft)
            {
                GetUnityObjectField.BuildFieldA <Sprite>("", actionParams, heroAction.actionFields[4]);
                GetBoolValue.BuildField("Flip image?", actionParams, heroAction.actionFields[5], true);
                bool changeScale = GetBoolValue.BuildField("Scale image? (By Percent)", actionParams, heroAction.actionFields[6], true);
                if (changeScale)
                {
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[7]);
                    SimpleLayout.EndVertical();
                }
                bool changePosX = GetBoolValue.BuildField("Change X Position?", actionParams, heroAction.actionFields[8], true);
                if (changePosX)
                {
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[9]);
                    SimpleLayout.EndVertical();
                }
                bool changePosY = GetBoolValue.BuildField("Change Y Position?", actionParams, heroAction.actionFields[10], true);
                if (changePosY)
                {
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[11]);
                    SimpleLayout.EndVertical();
                }
                bool changePosZ = GetBoolValue.BuildField("Put behind or in front of message window?", actionParams, heroAction.actionFields[31], true);
                if (changePosZ)
                {
                    string[] list = { "Put behind messsage window", "Put in front of message window" };
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetDropDownField.BuildField("", actionParams, heroAction.actionFields[32], new GenericListField(list));
                    SimpleLayout.EndVertical();
                }
            }
            SimpleLayout.EndVertical();

            // portrait right
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changePortraitRight = GetBoolValue.BuildField("Change Portrait on Right?", actionParams, heroAction.actionFields[12], true);

            if (changePortraitRight)
            {
                GetUnityObjectField.BuildFieldA <Sprite>("", actionParams, heroAction.actionFields[13]);
                GetBoolValue.BuildField("Flip image?", actionParams, heroAction.actionFields[14], true);
                bool changeScale = GetBoolValue.BuildField("Scale image? (By Percent)", actionParams, heroAction.actionFields[15], true);
                if (changeScale)
                {
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[16]);
                    SimpleLayout.EndVertical();
                }
                bool changePosX = GetBoolValue.BuildField("Change X Position?", actionParams, heroAction.actionFields[17], true);
                if (changePosX)
                {
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[18]);
                    SimpleLayout.EndVertical();
                }
                bool changePosY = GetBoolValue.BuildField("Change Y Position?", actionParams, heroAction.actionFields[19], true);
                if (changePosY)
                {
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[20]);
                    SimpleLayout.EndVertical();
                }
                bool changePosZ = GetBoolValue.BuildField("Put behind or in front of message window?", actionParams, heroAction.actionFields[33], true);
                if (changePosZ)
                {
                    string[] list = { "Put behind messsage window", "Put in front of message window" };
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    GetDropDownField.BuildField("", actionParams, heroAction.actionFields[34], new GenericListField(list));
                    SimpleLayout.EndVertical();
                }
            }
            SimpleLayout.EndVertical();

            // choices
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool addChoices = GetBoolValue.BuildField("Add Choices?", actionParams, heroAction.actionFields[21], true);

            if (addChoices)
            {
                string[] items  = { "One", "Two", "Three" };
                int      result = GetDropDownField.BuildField("", actionParams, heroAction.actionFields[22], new GenericListField(items));

                if (result > 0)
                {
                    GetStringField.BuildFieldA("", actionParams, heroAction.actionFields[23], true);
                }
                if (result > 1)
                {
                    GetStringField.BuildFieldA("", actionParams, heroAction.actionFields[24], true);
                }
                if (result > 2)
                {
                    GetStringField.BuildFieldA("", actionParams, heroAction.actionFields[25], true);
                }

                GetIntegerField.BuildFieldB("Save player's choice here:", actionParams, heroAction.actionFields[29]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Keep message window open after message is closed?", actionParams, heroAction.actionFields[30], true);
            SimpleLayout.EndVertical();
        }