Ejemplo n.º 1
0
		public IEncodable Decode(BinaryInput stream) {
			this.Name = stream.ReadString();
			this.Author = stream.ReadString();

			this.TilesetFactory = stream.ReadObject<TilesetFactory>();
			this.EntityTemplateFactory = stream.ReadObject<EntityTemplateFactory>();

			this.TilesetContainer = stream.ReadObject<TilesetContainer>();
			this.EntityContainer = stream.ReadObject<EntityContainer>();
			this.UIContainer = stream.ReadObject<UIContainer>();
			this.SpriteLibrary = stream.ReadObject<SpriteLibrary.SpriteLibrary>();
			return this;
		}
Ejemplo n.º 2
0
		private World(string name) {
			this.Name = name;
			this.TilesetContainer = new TilesetContainer();
			this.EntityContainer = new EntityContainer();
			this.UIContainer = new UIContainer();
			this.SpriteLibrary = new SpriteLibrary.SpriteLibrary();
			this.TilesetFactory = new TilesetFactory();
			this.EntityTemplateFactory = new EntityTemplateFactory();
			this.EntityFactory = new WorldEntityFactory(this);
			this.Maps = new List<Map>();
			this.Camera = new Camera();
			this.GameConsole = new GameConsole();
		}
Ejemplo n.º 3
0
 private World(string name)
 {
     this.Name                  = name;
     this.TilesetContainer      = new TilesetContainer();
     this.EntityContainer       = new EntityContainer();
     this.UIContainer           = new UIContainer();
     this.SpriteLibrary         = new SpriteLibrary.SpriteLibrary();
     this.TilesetFactory        = new TilesetFactory();
     this.EntityTemplateFactory = new EntityTemplateFactory();
     this.EntityFactory         = new WorldEntityFactory(this);
     this.Maps                  = new List <Map>();
     this.Camera                = new Camera();
     this.GameConsole           = new GameConsole();
 }
Ejemplo n.º 4
0
        public IEncodable Decode(BinaryInput stream)
        {
            this.Name   = stream.ReadString();
            this.Author = stream.ReadString();

            this.TilesetFactory        = stream.ReadObject <TilesetFactory>();
            this.EntityTemplateFactory = stream.ReadObject <EntityTemplateFactory>();

            this.TilesetContainer = stream.ReadObject <TilesetContainer>();
            this.EntityContainer  = stream.ReadObject <EntityContainer>();
            this.UIContainer      = stream.ReadObject <UIContainer>();
            this.SpriteLibrary    = stream.ReadObject <SpriteLibrary.SpriteLibrary>();
            return(this);
        }