Esempio n. 1
0
        public AssemblePartTypePresetData(int typeModelID)
        {
            _partsTypeMeta = AssembleModule.GetAssemblePartTypeByKey(typeModelID);

            if (_partsTypeMeta != null)
            {
                ModelPath = _partsTypeMeta.ModelPath;
                TypeID    = _partsTypeMeta.TypeID;
            }
            partsPropertyConfig = AssembleModule.GetPartsPropertyConfigData(typeModelID);
        }
Esempio n. 2
0
        /// <summary>
        /// 获取部件属性配置信息
        /// </summary>
        /// <param name="partID"></param>
        /// <returns></returns>
        public static Config.PartsPropertyConfig GetPartsPropertyConfigData(int typeModelID)
        {
            Config.PartsPropertyConfig config = null;
            var typeMeta = GetAssemblePartTypeByKey(typeModelID);

            if (typeMeta != null)
            {
                config = Config.ConfigData.AssemblePartsConfigData.partsPropertyConfig.Find(x => x.configName == typeMeta.PropertyConfig);
            }
            if (config == null)
            {
                Debug.LogError("GetPartsPropertyConfigData Error!  typeModelID=" + typeModelID);
            }
            return(config);
        }