public PlayerScore(OnlinePlayerController update) { id = update.playerInfo.playerId; name = update.playerInfo.playerName; score = update.playerInfo.updateInfo.playerScore; color = update.playerInfo.updateInfo.playerNameColor; valid = update.playerInfo.updateInfo.playerState == PlayerState.Game; playerFlags = update.playerInfo.updateInfo.playerFlags; }
public PlayerScore(ulong id, string name, uint score, Color32 color, bool valid, ExtraPlayerFlags playerFlags) { this.id = id; this.name = name; this.score = score; this.color = color; this.valid = valid; this.playerFlags = playerFlags; }
public PlayerScore(PlayerInfo update) { id = update.playerId; name = update.playerName; score = update.updateInfo.playerScore; color = update.updateInfo.playerNameColor; valid = update.updateInfo.playerState == PlayerState.Game; playerFlags = update.updateInfo.playerFlags; }
public PlayerUpdate(NetIncomingMessage msg) { playerNameColor = new Color32(msg.ReadByte(), msg.ReadByte(), msg.ReadByte(), 255); playerState = (PlayerState)msg.ReadByte(); fullBodyTracking = (msg.ReadByte() == 1); playerScore = msg.ReadVariableUInt32(); playerCutBlocks = msg.ReadVariableUInt32(); playerComboBlocks = msg.ReadVariableUInt32(); playerTotalBlocks = msg.ReadVariableUInt32(); playerEnergy = msg.ReadFloat(); playerProgress = msg.ReadFloat(); playerLevelOptions = new LevelOptionsInfo(msg); playerFlags = new ExtraPlayerFlags(msg); rightHandPos = msg.ReadVector3(); leftHandPos = msg.ReadVector3(); headPos = msg.ReadVector3(); rightHandRot = msg.ReadQuaternion(); leftHandRot = msg.ReadQuaternion(); headRot = msg.ReadQuaternion(); if (fullBodyTracking) { pelvisPos = msg.ReadVector3(); leftLegPos = msg.ReadVector3(); rightLegPos = msg.ReadVector3(); pelvisRot = msg.ReadQuaternion(); leftLegRot = msg.ReadQuaternion(); rightLegRot = msg.ReadQuaternion(); } else { pelvisPos = Vector3.zero; leftLegPos = Vector3.zero; rightLegPos = Vector3.zero; pelvisRot = Quaternion.identity; leftLegRot = Quaternion.identity; rightLegRot = Quaternion.identity; } }