Ejemplo n.º 1
0
        /// <summary>
        /// Get X, Y, Z coordinates.
        /// </summary>
        /// <param name="title">Title for action field.</param>
        /// <param name="actionParams">Action field parameters.</param>
        /// <param name="actionFieldA">Action field parameters.</param>
        /// <param name="actionFieldB">Action field parameters.</param>
        /// <param name="actionFieldC">Action field parameters.</param>
        /// <param name="actionFieldD">Action field parameters.</param>
        /// <param name="actionFieldE">Action field parameters.</param>
        /// <param name="actionFieldF">Action field parameters.</param>
        /// <param name="titleToLeft">Show the title on the left?</param>
        public static void BuildField(string title, HeroActionParams actionParams, HeroActionField actionFieldA, HeroActionField actionFieldB, HeroActionField actionFieldC, HeroActionField actionFieldD, HeroActionField actionFieldE, HeroActionField actionFieldF, bool titleToLeft = false)
        {
            if (title != "")
            {
                SimpleLayout.Label(title);
            }

            bool changeX = GetBoolValue.BuildField("X:", actionParams, actionFieldA, true);

            if (changeX)
            {
                GetFloatField.BuildFieldA("", actionParams, actionFieldB);
            }
            bool changeY = GetBoolValue.BuildField("Y:", actionParams, actionFieldC, true);

            if (changeY)
            {
                GetFloatField.BuildFieldA("", actionParams, actionFieldD);
            }
            bool changeZ = GetBoolValue.BuildField("Z:", actionParams, actionFieldE, true);

            if (changeZ)
            {
                GetFloatField.BuildFieldA("", actionParams, actionFieldF);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Get a value from a hero object. Use this hero object by default, but let developer select another hero object.
        /// If another hero object is selected, you can get with a Value, Variable, Property, or Global.
        /// </summary>
        /// <param name="title">Title for the action field.</param>
        /// <param name="actionParams">Action field parameters.</param>
        /// <param name="actionFieldA">Action field.</param>
        /// <param name="actionFieldB">Action field.</param>
        /// <returns>A hero object.</returns>
        public static HeroObject BuildFieldE(string title, HeroActionParams actionParams, HeroActionField actionFieldA, HeroActionField actionFieldB)
        {
            bool       useAnotherObject = GetBoolValue.BuildField(title, actionParams, actionFieldA, true);
            HeroObject targetHeroObject = useAnotherObject ? BuildFieldA("", actionParams, actionFieldB) : actionParams.heroObject;

            return(targetHeroObject);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Get a child game object.
        /// </summary>
        /// <param name="title">Title for action field.</param>
        /// <param name="actionParams">Action field parameters.</param>
        /// <param name="actionFieldA">Action field parameters.</param>
        /// <param name="actionFieldB">Action field parameters.</param>
        /// <param name="titleToLeft">Show the title on the left?</param>
        public static void BuildField(string title, HeroActionParams actionParams, HeroActionField actionFieldA, HeroActionField actionFieldB, bool titleToLeft = false, int rightOffset = 0)
        {
            bool useChild = GetBoolValue.BuildField(title, actionParams, actionFieldA, true);

            if (useChild)
            {
                GetStringField.BuildFieldA("Name of the child object:", actionParams, actionFieldB, titleToLeft, false, rightOffset);
            }
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Get the camera to use.
        /// </summary>
        /// <param name="title">Title for action field.</param>
        /// <param name="actionParams">Action field parameters.</param>
        /// <param name="actionFieldA">Action field parameters.</param>
        /// <param name="actionFieldB">Action field parameters.</param>
        public static void BuildField(string title, HeroActionParams actionParams, HeroActionField actionFieldA, HeroActionField actionFieldB)
        {
            //-----------------------------------------
            // Display this title above the field
            //-----------------------------------------
            if (title != "")
            {
                SimpleLayout.Label(title);
            }

            //-----------------------------------------
            // Display the fields
            //-----------------------------------------
            bool customCamera = GetBoolValue.BuildField("Use a specific camera that is not the main camera?", actionParams, actionFieldA, true);

            if (customCamera)
            {
                SimpleLayout.BeginVertical(SimpleGUI.Fields.Box.StyleB);
                GetHeroObjectField.BuildFieldA("The camera is on this hero object:", actionParams, actionFieldB);
                SimpleLayout.EndVertical();
            }
        }