Ejemplo n.º 1
0
        /**
         * <summary>Creates a new instance of the 'Object: Highlight' Action, set to highlight an inventory item</summary>
         * <param name = "itemIDToAffect">The ID number of the inventory item held by the player</param>
         * <param name = "highlightType">What type of highlighting effect to perform</param>
         * <param name = "isInstant">If True, then the effect will be performed instantly</param>
         * <returns>The generated Action</returns>
         */
        public static ActionHighlight CreateNew_InventoryItem(int itemIDToAffect, HighlightType highlightType, bool isInstant = false)
        {
            ActionHighlight newAction = (ActionHighlight)CreateInstance <ActionHighlight>();

            newAction.whatToHighlight = WhatToHighlight.InventoryItem;
            newAction.invID           = itemIDToAffect;
            newAction.highlightType   = highlightType;
            newAction.isInstant       = isInstant;
            return(newAction);
        }
Ejemplo n.º 2
0
        /**
         * <summary>Creates a new instance of the 'Object: Highlight' Action, set to highlight an object in the scene</summary>
         * <param name = "objectToAffect">The Highlight component to affect</param>
         * <param name = "highlightType">What type of highlighting effect to perform</param>
         * <param name = "isInstant">If True, then the effect will be performed instantly</param>
         * <returns>The generated Action</returns>
         */
        public static ActionHighlight CreateNew_SceneObject(Highlight objectToAffect, HighlightType highlightType, bool isInstant = false)
        {
            ActionHighlight newAction = (ActionHighlight)CreateInstance <ActionHighlight>();

            newAction.whatToHighlight = WhatToHighlight.SceneObject;
            newAction.highlightObject = objectToAffect;
            newAction.highlightType   = highlightType;
            newAction.isInstant       = isInstant;
            return(newAction);
        }