コード例 #1
0
        public void sendEndTurn()
        {
            if (gameClient == null)
            {
                return;
            }
            Debug.Log("send End turn");
            var msg = new Messages.TurnActionMessage();

            msg.turnAction = TurnAction.TurnEnd;
            gameClient.sendMessage(Messages.Type.TURN_ACTION, msg);
        }
コード例 #2
0
        public void sendAttackPlayer(int instanceId)
        {
            if (gameClient == null)
            {
                return;
            }
            Debug.Log($"send AttackPlayer {instanceId}");
            var msg = new Messages.TurnActionMessage();

            msg.turnAction        = TurnAction.AttackPlayer;
            msg.damagerInstanceId = instanceId;
            gameClient.sendMessage(Messages.Type.TURN_ACTION, msg);
        }
コード例 #3
0
        public void sendUseCard(int id)
        {
            if (gameClient == null)
            {
                return;
            }
            Debug.Log($"send UseCard {id}");
            var msg = new Messages.TurnActionMessage();

            msg.turnAction = TurnAction.UseCard;
            msg.cardId     = id;
            gameClient.sendMessage(Messages.Type.TURN_ACTION, msg);
        }