Borrowed the 'extends' system from jQuery and now the codebase will be considerably smaller :) TileSprite already updated to new format.

This commit is contained in:
Richard Davey
2013-09-03 04:58:30 +01:00
parent e28cdbeb6a
commit 5acb4e9f1b
2 changed files with 6 additions and 346 deletions
+1 -14
View File
@@ -12,7 +12,7 @@
(function () {
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create, update: update, render: render });
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update });
function preload() {
game.load.image('disk', 'assets/sprites/p2.jpeg');
@@ -22,20 +22,13 @@
var count = 0;
function create() {
game.world._stage.backgroundColorString = '#182d3b';
s = game.add.tileSprite(0, 0, 512, 512, 'disk');
// s.rotation = 0.1;
}
function update() {
count += 0.005
// s.rotation += 0.01;
s.tileScale.x = 2 + Math.sin(count);
s.tileScale.y = 2 + Math.cos(count);
@@ -62,12 +55,6 @@
}
function render() {
// game.debug.renderSpriteCorners(s, true, true);
}
})();
</script>