Skip to content

Commit 27cea5e

Browse files
committed
Tidying up a bit
1 parent f17cdd9 commit 27cea5e

4 files changed

Lines changed: 15 additions & 14 deletions

File tree

examples/debug/debug physics.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ function create() {
3333

3434
function update()
3535
{
36-
// game.physics.collide( sprite, otherSprite ) ;
3736

3837
// Move sprite up and down smoothly for show
3938
var tStep = Math.sin( counter ) ;

examples/display/bitmapdata wobble.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,6 @@ function create() {
2828
// Populate the wave with some data
2929
waveData = game.math.sinCosGenerator(32, 8, 8, 2);
3030

31-
console.log(bmd.context)
32-
3331
}
3432

3533
function update() {

examples/sprites/dynamic crop.js

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,32 @@ function preload() {
66
}
77

88
var pic;
9+
var cropRect;
910

1011
function create() {
1112

1213
pic = game.add.sprite(0, 0, 'trsi');
1314

15+
cropRect = {x : 0, y : 0 , width : 128, height : 128};
16+
}
1417

15-
pic.cropEnabled = true;
18+
function update() {
1619

17-
pic.crop.width = 128;
18-
pic.crop.height = 128;
20+
if(game.input.x < pic.width && game.input.y < pic.height){
1921

20-
}
22+
pic.x = game.input.x;
23+
pic.y = game.input.y;
2124

22-
function update() {
25+
cropRect.x = game.input.x;
26+
cropRect.y = game.input.y;
27+
28+
pic.crop(cropRect);
29+
30+
2331

24-
pic.x = game.input.x;
25-
pic.y = game.input.y;
32+
}
2633

27-
pic.crop.x = game.input.x;
28-
pic.crop.y = game.input.y;
34+
2935

3036
}
3137

examples/world/move around world.js

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,6 @@ function render() {
8888

8989
game.debug.renderCameraInfo(game.camera, 32, 32);
9090
game.debug.renderSpriteInfo(d, 32, 200);
91-
// game.debug.renderWorldTransformInfo(d, 32, 200);
92-
// game.debug.renderLocalTransformInfo(d, 32, 400);
9391
game.debug.renderSpriteCorners(d, false, true);
9492

9593
}

0 commit comments

Comments
 (0)