Last active
June 9, 2020 13:53
-
-
Save Srushtika/8c8b8f26016372647b30f90266276845 to your computer and use it in GitHub Desktop.
Code snippet 9 - For multiplayer space invaders article
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
realtime.connection.once("connected", () => { | |
gameRoom = realtime.channels.get("game-room"); | |
deadPlayerCh = realtime.channels.get("dead-player"); | |
gameRoom.presence.subscribe("enter", (player) => {}); | |
gameRoom.presence.subscribe("leave", (player) => {}); | |
deadPlayerCh.subscribe("dead-notif", (msg) => {}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment