예제 #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();
        }
        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();
        }
예제 #3
0
        public static void BuildField(HeroActionParams actionParams)
        {
            HeroAction heroAction = actionParams.heroAction;

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

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

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

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

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

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

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

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

            SimpleLayout.EndVertical();

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldA("Movement time: (ex: 1=fast, 100=slow)", actionParams, heroAction.actionFields[10]);
            SimpleLayout.EndVertical();
        }
예제 #4
0
        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);
            bool useDifferent = GetBoolValue.BuildField("Play particle effect on a different object?", actionParams, heroAction.actionFields[0], true);

            if (useDifferent)
            {
                SimpleLayout.Line();
                GetSceneObjectValue.BuildField("particle effect", actionParams, heroAction.actionFields[1], 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();
        }
        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();
        }
예제 #6
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);
            GetSceneObjectValue.BuildField("canvas", actionParams, heroAction.actionFields[0], heroAction.actionFields[1]);
            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, 3);

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

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetIntegerField.BuildFieldB("Save the value in the slider here:", actionParams, heroAction.actionFields[2]);
            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, 3);

            //-----------------------------------------
            // create the fields for this action
            //-----------------------------------------
            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            bool useDifferent = GetBoolValue.BuildField("Stop particle effect on a different object?", actionParams, heroAction.actionFields[0], true);

            if (useDifferent)
            {
                SimpleLayout.Line();
                GetSceneObjectValue.BuildField("particle effect", actionParams, heroAction.actionFields[1], heroAction.actionFields[2]);
            }
            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, 5);

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

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

            SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
            GetSliderValue.BuildFieldB("The new alpha for the canvas:", actionParams, heroAction.actionFields[2]);
            GetIntegerField.BuildFieldA("Duration:", actionParams, heroAction.actionFields[3]);
            GetBoolValue.BuildField("Don't play next action until this action completes?", actionParams, heroAction.actionFields[4], true);
            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, 8);

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

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

            if (changeX)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[3]);
            }
            bool changeY = GetBoolValue.BuildField("Save Y Angle?", actionParams, heroAction.actionFields[4], true);

            if (changeY)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[5]);
            }
            bool changeZ = GetBoolValue.BuildField("Save Z Angle?", actionParams, heroAction.actionFields[6], true);

            if (changeZ)
            {
                GetFloatField.BuildFieldB("", actionParams, heroAction.actionFields[7]);
            }
            SimpleLayout.EndVertical();
        }
예제 #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);
            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();
        }