Esempio n. 1
0
        public ResourceContext(LibraryContext context)
        {
            Context  = context;
            Managers = new Dictionary <Type, IDictionary>();

            Sprites   = new IndexedResourceManager <Sprite>(this);
            Scripts   = new IndexedResourceManager <Script>(this);
            Objects   = new IndexedResourceManager <Object>(this);
            Rooms     = new IndexedResourceManager <Room>(this);
            Instances = new IndexedResourceManager <Instance>(this, 100001);

            Constants = new Dictionary <string, Value>();
        }
 public static Room Define(this IndexedResourceManager <Room> manager, string name, int index)
 {
     return(new Room(manager.Context, name, index));
 }
 public static Room Define(this IndexedResourceManager <Room> manager)
 {
     return(new Room(manager.Context));
 }
 public static Script Define(this IndexedResourceManager <Script> manager, string name, int index, string code)
 {
     return(new Script(manager.Context, name, index, code));
 }
 public static Script Define(this IndexedResourceManager <Script> manager)
 {
     return(new Script(manager.Context));
 }
 public static Sprite Define(this IndexedResourceManager <Sprite> manager, string name, int index, int subimages)
 {
     return(new Sprite(manager.Context, name, index, subimages));
 }
 public static Object Define(this IndexedResourceManager <Object> manager, string name, int index)
 {
     return(new Object(manager.Context, name, index));
 }
 public static Object Define(this IndexedResourceManager <Object> manager)
 {
     return(new Object(manager.Context));
 }