Exemplo 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, 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();
        }
Exemplo 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, 5);

            //-----------------------------------------
            // 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);
            GetChildObjectField.BuildField("Rotate a child object?", actionParams, heroAction.actionFields[2], heroAction.actionFields[3]);
            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Rotate by X degrees:", actionParams, heroAction.actionFields[4]);
            SimpleLayout.EndVertical();
        }
Exemplo 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, 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();
        }
Exemplo 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, 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();
        }
Exemplo 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);
            GetSceneObjectValue.BuildField("component", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            SimpleLayout.EndVertical();

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetStringField.BuildFieldA("Name of component:", actionParams, heroAction.actionFields[4]);
            SimpleLayout.EndVertical();
        }
Exemplo 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, 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();
        }