From 3acdad92cb3de2606d54c18fb6b44468bbcb9884 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 11 Oct 2013 22:26:27 +0100 Subject: [PATCH] First commi using the new software --- examples/animation/texture atlas.php | 38 -------- examples/assets/maps/cybernoid.png | Bin 4849 -> 0 bytes examples/camera/follow styles.php | 2 +- examples/camera/moving the camera.php | 2 +- examples/camera/moving the game camera.php | 58 ------------ examples/groups/add to group 1.php | 63 ------------- examples/groups/add to group 2.php | 56 ------------ examples/groups/bring to top 2.php | 101 --------------------- examples/groups/bring to top.php | 46 ---------- examples/input/bring to top.php | 50 ---------- examples/input/bring to top2.php | 51 ----------- examples/input/cursor key movement.php | 2 +- examples/input/follow mouse.php | 2 +- examples/sprites/sprite1.php | 31 ------- examples/sprites/sprite3.php | 61 ------------- examples/sprites/sprite4.php | 64 ------------- examples/texture crop/crop.php | 42 --------- examples/texture crop/crop2.php | 42 --------- examples/texture crop/crop3.php | 44 --------- examples/tilemaps/wip1.php | 70 +++++--------- 20 files changed, 26 insertions(+), 799 deletions(-) delete mode 100644 examples/animation/texture atlas.php delete mode 100644 examples/assets/maps/cybernoid.png delete mode 100644 examples/camera/moving the game camera.php delete mode 100644 examples/groups/add to group 1.php delete mode 100644 examples/groups/add to group 2.php delete mode 100644 examples/groups/bring to top 2.php delete mode 100644 examples/groups/bring to top.php delete mode 100644 examples/input/bring to top.php delete mode 100644 examples/input/bring to top2.php delete mode 100644 examples/sprites/sprite1.php delete mode 100644 examples/sprites/sprite3.php delete mode 100644 examples/sprites/sprite4.php delete mode 100644 examples/texture crop/crop.php delete mode 100644 examples/texture crop/crop2.php delete mode 100644 examples/texture crop/crop3.php 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 8f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MA-LS@qyv z9rS8Ha>eo864+877{uC=_SB54A)X!JRzK|3e&h-jrd0y}?^rd2Qb)cRZap3E3W%)> zcNc(L{IFO1k*}A)tC7Y^2x)i~#9F_*0^o?`nHAt(KkN*C(p0DiX51^9&aY|l0p;EH9m9)O?ik-*RPY^?zIE+zW_{A>@v&-QE&z|Zyo z`~duH55Nz=&-MWPY|r+%(Vp$Y0e%7*&-O^*2jFMB0^lc^=h+^BAAp~2(Dok}hJ4^w zv1b(k001p?MObuGZ)S9NVRB^vVtFoNY;SL5WO*)Qa(QrcZ!T$VVP|D7P) XZ)9b1s0M%T00000NkvXXu0mjfRdx^0 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(); }