Skip to content

Commit 5acb4e9

Browse files
committed
Borrowed the 'extends' system from jQuery and now the codebase will be considerably smaller :) TileSprite already updated to new format.
1 parent e28cdbe commit 5acb4e9

2 files changed

Lines changed: 6 additions & 346 deletions

File tree

examples/tilesprite1.php

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
(function () {
1414

15-
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render });
15+
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });
1616

1717
function preload() {
1818
game.load.image('disk', 'assets/sprites/p2.jpeg');
@@ -22,20 +22,13 @@ function preload() {
2222
var count = 0;
2323

2424
function create() {
25-
26-
game.world._stage.backgroundColorString = '#182d3b';
27-
2825
s = game.add.tileSprite(0, 0, 512, 512, 'disk');
29-
// s.rotation = 0.1;
30-
3126
}
3227

3328
function update() {
3429

3530
count += 0.005
3631

37-
// s.rotation += 0.01;
38-
3932
s.tileScale.x = 2 + Math.sin(count);
4033
s.tileScale.y = 2 + Math.cos(count);
4134

@@ -62,12 +55,6 @@ function update() {
6255

6356
}
6457

65-
function render() {
66-
67-
// game.debug.renderSpriteCorners(s, true, true);
68-
69-
}
70-
7158
})();
7259

7360
</script>

0 commit comments

Comments
 (0)