Skip to content

Instantly share code, notes, and snippets.

@Srushtika
Created June 9, 2020 23:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Srushtika/700d44c31f16ba14dbf2bc7def2f90d9 to your computer and use it in GitHub Desktop.
Save Srushtika/700d44c31f16ba14dbf2bc7def2f90d9 to your computer and use it in GitHub Desktop.
Code snippet 29 - For multiplayer space invaders article
publishMyDeathNews(bullet, avatar) {
if (amIalive) {
deadPlayerCh.publish("dead-notif", {
killerBulletId: bulletThatShotMe,
deadPlayerId: myClientId,
});
}
amIalive = false;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment