Much more stable collision, just need to refactor the Tilemap handling - see if I can optimise it a bit too.

This commit is contained in:
Richard Davey
2013-09-23 03:26:08 +01:00
parent bc02a1a05e
commit 257cbe3be8
12 changed files with 517 additions and 360 deletions
+6 -12
View File
@@ -7,7 +7,7 @@
(function () {
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create, update: update, render: render });
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
var p;
@@ -19,23 +19,17 @@
function create() {
game.stage.backgroundColor = 0x337799;
game.stage.backgroundColor = 0x2d2d2d;
p = game.add.sprite(0, 0, 'diamond');
p = game.add.sprite(100, 100, 'diamond');
game.add.tween(p).to({ x: 700 }, 1000, Phaser.Easing.Linear.None, true)
game.add.tween(p).to({ x: 600 }, 2000, Phaser.Easing.Linear.None, true)
.to({ y: 300 }, 1000, Phaser.Easing.Linear.None)
.to({ x: 0 }, 1000, Phaser.Easing.Linear.None)
.to({ y: 0 }, 1000, Phaser.Easing.Linear.None)
.to({ x: 100 }, 2000, Phaser.Easing.Linear.None)
.to({ y: 100 }, 1000, Phaser.Easing.Linear.None)
.loop();
}
function update() {
}
function render() {
}
})();
</script>