Esempio n. 1
0
    protected override void CheckResult()
    {
        var users = ServerInfo.GameUsers;

        if (users.TrueForAll(x => x.Life > 0))
        {
            return; //진행중
        }
        users.OrderByDescending(x => x.Life).ForEach((x, i) =>
        {
            x.Rank  = i;
            x.Money = ServerDefine.Rank2Money(i);
        });

        GameServer.sInstance?.SendLocal("Result", new SC_Result
        {
            Users = users
        });
    }
Esempio n. 2
0
        private void Result()
        {
            _state = RoomState.Result;

            var users = _users.OrderByDescending(x => x.Life).ToList();

            users.ForEach((x, i) =>
            {
                x.Rank  = i;
                x.Money = ServerDefine.Rank2Money(i);
            });

            _context.Clients(_users).SendCoreAsync("Result", PayloadPack.Success(new SC_Result()
            {
                Users = users,
            }));

            OnGameEnd?.Invoke(_groupName);
        }