public void EndTurn() { SetCollidersActivation(true); string endTurn = CommandReader.SendCommand(Command.END_TURN, Sender.CLIENT, ID.ToString(), _characterTurn.ID.ToString(), "", 0); PlayerClient.OnSendButton(endTurn); }
public void ChangeTurn(int turn, Client cli) { SetPlayerArrow(turn); CheckWinner(); ClearTurn(); indexTurn = turn; _currentPlayer = Players[indexTurn]; Debug.Log(_currentPlayer.gameObject.name + " " + indexTurn); int curChar = _currentPlayer.CharacterTurn(); cli.Send(CommandReader.SendCommand(Command.START_TURN, Sender.CLIENT, _currentPlayer.ID.ToString(), curChar.ToString(), "0", 0)); Debug.Log("SEND TURN START CALLED!!!"); BlockMouseSelection(turn); }
public void SendAttackMessage(Character currentTarget) { string attack = CommandReader.SendCommand(Command.ATTACK, Sender.CLIENT, ID.ToString(), _characterTurn.ID.ToString(), currentTarget.ID.ToString(), 0); PlayerClient.OnSendButton(attack); }