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, 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.º 2
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.º 3
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);
            SimpleLayout.Label("Get the hero objects here:");
            GetHeroObjectField.BuildFieldB("", actionParams, heroAction.actionFields[4]);

            SimpleLayout.Label("Get hero objects in the list that are in the trigger area of this hero object:");
            GetHeroObjectField.BuildFieldA("", actionParams, heroAction.actionFields[3]);
            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.º 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
            //-----------------------------------------

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

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

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

            // Field: Integer B
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldA("this hero object:", actionParams, heroAction.actionFields[3]);
            SimpleLayout.EndVertical();
        }
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, 12);

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

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldA("The Hero Object to follow:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();


            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool customSettings = GetBoolValue.BuildField("Change default values?", actionParams, heroAction.actionFields[2], true);

            if (customSettings)
            {
                // change smoothness of follow
                bool changeSmoothing = GetBoolValue.BuildField("Change smoothness of follow?", actionParams, heroAction.actionFields[3], true);
                if (changeSmoothing)
                {
                    GetIntegerField.BuildFieldA("", actionParams, heroAction.actionFields[4]);
                }

                // change z position
                bool changeZPos = GetBoolValue.BuildField("Change Z position (ex: -1=behind object, 1=in front of object)", actionParams, heroAction.actionFields[5], true);
                if (changeZPos)
                {
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[6]);
                }

                // change y position
                bool changeYPos = GetBoolValue.BuildField("Change Y position (ex: -1=under object, 1=above object)", actionParams, heroAction.actionFields[7], true);
                if (changeYPos)
                {
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[8]);
                }

                // change angle
                bool changeAngle = GetBoolValue.BuildField("Change angle (ex: 45=slanted down, -45=slanted up)", actionParams, heroAction.actionFields[9], true);
                if (changeAngle)
                {
                    GetFloatField.BuildFieldA("", actionParams, heroAction.actionFields[10]);
                }
            }

            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, 10);

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

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

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

            SimpleLayout.EndVertical();

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

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

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

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

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

            // get the prefab
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetPrefabValue.BuildField("Prefab:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            // get the menu
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetGameObjectField.BuildFieldA("Parent Game Object:", actionParams, heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

            // how many instances do we need?
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("How many duplicates do we need?", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();

            //// should we allow these instances to be saved?
            //SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleA1);
            //GetBoolValue.BuildField("Allow these items to be saved?", actionParams, heroAction.actionField[6], true);
            //SimpleLayout.EndVertical();

            // increment item id?
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetBoolValue.BuildField("Increment Item ID on Hero Kit Listener?", actionParams, heroAction.actionFields[3], true);
            SimpleLayout.EndVertical();

            // where to send notifications
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            HeroObject targetObject = GetHeroObjectField.BuildFieldA("Send notifications to this hero object:", actionParams, heroAction.actionFields[4]);

            if (targetObject != null)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                GetEventField.BuildField("", actionParams, heroAction.actionFields[5], targetObject);
                SimpleLayout.EndVertical();
            }
            SimpleLayout.EndVertical();
        }
        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);
            GetSceneObjectValue.BuildField("Hero Kit Listener", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

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

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool setItem = GetBoolValue.BuildField("Set Item?", actionParams, heroAction.actionFields[9], true);

            if (setItem)
            {
                GetHeroObjectField.BuildFieldC("", actionParams, heroAction.actionFields[10]);
            }
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            HeroObject targetObject = null;
            bool       setNotify    = GetBoolValue.BuildField("Set object to receive notifications and the event to play?", actionParams, heroAction.actionFields[6], true);

            if (setNotify)
            {
                targetObject = GetHeroObjectField.BuildFieldA("", actionParams, heroAction.actionFields[7]);
                if (targetObject != null)
                {
                    GetEventField.BuildField("", actionParams, heroAction.actionFields[8], targetObject);
                }
            }
            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, 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);
            GetHeroObjectField.BuildFieldA("Move toward this object:", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }
Ejemplo n.º 10
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

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

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldB("The hero object to change:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldA("Change it to:", actionParams, heroAction.actionFields[1]);
            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, 7);

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

            // assign values in the hero kit object
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetHeroObjectField.BuildFieldC("Item to add:", actionParams, heroAction.actionFields[0]);
            SimpleLayout.EndVertical();

            // assign values in the hero kit object
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool addMultiple = GetBoolValue.BuildField("Add more than one item?", actionParams, heroAction.actionFields[1], true);

            if (addMultiple)
            {
                GetIntegerField.BuildFieldA("", actionParams, heroAction.actionFields[2]);
            }
            SimpleLayout.EndVertical();

            // where to send notifications
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            HeroObject targetObject = GetHeroObjectField.BuildFieldA("If item used, send notifications to this hero object:", actionParams, heroAction.actionFields[3]);

            if (targetObject != null)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleC);
                GetEventField.BuildField("", actionParams, heroAction.actionFields[4], targetObject);
                SimpleLayout.EndVertical();
            }
            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, 9);

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

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

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

            SimpleLayout.Label("Maximum number of hero objects to save:");
            GetIntegerField.BuildFieldA("", actionParams, heroAction.actionFields[2]);
            SimpleLayout.EndVertical();
        }