protected override PeerBase CreatePeer(InitRequest initRequest) { var peer = new RunePeer(this, initRequest); _peers.Add(peer); return(peer); }
public void DestroyPeer(RunePeer peer) { Registry.Get<LobbyComponent>(lobby => { if (lobby.Contains(peer)) lobby.Leave(peer); }); _peers.Remove(peer); }
protected override PeerBase CreatePeer(InitRequest initRequest) { // in Photon, peer is object representing connection to client // create class that inherits from peer base class, return it here // every time a connection happens, we come here, pass back our own instance of a peer representation var peer = new RunePeer(this, initRequest); _peers.Add(peer); return peer; }
public void DestroyPeer(RunePeer peer) { _peers.Remove(peer); }
protected override PeerBase CreatePeer(InitRequest initRequest) { var peer = new RunePeer(this, initRequest); _peers.Add(peer); return peer; }