Skip to content

Commit

Permalink
Fix for "Cannot read property 'y2' of undefined" error
Browse files Browse the repository at this point in the history
  • Loading branch information
volkans80 authored Jun 10, 2016
1 parent d803190 commit 50124ab
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions blank_game_multiplayer/assets/PlayerTexture.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ var image = {
// Draw the player entity
ctx.strokeStyle = 'rgba(255, 0, 0, 1)';
ctx.beginPath();
ctx.moveTo(0, -entity._geometry.y2);
ctx.lineTo(entity._geometry.x2, entity._geometry.y2);
ctx.lineTo(0, entity._geometry.y2 - 5);
ctx.lineTo(-entity._geometry.x2, entity._geometry.y2);
ctx.lineTo(0, -entity._geometry.y2);
ctx.moveTo(0, -entity._bounds2d.y2);
ctx.lineTo(entity._bounds2d.x2, entity._bounds2d.y2);
ctx.lineTo(0, entity._bounds2d.y2 - 5);
ctx.lineTo(-entity._bounds2d.x2, entity._bounds2d.y2);
ctx.lineTo(0, -entity._bounds2d.y2);
ctx.stroke();
}
};
};

0 comments on commit 50124ab

Please sign in to comment.