示例#1
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();
        }
示例#2
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("Sink a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldA("Length of time to sink:", actionParams, heroAction.actionFields[2]);
            GetFloatField.BuildFieldA("Force of the sink:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Play next action before this action completes?", actionParams, heroAction.actionFields[4], true);
            SimpleLayout.EndVertical();
        }
        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("Animate a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);

            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeBegin = GetBoolValue.BuildField("Change jump begin animation?", actionParams, heroAction.actionFields[2], true);

            if (changeBegin)
            {
                ActionCommon.GetAnimation("The animation to show when jump begins:", actionParams, heroAction.actionFields[3], heroAction.actionFields[4], heroAction.actionFields[5], AnimatorControllerParameterType.Trigger, targetHeroObject);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeEnd = GetBoolValue.BuildField("Change jump end animation?", actionParams, heroAction.actionFields[6], true);

            if (changeEnd)
            {
                ActionCommon.GetAnimation("The animation to show when jump ends:", actionParams, heroAction.actionFields[7], heroAction.actionFields[8], heroAction.actionFields[9], AnimatorControllerParameterType.Trigger, targetHeroObject);
            }
            SimpleLayout.EndVertical();
        }
        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();
        }
示例#5
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);
            HeroObject targetObject = GetHeroObjectField.BuildFieldE("Work with an event on a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);

            SimpleLayout.EndVertical();

            // Field: Event
            if (targetObject != null)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                GetEventField.BuildField("", actionParams, heroAction.actionFields[2], targetObject);
                SimpleLayout.EndVertical();
            }
        }
示例#6
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();
        }
示例#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);
            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 changeLayers = GetBoolValue.BuildField("Object can only jump on things in specific layers?", actionParams, heroAction.actionFields[2], true);

            if (changeLayers)
            {
                GetLayerMaskValue.BuildField("", actionParams, heroAction.actionFields[3]);
            }
            SimpleLayout.EndVertical();
        }
示例#8
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("The script with the property is on a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            MonoScript script = GetUnityObjectField.BuildFieldA <MonoScript>("The script on the hero object:", actionParams, heroAction.actionFields[2]);

            // select the property to change
            if (script != null)
            {
                GetPropertyField.BuildFieldC("The property in the script to save on the hero object:", actionParams, heroAction.actionFields[3], heroAction.actionFields[4], script);
            }
            SimpleLayout.EndVertical();
        }
