Exemplo n.º 1
0
        public async Task Hunt()
        {
            var result = await DoCommand(async() => {
                var playerId = _account.PlayerId;

                var command = new HuntCommand(playerId);
                await _bus.SendCommand(command);
            });
        }
Exemplo n.º 2
0
        public async Task <Unit> Handle(HuntCommand command, CancellationToken cancellationToken)
        {
            await BeginChangeStatus(new PlayerStatusModel
            {
                PlayerId = command.PlayerId,
                Status   = PlayerStatusEnum.打猎
            });

            return(Unit.Value);
        }