예제 #1
0
 private bool onPlayerLeaveRoom(WorldServiceEvents.PlayerLeaveRoomEvent evt)
 {
     if (isSpeechBubbleActive(evt.SessionId))
     {
         WorldSpeechBubble worldSpeechBubble = activeSpeechBubbles[evt.SessionId];
         worldSpeechBubblePool.Unspawn(worldSpeechBubble.gameObject);
         worldSpeechBubble.OnCompleteEvent -= onSpeechBubbleComplete;
         activeSpeechBubbles.Remove(evt.SessionId);
     }
     return(false);
 }
예제 #2
0
        private bool OnPlayerLeaves(WorldServiceEvents.PlayerLeaveRoomEvent evt)
        {
            DataEntityHandle dataEntityHandle = dataEntityCollection.FindEntity <SessionIdData, long>(evt.SessionId);

            if (!dataEntityHandle.IsNull)
            {
                if (dataEntityCollection.GetComponent <LocomotionData>(dataEntityHandle).LocoState == LocomotionState.Zipline)
                {
                    CoroutineRunner.Start(delayClearRemotePlayerComponents(dataEntityHandle), this, "Give users on a zipline time to clear the view");
                }
                else
                {
                    clearRemotePlayerComponents(dataEntityHandle);
                }
            }
            eventDispatcher.DispatchEvent(new NetworkControllerEvents.RemotePlayerLeftRoomEvent(dataEntityHandle));
            return(false);
        }