quantum-space-buddies/QSB/WorldSync/Events/WorldObjectMessage.cs

23 lines
515 B
C#
Raw Normal View History

2020-08-13 19:25:12 +02:00
using QSB.Messaging;
2020-08-13 14:32:58 +01:00
using UnityEngine.Networking;
2020-11-03 22:18:22 +00:00
namespace QSB.WorldSync.Events
2020-08-13 14:32:58 +01:00
{
public class WorldObjectMessage : PlayerMessage
{
2020-08-13 20:47:23 +02:00
public int ObjectId { get; set; }
2020-08-13 14:32:58 +01:00
public override void Deserialize(NetworkReader reader)
{
base.Deserialize(reader);
2020-08-13 20:47:23 +02:00
ObjectId = reader.ReadInt32();
2020-08-13 14:32:58 +01:00
}
public override void Serialize(NetworkWriter writer)
{
base.Serialize(writer);
2020-08-13 20:47:23 +02:00
writer.Write(ObjectId);
2020-08-13 14:32:58 +01:00
}
}
}