public void UpdateUIPanels(RPSType playerOneMove, RPSType playerTwoMove, string msg, bool hasAuthority) { gameOver.SetActive(true); playerActions.SetActive(false); txt_msg.SetText(msg); if (hasAuthority) { txt_playerMove.text = playerOneMove.ToString(); txt_oponentMove.text = playerTwoMove.ToString(); Debug.Log("from if"); } else { Debug.Log("else"); txt_playerMove.text = playerTwoMove.ToString(); txt_oponentMove.text = playerOneMove.ToString(); } }
public void CmdSetMove(RPSType move) { playerMove = move; GameNetworkManager.singleton.CalculateResult(); }
public void RpcUpdateUI(RPSType playerOneMove, RPSType playerTwoMove, string msg, bool authFlag) { GameplayUIManager.Instance.UpdateUIPanels(playerOneMove, playerTwoMove, msg, authFlag); }
public override void OnStartServer() { base.OnStartServer(); playerMove = RPSType.None; }