2020-12-15 16:37:52 +00:00
|
|
|
using UnityEngine;
|
2020-12-16 08:45:58 +00:00
|
|
|
using UnityEngine.Networking;
|
2020-12-02 12:42:26 +00:00
|
|
|
|
2020-12-07 21:19:16 +00:00
|
|
|
namespace QuantumUNET.Messages
|
2020-12-02 12:42:26 +00:00
|
|
|
{
|
2020-12-04 09:23:27 +00:00
|
|
|
internal class QSBObjectSpawnSceneMessage : QSBMessageBase
|
2020-12-02 12:42:26 +00:00
|
|
|
{
|
2020-12-16 08:57:15 +00:00
|
|
|
public NetworkInstanceId NetId;
|
2020-12-16 08:45:58 +00:00
|
|
|
public NetworkSceneId SceneId;
|
2020-12-03 11:56:32 +00:00
|
|
|
public Vector3 Position;
|
|
|
|
public byte[] Payload;
|
|
|
|
|
2020-12-16 08:03:04 +00:00
|
|
|
public override void Deserialize(QSBNetworkReader reader)
|
|
|
|
{
|
|
|
|
NetId = reader.ReadNetworkId();
|
|
|
|
SceneId = reader.ReadSceneId();
|
|
|
|
Position = reader.ReadVector3();
|
|
|
|
Payload = reader.ReadBytesAndSize();
|
|
|
|
}
|
2020-12-16 09:07:40 +00:00
|
|
|
|
|
|
|
public override void Serialize(QSBNetworkWriter writer)
|
|
|
|
{
|
|
|
|
writer.Write(NetId);
|
|
|
|
writer.Write(SceneId);
|
|
|
|
writer.Write(Position);
|
|
|
|
writer.WriteBytesFull(Payload);
|
|
|
|
}
|
2020-12-02 12:42:26 +00:00
|
|
|
}
|
2020-12-03 08:28:05 +00:00
|
|
|
}
|