diff --git a/examples/animation/texture atlas.php b/examples/animation/texture atlas.php deleted file mode 100644 index 8f8a88ba..00000000 --- a/examples/animation/texture atlas.php +++ /dev/null @@ -1,38 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/assets/maps/cybernoid.png b/examples/assets/maps/cybernoid.png deleted file mode 100644 index 8f49737c..00000000 Binary files a/examples/assets/maps/cybernoid.png and /dev/null differ diff --git a/examples/camera/follow styles.php b/examples/camera/follow styles.php index 400070b5..5ff57587 100644 --- a/examples/camera/follow styles.php +++ b/examples/camera/follow styles.php @@ -36,7 +36,7 @@ function create() { //make the world larger than the actual canvas - game.world.setBounds(1400,1400); + game.world.setBounds(0,0,1400,1400); for(var i=0,nb=10;i - - - - diff --git a/examples/groups/add to group 1.php b/examples/groups/add to group 1.php deleted file mode 100644 index b224864a..00000000 --- a/examples/groups/add to group 1.php +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - diff --git a/examples/groups/add to group 2.php b/examples/groups/add to group 2.php deleted file mode 100644 index 16ccdf0c..00000000 --- a/examples/groups/add to group 2.php +++ /dev/null @@ -1,56 +0,0 @@ - - - - - - diff --git a/examples/groups/bring to top 2.php b/examples/groups/bring to top 2.php deleted file mode 100644 index 5a8324aa..00000000 --- a/examples/groups/bring to top 2.php +++ /dev/null @@ -1,101 +0,0 @@ - - - - - - diff --git a/examples/groups/bring to top.php b/examples/groups/bring to top.php deleted file mode 100644 index 60c1c512..00000000 --- a/examples/groups/bring to top.php +++ /dev/null @@ -1,46 +0,0 @@ - - - - - - diff --git a/examples/input/bring to top.php b/examples/input/bring to top.php deleted file mode 100644 index ab11aeed..00000000 --- a/examples/input/bring to top.php +++ /dev/null @@ -1,50 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/input/bring to top2.php b/examples/input/bring to top2.php deleted file mode 100644 index bdea15f1..00000000 --- a/examples/input/bring to top2.php +++ /dev/null @@ -1,51 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/input/cursor key movement.php b/examples/input/cursor key movement.php index ad3c8aa9..b2ae4c12 100644 --- a/examples/input/cursor key movement.php +++ b/examples/input/cursor key movement.php @@ -8,7 +8,7 @@ window.onload = 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, render: render }); + function preload() { diff --git a/examples/input/follow mouse.php b/examples/input/follow mouse.php index 638a2350..435a8d0b 100644 --- a/examples/input/follow mouse.php +++ b/examples/input/follow mouse.php @@ -29,7 +29,7 @@ if (game.input.mousePointer.isDown) { // 400 is the speed it will move towards the mouse - game.physics.moveTowardsMouse(sprite, 400); + game.physics.moveToPointer(sprite, 400); // if it's overlapping the mouse, don't move any more if (Phaser.Rectangle.contains(sprite.body, game.input.x, game.input.y)) diff --git a/examples/sprites/sprite1.php b/examples/sprites/sprite1.php deleted file mode 100644 index dd1059aa..00000000 --- a/examples/sprites/sprite1.php +++ /dev/null @@ -1,31 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/sprite3.php b/examples/sprites/sprite3.php deleted file mode 100644 index 1263b99d..00000000 --- a/examples/sprites/sprite3.php +++ /dev/null @@ -1,61 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/sprite4.php b/examples/sprites/sprite4.php deleted file mode 100644 index 13b8fceb..00000000 --- a/examples/sprites/sprite4.php +++ /dev/null @@ -1,64 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/texture crop/crop.php b/examples/texture crop/crop.php deleted file mode 100644 index 0ca156e1..00000000 --- a/examples/texture crop/crop.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/texture crop/crop2.php b/examples/texture crop/crop2.php deleted file mode 100644 index f4daeb7e..00000000 --- a/examples/texture crop/crop2.php +++ /dev/null @@ -1,42 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/texture crop/crop3.php b/examples/texture crop/crop3.php deleted file mode 100644 index 31cbd4c7..00000000 --- a/examples/texture crop/crop3.php +++ /dev/null @@ -1,44 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/tilemaps/wip1.php b/examples/tilemaps/wip1.php index e610a99a..731ba5c9 100644 --- a/examples/tilemaps/wip1.php +++ b/examples/tilemaps/wip1.php @@ -10,80 +10,54 @@ function preload() { - game.load.tilemap('level3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.TILED_JSON); - game.load.tileset('tiles', 'assets/maps/cybernoid.png', 16, 16); + game.load.tilemap('cybernoidLevel3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.JSON); + game.load.tileset('cybernoidTiles', 'assets/maps/cybernoid.png', 16, 16); } var layer; - var cursors; - var sprite2; function create() { game.stage.backgroundColor = '#3d3d3d'; - var map = new Phaser.Tilemap(game, 'level3'); - // This is a bit nuts, ought to find a way to automate it, but it looks cool :) - map.debugMap = [ '#000000', - '#e40058', '#e40058', '#e40058', '#80d010', '#bcbcbc', '#e40058', '#000000', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', - '#bcbcbc', '#bcbcbc', '#e40058', '#e40058', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#bcbcbc', - '#bcbcbc', '#80d010', '#80d010', '#80d010', '#0070ec', '#0070ec', '#80d010', '#80d010', '#80d010', '#80d010', '#0070ec', - '#0070ec', '#24188c', '#24188c', '#80d010', '#80d010', '#80d010', '#bcbcbc', '#80d010', '#80d010', '#80d010', '#e40058', - '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#e40058', '#bcbcbc', '#80d010', '#bcbcbc', '#80d010', '#000000', '#80d010', - '#80d010', '#80d010', '#bcbcbc', '#e40058', '#80d010', '#80d010', '#e40058', '#e40058', '#bcbcbc', '#bcbcbc', '#bcbcbc', - '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#0070ec', '#0070ec', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', '#bcbcbc', - '#bcbcbc', '#bcbcbc' - ]; - // map.dump(); + // layer = new Phaser.TilemapLayer(game, 0, 0, 500, 500, [], 'snes'); - // layer = new Phaser.TilemapLayer(game, 0, 0, 640, 400); - layer = new Phaser.TilemapLayer(game, 0, 0, 320, 200); - layer.updateTileset('tiles'); - layer.updateMapData(map, 0); + // layer = new Phaser.TilemapLayer(game, 0, 0, 500, 500); - // layer.sprite.anchor.setTo(0.5, 0.5); - game.world.add(layer.sprite); + // layer.load(mapData, tileset); + // layer.create(mapWidth, mapHeight, [tileset]); - // layer.sprite.scale.setTo(2, 2); + // layer.updateTileset('cybernoidTiles'); // can change on the fly - game.add.sprite(320, 0, layer.texture, layer.frame); - game.add.sprite(0, 200, layer.texture, layer.frame); - game.add.sprite(320, 200, layer.texture, layer.frame); - cursors = game.input.keyboard.createCursorKeys(); + // layer.context.fillStyle = 'rgb(255,0,0)'; + // layer.context.fillRect(0, 0, 200, 300); + + /* + game.world._container.addChild(layer.sprite); + + layer.create(10, 10); + + layer.putTile(0, 0, 3); + layer.putTile(0, 1, 4); + + layer.render(); + + layer.dump(); + */ } function update() { - // layer.sprite.angle += 0.5; - - if (cursors.up.isDown) - { - layer.y -= 4; - } - else if (cursors.down.isDown) - { - layer.y += 4; - } - - if (cursors.left.isDown) - { - layer.x -= 4; - } - else if (cursors.right.isDown) - { - layer.x += 4; - } } function render() { - layer.render(); }