Autoload() 공개 메소드

public Autoload ( string &name, string &texture, string>.IDictionary extraTextures ) : bool
name string
texture string
extraTextures string>.IDictionary
리턴 bool
예제 #1
0
        private void AutoloadMountData(Type type)
        {
            ModMountData mount = (ModMountData)Activator.CreateInstance(type);

            mount.mod = this;
            string name          = type.Name;
            string texture       = (type.Namespace + "." + type.Name).Replace('.', '/');
            var    extraTextures = new Dictionary <MountTextureType, string>();

            foreach (MountTextureType textureType in Enum.GetValues(typeof(MountTextureType)))
            {
                extraTextures[textureType] = texture + "_" + textureType.ToString();
            }
            if (mount.Autoload(ref name, ref texture, extraTextures))
            {
                AddMount(name, mount, texture, extraTextures);
            }
        }