Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
Minor syntax and text fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
petarov committed Mar 27, 2013
1 parent 5a730d1 commit cdf1906
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions demos/demo2.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ $(document).ready(function() {
// main scene
Crafty.scene("game", function() {

// show fps
// show FPS
Crafty.e("2D, " + render + ", FPS").attr({maxValues:10})
.bind("MessureFPS", function(fps) {
$('#fps').text('FPS: ' + fps.value);
})
});

var zbase = 2;
// draw tile floor
Expand All @@ -71,7 +71,7 @@ $(document).ready(function() {
}
});
// create character
var entity = Crafty.e("2D, " + render + ", player, CharAnims, Multiway, MouseFace, BoxOverlays")
Crafty.e("2D, " + render + ", player, CharAnims, Multiway, MouseFace, BoxOverlays")
.attr({
move: {left: false, right: false, up: false, down: false},
x: 400, y: 256, z: zbase + 1,
Expand All @@ -97,7 +97,7 @@ $(document).ready(function() {
.multiway(2, {W: -90, S: 90, D: 0, A: 180})
.bind("MouseMoved", function(e) {
// adjust player sprite facing
// we add +90, since initially player is facing pi/2
// we add +90, since initially sprite is facing PI/2
this.curAngle = (e.grad) + 90;
this.rotation = this.curAngle;
})
Expand Down

0 comments on commit cdf1906

Please sign in to comment.