Přidaný command a event pro otevírání a zavírání dveří
This commit is contained in:
parent
b968b12090
commit
952aae10de
7 changed files with 87 additions and 30 deletions
|
|
@ -4,20 +4,25 @@ using LiteNetLib.Utils;
|
|||
namespace PacketLib;
|
||||
|
||||
public struct PlayerState : INetSerializable {
|
||||
public uint pid;
|
||||
public int pid;
|
||||
public int camera;
|
||||
public bool monitorUp;
|
||||
|
||||
public bool[] doorStates;
|
||||
|
||||
|
||||
public void Serialize(NetDataWriter writer) {
|
||||
writer.Put(pid);
|
||||
writer.Put(camera);
|
||||
writer.Put(monitorUp);
|
||||
writer.PutArray(doorStates);
|
||||
}
|
||||
|
||||
public void Deserialize(NetDataReader reader) {
|
||||
pid = reader.GetUInt();
|
||||
pid = reader.GetInt();
|
||||
camera = reader.GetInt();
|
||||
monitorUp = reader.GetBool();
|
||||
doorStates = reader.GetBoolArray();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue