RegisterType() публичный статический Метод

Registers that 'resourceType' uses 'resource' so that it can later be queried by CraftResources.GetFromType
public static RegisterType ( Type resourceType, CraftResource resource ) : void
resourceType System.Type
resource CraftResource
Результат void
Пример #1
0
        public CraftResourceInfo(int hue, string name, CraftAttributeInfo attributeInfo, CraftResource resource, params Type[] resourceTypes)
        {
            m_Hue           = hue;
            m_Name          = name;
            m_AttributeInfo = attributeInfo;
            m_Resource      = resource;
            m_ResourceTypes = resourceTypes;

            for (int i = 0; i < resourceTypes.Length; ++i)
            {
                CraftResources.RegisterType(resourceTypes[i], resource);
            }
        }
Пример #2
0
        public CraftResourceInfo(int hue, int number, string name, CraftResource resource, params Type[] resourceTypes)
        {
            m_Hue           = hue;
            m_Number        = number;
            m_Name          = name;
            m_Resource      = resource;
            m_ResourceTypes = resourceTypes;

            for (int i = 0; i < resourceTypes.Length; ++i)
            {
                CraftResources.RegisterType(resourceTypes[i], resource);
            }
        }
Пример #3
0
        public CraftResourceInfo(int hue, int number, string name, CraftAttributeInfo attributeInfo, CraftResource resource, params Type[] resourceTypes)
        {
            Hue           = hue;
            Number        = number;
            Name          = name;
            AttributeInfo = attributeInfo;
            Resource      = resource;
            ResourceTypes = resourceTypes;

            for (int i = 0; i < resourceTypes.Length; ++i)
            {
                CraftResources.RegisterType(resourceTypes[i], resource);
            }
        }
Пример #4
0
        public CraftResourceInfo(int hue, string name,
                                 CraftResource resource, Dictionary <Type, int> enchantments, double quality, double craftSkillRequired,
                                 params Type[] resourceTypes)
        {
            Hue                = hue;
            Name               = name;
            Resource           = resource;
            Enchantments       = enchantments;
            Quality            = quality;
            CraftSkillRequired = craftSkillRequired;
            ResourceTypes      = resourceTypes;

            foreach (var t in resourceTypes)
            {
                CraftResources.RegisterType(t, resource);
            }
        }
Пример #5
0
        public CraftResourceInfo(
            int hue,
            int number,
            string name,
            CraftAttributeInfo attributeInfo,
            CraftResource resource,
            params Type[] resourceTypes)
        {
            Hue           = hue;
            Number        = number;
            Name          = name;
            AttributeInfo = attributeInfo;
            Resource      = resource;
            ResourceTypes = resourceTypes;

            foreach (Type t in resourceTypes)
            {
                CraftResources.RegisterType(t, resource);
            }
        }