Skip to content

Instantly share code, notes, and snippets.

View damian-pastorini's full-sized avatar
🏠
Where the magic happens

Damian A. Pastorini damian-pastorini

🏠
Where the magic happens
View GitHub Profile
this.p2world.on('impact', function(evt){
var bodyA = evt.bodyA,
bodyB = evt.bodyB;
if(bodyA.hasOwnProperty('playerId')){
console.log('bodyA is the player! ', bodyA.playerId);
var currentPlayer = this.state.players[client.sessionId];
bodyA.velocity = [0,0];
} else {
if(bodyB.hasOwnProperty('playerId')){
console.log('bodyB is the player! ', bodyB.playerId);

Keybase proof

I hereby claim:

  • I am damian-pastorini on github.
  • I am damianpastorini (https://keybase.io/damianpastorini) on keybase.
  • I have a public key whose fingerprint is B2AE 0306 9DF3 DB8E 1794 EC01 90B5 5AD8 38B2 C38E

To claim this, I am signing this object: