Ejemplo n.º 1
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();
        }
Ejemplo 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
            //-----------------------------------------

            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();
        }
        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();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 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();
        }
Ejemplo n.º 7
0
        /// <summary>
        /// Draw item type
        /// </summary>
        private static void DrawTarget2()
        {
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.BeginHorizontal();
            SimpleLayout.Label("Uses Ammunition" + ":");
            boolFields[3].value = SimpleLayout.BoolField(boolFields[3].value);
            SimpleLayout.Space();
            SimpleLayout.EndHorizontal();

            if (boolFields[3].value)
            {
                SimpleLayout.Space(5);
                SimpleLayout.Line();

                // item type field
                string[]       items    = { "Another Character", "Caster" };
                DropDownValues itemList = new DropDownValues();
                itemList.setValues("", items);

                SimpleLayout.BeginHorizontal();
                intFields[1].value = SimpleLayout.DropDownList(intFields[1].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200));
                SimpleLayout.Label("Target");
                SimpleLayout.Space();
                SimpleLayout.EndHorizontal();

                SimpleLayout.BeginHorizontal();
                intFields[17].value = SimpleLayout.IntField(intFields[17].value);
                SimpleLayout.Label("Range (in meters)");
                SimpleLayout.Space();
                SimpleLayout.EndHorizontal();
            }

            SimpleLayout.EndVertical();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 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();
        }
Ejemplo n.º 10
0
        /// <summary>
        /// Fields for the hero property (strings).
        /// </summary>
        private static void DrawStrings()
        {
            List <StringField> items = propertyBlock.itemProperties.strings.items;

            // exit early if there are no values
            if (items == null || items.Count == 0)
            {
                return;
            }

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            for (int i = 0; i < items.Count; i++)
            {
                SimpleLayout.Label(items[i].name + ":");
                if (!items[i].useTextField)
                {
                    items[i].value = SimpleLayout.TextField(items[i].value, HeroKitCommon.GetWidthForField(60, 150));
                }
                else
                {
                    items[i].value = SimpleLayout.TextArea(items[i].value, HeroKitCommon.GetWidthForField(60, 150));
                }
            }
            SimpleLayout.EndVertical();
        }
Ejemplo 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
            //-----------------------------------------

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

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

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Amount of time to shake the camera:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
Ejemplo n.º 12
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();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            HeroObject targetHO = GetHeroObjectField.BuildFieldC("Get string from this hero object template:", actionParams, heroAction.actionFields[0]);

            if (targetHO != null)
            {
                GetStringField.BuildFieldC("The string:", actionParams, heroAction.actionFields[1], targetHO);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetStringField.BuildFieldB("Save the string here:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 3);

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

            // Field: bottom value
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Lowest value:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            // Field: top value
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Highest value:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // Field: save result here
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldB("Save result here:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
Ejemplo 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, 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();
        }
Ejemplo n.º 20
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);
            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);
            GetFloatField.BuildFieldA("New X Pos:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetFloatField.BuildFieldA("New Y Pos:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Don't play next action until this action completes?", actionParams, heroAction.actionFields[4], true);
            SimpleLayout.EndVertical();
        }
Ejemplo n.º 21
0
        /// <summary>
        /// Draw exp meter
        /// </summary>
        private static void DrawExpMeter()
        {
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);

            SimpleLayout.BeginHorizontal();
            boolFields[6].value = SimpleLayout.BoolField(boolFields[6].value);
            SimpleLayout.Label("Ability has Experience Meter");
            SimpleLayout.Space();
            SimpleLayout.EndHorizontal();

            if (boolFields[6].value)
            {
                SimpleLayout.BeginHorizontal();
                intFields[11].value = SimpleLayout.IntField(intFields[11].value);
                SimpleLayout.Label("Experience gained per use of this ability");
                SimpleLayout.Space();
                SimpleLayout.EndHorizontal();

                SimpleLayout.BeginHorizontal();
                intFields[10].value = SimpleLayout.IntField(intFields[10].value);
                SimpleLayout.Label("Experience needed to morph ability");
                SimpleLayout.Space();
                SimpleLayout.EndHorizontal();

                DropDownValues itemList = HeroKitCommon.databaseList(HeroKitCommon.abilityDatabase);
                SimpleLayout.BeginHorizontal();
                intFields[12].value = SimpleLayout.DropDownList(intFields[12].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 250));
                SimpleLayout.Label("Morph into...");
                SimpleLayout.Space();
                SimpleLayout.EndHorizontal();
            }

            SimpleLayout.EndVertical();
        }
