예제 #1
0
파일: Entity.cs 프로젝트: Hakua/PokeSharp
		public virtual IEncodable Decode(General.Encoding.BinaryInput stream) {
			this.id = stream.ReadInt32();
			this.Position = stream.ReadVector2();
			this.Width = stream.ReadInt32();
			this.Height = stream.ReadInt32();

			return this;
		}
예제 #2
0
		public IEncodable Decode(General.Encoding.BinaryInput stream) {
			position = stream.ReadVector2();
			modelName = stream.ReadString();
			entityIndex = stream.ReadInt32();
			
			if (!string.IsNullOrEmpty(modelName)) {
				World world = EditorEngine.Instance.World;
				model = EditorEngine.Instance.GetModelByName(modelName);
			}

			EntityIO io = new EntityIO(stream, EditorEngine.Instance.CurrentMap.Factory, true);
			this.worldEntity = io.Read();

			return this;
		}