示例#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;
		}