示例#9
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("Rotate a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Speed:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
示例#10
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);
            HeroObject targetObject = GetHeroObjectField.BuildFieldE("Update a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);

            SimpleLayout.EndVertical();

            if (targetObject != null)
            {
                ActionCommon.GetAnimation("", actionParams, heroAction.actionFields[2], heroAction.actionFields[3], heroAction.actionFields[4], AnimatorControllerParameterType.Int, targetObject);

                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                GetIntegerField.BuildFieldA("New value for the integer:", actionParams, heroAction.actionFields[5]);
                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();
        }
        public static void BuildField(HeroActionParams actionParams)
        {
            //--------------------------------------------------
            // HOW TO MODIFY FOR YOUR OWN ACTION
            // 1. Change the name of the class from HeroActionTemplateField to the name of your hero action field (ex. GetRayField).
            // 2. In section A, replace the 4 with the number of action fields your form is going to need. (if you don't know, use a large number and then change it when your form is complete.)
            // 3. In section B, delete the sample form fields and add your own.
            //--------------------------------------------------

            HeroAction heroAction = actionParams.heroAction;

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

            //-----------------------------------------
            // SECTION B (create the fields for this action)
            //-----------------------------------------

            // Sample form field 1 (requires two action fields)
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Work with a different hero object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // Sample form field 2 (requires one action field)
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolField.BuildFieldB("Change this bool:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            // Sample form field 3 (requires one action field)
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolField.BuildFieldA("To this value:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
示例#13
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

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

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldE("Play audio on another object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[4]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetUnityObjectField.BuildFieldA <AudioClip>("The sound effect to play:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Fade BGM while sound effect plays?", actionParams, heroAction.actionFields[2], true);
            GetBoolValue.BuildField("Fade BGS while sound effect plays?", actionParams, heroAction.actionFields[3], true);
            SimpleLayout.EndVertical();

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

            if (changeSettings)
            {
                // this takes 11 action fields. actionField[x] to actionField[x+11]
                ActionCommon.GetAudioSettings(actionParams, heroAction, 6);
            }
            SimpleLayout.EndVertical();
        }
        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();
        }
示例#15
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();
        }
示例#16
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
            //-----------------------------------------
            GetHeroObjectField.BuildFieldE("Change move settings for a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
        }
        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();
        }
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

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

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetUnityObjectField.BuildFieldA <ParticleSystem>("The particle effect to play (attach prefab):", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

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

            if (changePos)
            {
                GetCoordinatesField.BuildField("", actionParams,
                                               heroAction.actionFields[4], heroAction.actionFields[5],
                                               heroAction.actionFields[6], heroAction.actionFields[7],
                                               heroAction.actionFields[8], heroAction.actionFields[9]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeRotation = GetBoolValue.BuildField("Change rotation?", actionParams, heroAction.actionFields[10], true);

            if (changeRotation)
            {
                GetCoordinatesField.BuildField("", actionParams,
                                               heroAction.actionFields[11], heroAction.actionFields[12],
                                               heroAction.actionFields[13], heroAction.actionFields[14],
                                               heroAction.actionFields[15], heroAction.actionFields[16]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Don't play next action until this action completes?", actionParams, heroAction.actionFields[17], true);
            SimpleLayout.EndVertical();
        }
示例#19
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);
            GetHeroObjectField.BuildFieldE("Change move settings for a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();
        }
示例#20
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

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

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

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

            // add class
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            MonoScript script = GetUnityObjectField.BuildFieldA <MonoScript>("The script on the hero object:", actionParams, heroAction.actionFields[2]);

            SimpleLayout.EndVertical();

            // add method
            if (script != null)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                SimpleLayout.Label("The method to call in the script:");
                MethodInfo method = GetMethodField.BuildFieldA(script, "", actionParams, heroAction.actionFields[3]);
                SimpleLayout.EndVertical();

                if (method != null)
                {
                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    // add parameters (up to 15)
                    GetParameterField.BuildFieldA("Parameters to pass into the method:", actionParams, heroAction.actionFields[4], 5, 19, method, heroAction);
                    SimpleLayout.EndVertical();

                    SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                    // add return value (1)
                    GetParameterField.BuildFieldB("Return value to save on the hero object:", actionParams, heroAction.actionFields[20], heroAction.actionFields[21], method);
                    SimpleLayout.EndVertical();
                }
            }
        }
示例#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();
        }
        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("Get game object on a different hero object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            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)
            {
                GetStringField.BuildFieldA("", actionParams, heroAction.actionFields[3], true);
            }

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

            if (useTag)
            {
                GetTagField.BuildField("", actionParams, heroAction.actionFields[5], true);
            }

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

            if (useLayer)
            {
                GetDropDownField.BuildField("", actionParams, heroAction.actionFields[7], new LayerListField(), true);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetGameObjectField.BuildFieldB("Save the child game object here:", actionParams, heroAction.actionFields[8]);
            SimpleLayout.EndVertical();
        }
示例#23
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);
            HeroObject targetHeroObject = GetHeroObjectField.BuildFieldE("Animate another hero object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);

            SimpleLayout.EndVertical();

            ActionCommon.GetAnimation("", actionParams, heroAction.actionFields[2], heroAction.actionFields[3], heroAction.actionFields[4], AnimatorControllerParameterType.Bool, targetHeroObject);
        }
示例#24
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();
        }
示例#25
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();
            }
        }
示例#26
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);
            GetHeroObjectField.BuildFieldE("Change position of a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool changeX = GetBoolValue.BuildField("Change X Pos?", actionParams, heroAction.actionFields[4], true);

            if (changeX)
            {
                GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[5]);
            }
            bool changeY = GetBoolValue.BuildField("Change Y Pos?", actionParams, heroAction.actionFields[6], true);

            if (changeY)
            {
                GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[7]);
            }
            bool changeZ = GetBoolValue.BuildField("Change Z Pos?", actionParams, heroAction.actionFields[8], true);

            if (changeZ)
            {
                GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[9]);
            }
            SimpleLayout.EndVertical();
        }
示例#27
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();
        }
示例#28
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("Move a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetSliderValue.BuildFieldB("Direction (Degrees 0 to 360):", actionParams, heroAction.actionFields[2], 0, 360);
            SimpleLayout.EndVertical();
        }
        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 move settings for a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetLayerMaskValue.BuildField("Stop object if it collides with something on one of these layers:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
示例#30
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);
            HeroObject targetObject = GetHeroObjectField.BuildFieldE("Animate a different object?", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);

            SimpleLayout.EndVertical();

            if (targetObject != null)
            {
                ActionCommon.GetAnimation_Legacy("", actionParams, heroAction.actionFields[2], heroAction.actionFields[3], heroAction.actionFields[4], targetObject);
            }
        }