SHARE
TWEET

Untitled

a guest Feb 21st, 2019 52 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. function check_player_collisions(other_blob)
  2. {
  3.       ... //I've removed code not relevant to question
  4.  
  5.       if(collision){
  6.            var data = { otherblob: other_blob, player: player_blob };
  7.            socket.emit('kill_player', data);
  8.       }
  9. }
  10.      
  11. socket.on('kill_player',
  12.   function(data) {
  13.       console.log(data.otherblob + " is dead.");
  14.    }
  15. );
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top