Ejemplo 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, 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();
        }
Ejemplo n.º 23
0
        /// <summary>
        /// Draw item type
        /// </summary>
        private static void DrawUsesAmmo()
        {
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            SimpleLayout.BeginHorizontal();
            SimpleLayout.Label("Uses Ammunition" + ":");
            boolFields[3].value = SimpleLayout.BoolField(boolFields[3].value);
            SimpleLayout.Space();
            SimpleLayout.EndHorizontal();

            if (boolFields[3].value)
            {
                SimpleLayout.Space(5);
                SimpleLayout.Line();

                // item type field
                DropDownValues itemList = HeroKitCommon.databaseList(HeroKitCommon.ammunitionTypeDatabase);

                SimpleLayout.BeginHorizontal();
                intFields[2].value = SimpleLayout.DropDownList(intFields[2].value, itemList, 0, HeroKit.Editor.HeroKitCommon.GetWidthForField(60, 200));
                SimpleLayout.Label("Ammunition type");
                SimpleLayout.Space();
                SimpleLayout.EndHorizontal();

                SimpleLayout.BeginHorizontal();
                intFields[3].value = SimpleLayout.IntField(intFields[3].value);
                SimpleLayout.Label("Range (in meters)");
                SimpleLayout.Space();
                SimpleLayout.EndHorizontal();
            }

            SimpleLayout.EndVertical();
        }
Ejemplo 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, 3);

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetObjectValue.BuildField <TextAsset>("The CSV file to localize:", actionParams, heroAction.actionFields[0], false);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool localizeAudio = GetBoolValue.BuildField("Localize audio in messages? (If yes, enter path)", actionParams, heroAction.actionFields[1], true);

            if (localizeAudio)
            {
                GetStringField.BuildFieldA("", actionParams, heroAction.actionFields[2]);
            }
            SimpleLayout.EndVertical();
        }
Ejemplo 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, 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();
        }
Ejemplo 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, 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();
        }
Ejemplo n.º 27
0
 private static void DrawBody()
 {
     // draw all fields
     SimpleLayout.BeginVertical(Box.StyleCanvasBox);
     DrawItemFields();
     SimpleLayout.EndVertical();
 }
Ejemplo 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, 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();
            }
        }
Ejemplo n.º 29
0
        /// <summary>
        /// Draw the body of the block.
        /// </summary>
        private static void DrawItems()
        {
            // exit early if there are no items
            if (items == null || items.Count == 0)
            {
                HeroKitCommon.DrawNoItemsInList(blockName);
                return;
            }

            SimpleLayout.BeginVertical(Box.StyleCanvasBox);

            // display items (move up, move down, int field,
            for (int i = 0; i < items.Count; i++)
            {
                SimpleLayout.BeginHorizontal();
                HeroKitCommon.DrawListArrows(moveItemUp, moveItemDown, i);

                items[i].value = SimpleLayout.BoolListField(items[i], i);
                items[i].name  = SimpleLayout.StringListField(items[i].name, HeroKitCommon.GetWidthForField(289));

                HeroKitCommon.DrawListButtons(addItem, copyItem, pasteItem, deleteItem, i);
                SimpleLayout.EndHorizontal();

                if (i != items.Count - 1)
                {
                    SimpleLayout.Line();
                }
            }

            SimpleLayout.EndVertical();

            SimpleLayout.Space(20);
        }
        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);
            GetSceneObjectValue.BuildField("Hero Kit Listener", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool getItemID = GetBoolValue.BuildField("Get Item ID (Int)?", actionParams, heroAction.actionFields[2], true);

            if (getItemID)
            {
                GetIntegerField.BuildFieldB("", actionParams, heroAction.actionFields[3]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool getItem = GetBoolValue.BuildField("Get Item (Hero Object)?", actionParams, heroAction.actionFields[4], true);

            if (getItem)
            {
                GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[5]);
            }
            SimpleLayout.EndVertical();
        }