public void OnBoardResult(PlayerBoardResult playerBoardResult) { if (playerBoardResult.playerID != Network.player.ToString()) { return; } CmdOnBoardResult(playerBoardResult); }
// todo: make generic command (e.g. CmdSetUserBoardData) public override void SetUserBoardResult(PlayerBoardResult playerBoardResult) { bool playerDataFound = false; for (int x = 0; !playerDataFound && x < boardResultsList.Count; x++) { if (boardResultsList[x].playerID == playerBoardResult.playerID) { playerDataFound = true; } } if (!playerDataFound) { boardResultsList.Add(playerBoardResult); } }
public virtual void SetUserBoardResult(PlayerBoardResult playerBoardResult) { }
public void CmdOnBoardResult(PlayerBoardResult playerBoardResult) { BoardManager.GetServerBoard().GetComponent <BaseBoard>().SetUserBoardResult(playerBoardResult); }