Пример #1
0
        public void SetupPlayerInfo(NetworkGamePlayerHex player)
        {
            this.player = player;

            var color = player.hasAuthority ? "blue" : "red";

            playerName.text = $"<color={color}>{player.DisplayName}</color>";
        }
Пример #2
0
 private void SetPlayerInfo(NetworkGamePlayerHex player, int playerNumber)
 {
     if (playerNumber == 0)
     {
         player1.SetupPlayerInfo(player);
     }
     else
     {
         player2.SetupPlayerInfo(player);
     }
 }
Пример #3
0
 public void SetCellDetails(HexCell cell, NetworkGamePlayerHex queryingPlayer)
 {
     this.queryingPlayer = queryingPlayer;
     if (cell == null)
     {
         ClearDetails();
     }
     else
     {
         ShowCellDetails(cell, queryingPlayer);
     }
 }
Пример #4
0
        private void ShowCellDetails(HexCell cell, NetworkGamePlayerHex queryingPlayer)
        {
            currentCell = cell;
            cellDetails.DisplayCellDetails(cell);

            if (cell.PlayerId == queryingPlayer.ID)
            {
                ShowCellActions(cell);
            }
            else
            {
                HideCellActions();
            }
        }
Пример #5
0
        public void Init(NetworkGamePlayerHex player)
        {
            this.player = player;
            controlPanel.RegisterSingleObserver(player);
            turnIndicator.RegisterSingleObserver(player);
            SetGameCursor(HexCursor.Default);
            SetUICursor(HexCursor.Default);

            tooltip.SetPlayer(player);

            currency.RegisterObserver(tooltip);
            controlPanel.Init(tooltip);
            turnIndicator.Init(tooltip);

            tooltip.EnableTooltips();
        }
Пример #6
0
 public void SetCellSelected(HexCell cell, NetworkGamePlayerHex queryingPlayer) => cellControl.SetCellDetails(cell, queryingPlayer);
Пример #7
0
 public void SetPlayer(NetworkGamePlayerHex player)
 {
     this.player = player;
 }