Ejemplo n.º 1
0
 public void OnBubbleMessageReceived(Session session, Message message)
 {
     if(SessionBubbleDictionary.ContainsKey(session))
     {
         RemoteBubble bubble = SessionBubbleDictionary[session];
     }
 }
Ejemplo n.º 2
0
 public void OnBubbleDisconnected(Session session)
 {
     if(SessionBubbleDictionary.ContainsKey(session))
     {
         RemoteBubble bubble = SessionBubbleDictionary[session];
         RemoveBubble(bubble);
     }
 }
Ejemplo n.º 3
0
 public void OnBubbleConnected(Session session, Message message)
 {
     AttachRequestMessage attachRequestMessage = (AttachRequestMessage)message;
     RemoteBubble bubble = new RemoteBubble(
         attachRequestMessage.SourceBubbleFragment.BubbleId,
         attachRequestMessage.SourceBubbleFragment.BubbleName,
         attachRequestMessage.SourceBubbleFragment.BubbleAssetCacheUrl,
         attachRequestMessage.SourceBubbleFragment.OwnerId,
         attachRequestMessage.SourceBubbleFragment.BubbleAddress,
         attachRequestMessage.SourceBubbleFragment.BubblePort,
         attachRequestMessage.SourceBubbleFragment.BubbleCenter.X,
         attachRequestMessage.SourceBubbleFragment.BubbleCenter.Y,
         attachRequestMessage.SourceBubbleFragment.BubbleCenter.Z,
         attachRequestMessage.SourceBubbleFragment.BubbleRange,
         attachRequestMessage.SourceBubbleFragment.BubblePerceptionRange,
         attachRequestMessage.SourceBubbleFragment.BubbleRealTime,
         session);
     AddBubble(bubble);
 }
Ejemplo n.º 4
0
 public void RemoveBubble(RemoteBubble bubble)
 {
     SessionBubbleDictionary.Remove(bubble.Session);
     IdBubbleDictionary.Remove(bubble.BubbleId);
     Bubbles.Remove(bubble);
 }
Ejemplo n.º 5
0
 public void AddBubble(RemoteBubble bubble)
 {
     SessionBubbleDictionary.Add(bubble.Session,bubble);
     IdBubbleDictionary.Add(bubble.BubbleId, bubble);
     Bubbles.Add(bubble);
 }