Example #1
0
        public void enter_gameroom(List <CGameUser> users)
        {
            this.players.Clear();
            this.player_state.Clear();
            byte i = 0;

            foreach (CGameUser user in users)
            {
                CPlayer player = new CPlayer(user, i++);
                this.players.Add(player);

                change_playerstate(player, PLAYER_STATE.ENTERED_ROOM);

                CPacket msg = CPacket.create((Int16)(PROTOCOL.START_LOADING));
                msg.push(player.player_index);
                player.HP = 100;
                msg.push_single(player.HP);
                msg.push_single(i);
                msg.push_single(i);
                msg.push_single(i);
                player.send(msg);

                user.enter_room(player, this);
            }
        }