Autoload() public method

public Autoload ( string &name, string &texture ) : bool
name string
texture string
return bool
示例#1
0
        private void AutoloadTile(Type type)
        {
            ModTile tile = (ModTile)Activator.CreateInstance(type);

            tile.mod = this;
            string name    = type.Name;
            string texture = (type.Namespace + "." + type.Name).Replace('.', '/');

            if (tile.Autoload(ref name, ref texture))
            {
                AddTile(name, tile, texture);
            }
        }