public static PlayerMoveToInfo fromBytes(byte[] b) { if (isThis(b)) { byte id = b[3]; Vector3 v = ReadVector3f(ref b, 4); var pmti = new PlayerMoveToInfo(id, v); return(pmti); } return(null); }
public static NetworkMessageType GetTypeOfMessage(byte[] b) { if (PlayerMoveToInfo.isThis(b)) { return(NetworkMessageType.MoveTo); } else if (PlayerInstanceInfo.isThis(b)) { return(NetworkMessageType.InstanceCharacter); } else if (PlayerDestroyInfo.isThis(b)) { return(NetworkMessageType.DestroyInstance); } return(NetworkMessageType.None); }