public override void OnConnection(VMEODClient client)
        {
            var args = client.Invoker.Thread.TempRegisters;

            // client belongs to a player
            if (client.Avatar != null)
            {
                if ((args[0] > -1) && (args[0] < 4))
                {
                    if (Lobby.Join(client, args[0]))
                    {
                        client.Send("Band_UI_Init", new byte[] { (byte)args[0] });
                        var slot = Lobby.GetSlotData(client);
                        if (slot != null)
                        {
                            slot.AvatarName  = client.Avatar.Name;
                            slot.Instrument  = (VMEODBandInstrumentTypes)Enum.ToObject(typeof(VMEODBandInstrumentTypes), args[0]);
                            slot.SkillAmount = GetAvatarsCurrentSkill(client);

                            if (Lobby.IsFull())
                            {
                                EnqueueGotoState(VMEODBandStates.PreShow);
                            }
                        }
                    }
                }
            }
            // client belongs to the smart tile, is contoller
            else
            {
                Controller = client;
            }
            base.OnConnection(client);
        }
Exemple #2
0
 private void OnConnected(VMEODClient client)
 {
     Lobby.GetSlotData(client).PlayerPersist = client.Avatar.PersistID;
     if (Lobby.IsFull())
     {
         HadTwoPlayers = true;
         BroadcastTradeData(false);
     }
 }
Exemple #3
0
        public override void OnConnection(VMEODClient client)
        {
            var param = client.Invoker.Thread.TempRegisters;

            if (client.Avatar != null)
            {
                var slot = param[0];
                if (Lobby.Join(client, (short)(slot - 1)))
                {
                    client.SendOBJEvent(new VMEODEvent((short)VMEODPaperChaseObjEvent.Idle));

                    if (Lobby.IsFull())
                    {
                        StateMachine.TransitionTo(VMEODPaperChaseState.StartRound);
                    }
                }
            }
            else
            {
                Controller = client;
            }
        }