Exemplo n.º 1
0
		public IEncodable Decode(BinaryInput stream) {
			this.spriteindex = stream.ReadInt32();
			this.collidable = stream.ReadBoolean();
			this.reflecting = stream.ReadBoolean();
			this.animated = stream.ReadBoolean();
			this.frames = stream.ReadInt32();
			this.timeperframe = stream.ReadSingle();
			this.DefaultBehavior = stream.ReadObject<MockupTileBehavior>();

			return this;
		}
Exemplo n.º 2
0
		private void Initialize(string name, string author, IRegionEntityFactory factory) {
			this.Name = name ?? "MAP_NO_NAME";
			this.Author = author ?? "Anonymous";

			this.Behaviors = new MockupTileBehavior[Width,Height];
			for (int i = 0; i < Width; i++) {
				for (int j = 0; j < Height; j++) {
					Behaviors[i, j] = new MockupTileBehavior(TileBehavior.Height2.Id);
				}
			}

			Fill(-1, 0);
		}