示例#1
0
        public void OnPlayerJoinedEvt(object sender, PlayerJoinedArgs ga)
        {
            bool isLocal = ga.player.PeerId == appl.LocalPeer.PeerId;

            logger.Info($"{(ModeName())} - OnPlayerJoinedEvt() - {(isLocal?"Local":"Remote")} Member Joined: {ga.player.Name}, ID: {ga.player.PeerId}");
            if (ga.player.PeerId == appl.LocalPeer.PeerId)
            {
                game.RespawnPlayerEvt += OnRespawnPlayerEvt;
                //_SetState(kWaitingForMembers);
                _SetState(kPlaying);
            }
        }
示例#2
0
 public void OnMemberJoinedGroupEvt(object sender, PlayerJoinedArgs ga)
 {
     game.RespawnPlayerEvt += OnRespawnPlayerEvt;
     gameJoined             = true;
 }
示例#3
0
 public void OnPlayerJoinedEvt(object sender, PlayerJoinedArgs ga)
 {
     _CurrentState     = ModeState.Playing;
     localPlayerJoined = true;
     logger.Info("Player joined!!!");
 }