mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-18 13:23:05 +00:00
28 lines
607 B
C#
28 lines
607 B
C#
using Mirror;
|
|
using QSB.Messaging;
|
|
using QSB.QuantumSync.WorldObjects;
|
|
|
|
namespace QSB.QuantumSync.Messages
|
|
{
|
|
internal class MoveSkeletonMessage : QSBWorldObjectMessage<QSBQuantumSkeletonTower>
|
|
{
|
|
private int _index;
|
|
|
|
public MoveSkeletonMessage(int index) => _index = index;
|
|
|
|
public override void Serialize(NetworkWriter writer)
|
|
{
|
|
base.Serialize(writer);
|
|
writer.Write(_index);
|
|
}
|
|
|
|
public override void Deserialize(NetworkReader reader)
|
|
{
|
|
base.Deserialize(reader);
|
|
_index = reader.ReadInt();
|
|
}
|
|
|
|
public override void OnReceiveRemote() => WorldObject.MoveSkeleton(_index);
|
|
}
|
|
}
|