From 3acdad92cb3de2606d54c18fb6b44468bbcb9884 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 11 Oct 2013 22:26:27 +0100 Subject: [PATCH 1/4] 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 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z9${IMA-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(); } From eb9899804638ec1f6bdcbe6a8416f49de21f1c61 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 11 Oct 2013 22:29:50 +0100 Subject: [PATCH 2/4] Testing --- .../Animation from a JSON object.php | 144 ++++++++++++++++++ .../Animation from a texturePacker file.php | 38 +++++ examples/animation/animation wraparound.php | 52 +++++++ examples/assets/maps/cybernoid.png.png | Bin 0 -> 4849 bytes .../groups/add to group after creation.php | 63 ++++++++ examples/groups/bring a group to top.php | 101 ++++++++++++ .../groups/bring specific sprites to top.php | 46 ++++++ .../groups/create a sprite inside a group.php | 56 +++++++ examples/input/drag several sprites.php | 51 +++++++ examples/loader/random images from loader.php | 50 ++++++ examples/sprites/add a sprite.php | 28 ++++ examples/sprites/add several sprites.php | 61 ++++++++ examples/sprites/move a sprite.php | 64 ++++++++ examples/sprites/multiple .php | 59 +++++++ ...several sprites using one texture file.php | 59 +++++++ .../crop and see part of an image.php | 44 ++++++ .../crop and tween horizontally.php | 42 +++++ .../crop and tween vertically.php | 42 +++++ examples/tweens/bounce.php | 48 ++++++ examples/tweens/bubbles.php | 44 ++++++ examples/tweens/combined tweens.php | 73 +++++++++ examples/tweens/easing spritesheets.php | 42 +++++ examples/tweens/easing.php | 54 +++++++ examples/tweens/fading in a sprite.php | 34 +++++ .../tweens/tweening several properties.php | 40 +++++ 25 files changed, 1335 insertions(+) create mode 100644 examples/animation/Animation from a JSON object.php create mode 100644 examples/animation/Animation from a texturePacker file.php create mode 100644 examples/animation/animation wraparound.php create mode 100644 examples/assets/maps/cybernoid.png.png create mode 100644 examples/groups/add to group after creation.php create mode 100644 examples/groups/bring a group to top.php create mode 100644 examples/groups/bring specific sprites to top.php create mode 100644 examples/groups/create a sprite inside a group.php create mode 100644 examples/input/drag several sprites.php create mode 100644 examples/loader/random images from loader.php create mode 100644 examples/sprites/add a sprite.php create mode 100644 examples/sprites/add several sprites.php create mode 100644 examples/sprites/move a sprite.php create mode 100644 examples/sprites/multiple .php create mode 100644 examples/sprites/several sprites using one texture file.php create mode 100644 examples/texture crop/crop and see part of an image.php create mode 100644 examples/texture crop/crop and tween horizontally.php create mode 100644 examples/texture crop/crop and tween vertically.php create mode 100644 examples/tweens/bounce.php create mode 100644 examples/tweens/bubbles.php create mode 100644 examples/tweens/combined tweens.php create mode 100644 examples/tweens/easing spritesheets.php create mode 100644 examples/tweens/easing.php create mode 100644 examples/tweens/fading in a sprite.php create mode 100644 examples/tweens/tweening several properties.php diff --git a/examples/animation/Animation from a JSON object.php b/examples/animation/Animation from a JSON object.php new file mode 100644 index 00000000..c42d0643 --- /dev/null +++ b/examples/animation/Animation from a JSON object.php @@ -0,0 +1,144 @@ + + + + + \ No newline at end of file diff --git a/examples/animation/Animation from a texturePacker file.php b/examples/animation/Animation from a texturePacker file.php new file mode 100644 index 00000000..67420bd1 --- /dev/null +++ b/examples/animation/Animation from a texturePacker file.php @@ -0,0 +1,38 @@ + + + + + \ No newline at end of file diff --git a/examples/animation/animation wraparound.php b/examples/animation/animation wraparound.php new file mode 100644 index 00000000..aef294fe --- /dev/null +++ b/examples/animation/animation wraparound.php @@ -0,0 +1,52 @@ + + + + + \ No newline at end of file diff --git a/examples/assets/maps/cybernoid.png.png b/examples/assets/maps/cybernoid.png.png new file mode 100644 index 0000000000000000000000000000000000000000..8f49737ce6c94def90ece22b9d3e9f12ad3d7ef9 GIT binary patch literal 4849 zcmV~S1__1rR_fY%x?c3H~zr8-n^Y{9py6JOY+w!M>AD+J+bz}eatS0+= zea^1I>;KBf_w#q>|NR#Vj|UVw&H@n~BhSJ69{D;7@B!ZU@s$9t|H11&?YW`eqR`11#T6<=!ReWBs*%A01VWGwdv2z zB!MFkZ&Fu`o|_7RE`SDUYp?f&6x~4&hEODV*WX0HW4*6`p8yF zXFbT902aC~(s@_4VOD^nZKpz5oudJgprQ+ar1uVbC4Jek@J3SSur>|w>o}zUB6zEf zIMz4T&07s{1Y!yBXd^9ZfXeF-QXQlOwhRk&QP2f~9tEHpFv;ZU(-K;w14~e^@IqMU zXx+HoZG}?6tGy9g0q>D;fP@Y)cYXx->W1r1K9ICnBR|#59U&fst%TFfC3mAe&z)!k-)`%VAcl_w`8>&O@h3G zR!d)T+)NTUqBh__hLW1d6X2;6+BF1&7veKIn1NhNk(+21KQQt#Wcsi=5{Ka3AQ#8U z|1_d`A#bbCt)RvRaYRS6E`a4>uq2Xo;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kpoV=B28f*lhL%*L4F#G)l zuCcJ#tIBv24}1N?vU8XO-u4rpXbR#lvev}1@W>=F)DXbNYyv8Mqf+>g0-IDJ?k|B! znNpVOx9+o+o@$lATH;1J$&$KZAF1IQivqk;BaA6BS{R_T%}4?f1vshyG6M=3bEtX8 z_qIUD+9?!GBo!^FytFN1g21(;?|MgCDnx4`k{*B~YgR;!H+NDi0JwFo;9c8-I{c7W zyc{J9E#AB=&C-{u35FC#(w9l#j6PfiaK!u2oB~=9HvcGqy+X#JH6IF82MI0G+2kLH zNM58`GzBsmR0y-2Yj7G98fB^g{s=dkw`hmwmFTHmz}5$jw#)?$OJuzuAE-a9SDv># z5#~xpfmtX_O{xIkGbHfDjajDa0on|?*wW={ovFzT2a?}TGUp2tqZ)E|NrChb!4b9-rJZ{(j zE&ywY^V12L;Isr@J5oxD-GvMcsg~P`xz9${IMA-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 literal 0 HcmV?d00001 diff --git a/examples/groups/add to group after creation.php b/examples/groups/add to group after creation.php new file mode 100644 index 00000000..b224864a --- /dev/null +++ b/examples/groups/add to group after creation.php @@ -0,0 +1,63 @@ + + + + + + diff --git a/examples/groups/bring a group to top.php b/examples/groups/bring a group to top.php new file mode 100644 index 00000000..5a8324aa --- /dev/null +++ b/examples/groups/bring a group to top.php @@ -0,0 +1,101 @@ + + + + + + diff --git a/examples/groups/bring specific sprites to top.php b/examples/groups/bring specific sprites to top.php new file mode 100644 index 00000000..60c1c512 --- /dev/null +++ b/examples/groups/bring specific sprites to top.php @@ -0,0 +1,46 @@ + + + + + + diff --git a/examples/groups/create a sprite inside a group.php b/examples/groups/create a sprite inside a group.php new file mode 100644 index 00000000..16ccdf0c --- /dev/null +++ b/examples/groups/create a sprite inside a group.php @@ -0,0 +1,56 @@ + + + + + + diff --git a/examples/input/drag several sprites.php b/examples/input/drag several sprites.php new file mode 100644 index 00000000..bdea15f1 --- /dev/null +++ b/examples/input/drag several sprites.php @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git a/examples/loader/random images from loader.php b/examples/loader/random images from loader.php new file mode 100644 index 00000000..732ed414 --- /dev/null +++ b/examples/loader/random images from loader.php @@ -0,0 +1,50 @@ + + + + + \ No newline at end of file diff --git a/examples/sprites/add a sprite.php b/examples/sprites/add a sprite.php new file mode 100644 index 00000000..cb889eb7 --- /dev/null +++ b/examples/sprites/add a sprite.php @@ -0,0 +1,28 @@ + + + + + \ No newline at end of file diff --git a/examples/sprites/add several sprites.php b/examples/sprites/add several sprites.php new file mode 100644 index 00000000..1263b99d --- /dev/null +++ b/examples/sprites/add several sprites.php @@ -0,0 +1,61 @@ + + + + + \ No newline at end of file diff --git a/examples/sprites/move a sprite.php b/examples/sprites/move a sprite.php new file mode 100644 index 00000000..13b8fceb --- /dev/null +++ b/examples/sprites/move a sprite.php @@ -0,0 +1,64 @@ + + + + + \ No newline at end of file diff --git a/examples/sprites/multiple .php b/examples/sprites/multiple .php new file mode 100644 index 00000000..25bb6e2d --- /dev/null +++ b/examples/sprites/multiple .php @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/examples/sprites/several sprites using one texture file.php b/examples/sprites/several sprites using one texture file.php new file mode 100644 index 00000000..25bb6e2d --- /dev/null +++ b/examples/sprites/several sprites using one texture file.php @@ -0,0 +1,59 @@ + + + + + \ No newline at end of file diff --git a/examples/texture crop/crop and see part of an image.php b/examples/texture crop/crop and see part of an image.php new file mode 100644 index 00000000..31cbd4c7 --- /dev/null +++ b/examples/texture crop/crop and see part of an image.php @@ -0,0 +1,44 @@ + + + + + \ No newline at end of file diff --git a/examples/texture crop/crop and tween horizontally.php b/examples/texture crop/crop and tween horizontally.php new file mode 100644 index 00000000..f4daeb7e --- /dev/null +++ b/examples/texture crop/crop and tween horizontally.php @@ -0,0 +1,42 @@ + + + + + \ No newline at end of file diff --git a/examples/texture crop/crop and tween vertically.php b/examples/texture crop/crop and tween vertically.php new file mode 100644 index 00000000..0ca156e1 --- /dev/null +++ b/examples/texture crop/crop and tween vertically.php @@ -0,0 +1,42 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/bounce.php b/examples/tweens/bounce.php new file mode 100644 index 00000000..92a6663e --- /dev/null +++ b/examples/tweens/bounce.php @@ -0,0 +1,48 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/bubbles.php b/examples/tweens/bubbles.php new file mode 100644 index 00000000..cee5199d --- /dev/null +++ b/examples/tweens/bubbles.php @@ -0,0 +1,44 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/combined tweens.php b/examples/tweens/combined tweens.php new file mode 100644 index 00000000..7afd42e8 --- /dev/null +++ b/examples/tweens/combined tweens.php @@ -0,0 +1,73 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/easing spritesheets.php b/examples/tweens/easing spritesheets.php new file mode 100644 index 00000000..18f0ae62 --- /dev/null +++ b/examples/tweens/easing spritesheets.php @@ -0,0 +1,42 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/easing.php b/examples/tweens/easing.php new file mode 100644 index 00000000..6dc369f2 --- /dev/null +++ b/examples/tweens/easing.php @@ -0,0 +1,54 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/fading in a sprite.php b/examples/tweens/fading in a sprite.php new file mode 100644 index 00000000..51790c7c --- /dev/null +++ b/examples/tweens/fading in a sprite.php @@ -0,0 +1,34 @@ + + + + + \ No newline at end of file diff --git a/examples/tweens/tweening several properties.php b/examples/tweens/tweening several properties.php new file mode 100644 index 00000000..d358278c --- /dev/null +++ b/examples/tweens/tweening several properties.php @@ -0,0 +1,40 @@ + + + + + \ No newline at end of file From 786aa2900e44985714761af86dddde47fd8d6864 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 11 Oct 2013 22:49:51 +0100 Subject: [PATCH 3/4] Final commit of the day --- .../physics/group move towards object.php | 4 +- examples/sprites/multiple .php | 59 ------------------- ...several sprites using one texture file.php | 2 +- ...e1.php => tilesprite inside crop rect.php} | 0 .../{tilesprite2.php => tilesprite.php} | 0 examples/tweens/fading in a sprite.php | 2 +- .../tweens/tweening several properties.php | 2 +- 7 files changed, 5 insertions(+), 64 deletions(-) delete mode 100644 examples/sprites/multiple .php rename examples/tile sprites/{tilesprite1.php => tilesprite inside crop rect.php} (100%) rename examples/tile sprites/{tilesprite2.php => tilesprite.php} (100%) diff --git a/examples/physics/group move towards object.php b/examples/physics/group move towards object.php index edc888c1..cc33d73e 100644 --- a/examples/physics/group move towards object.php +++ b/examples/physics/group move towards object.php @@ -1,5 +1,5 @@ @@ -35,7 +35,7 @@ // First is the callback // Second is the context in which the callback runs, in this case game.physics // Third is the parameter the callback expects - it is always sent the Group child as the first parameter - balls.forEach(game.physics.moveTowardsMouse, game.physics, false, 200); + balls.forEach(game.physics.moveToPointer, game.physics, false, 200); } else { diff --git a/examples/sprites/multiple .php b/examples/sprites/multiple .php deleted file mode 100644 index 25bb6e2d..00000000 --- a/examples/sprites/multiple .php +++ /dev/null @@ -1,59 +0,0 @@ - - - - - \ No newline at end of file diff --git a/examples/sprites/several sprites using one texture file.php b/examples/sprites/several sprites using one texture file.php index 25bb6e2d..0d8158da 100644 --- a/examples/sprites/several sprites using one texture file.php +++ b/examples/sprites/several sprites using one texture file.php @@ -1,5 +1,5 @@ diff --git a/examples/tile sprites/tilesprite1.php b/examples/tile sprites/tilesprite inside crop rect.php similarity index 100% rename from examples/tile sprites/tilesprite1.php rename to examples/tile sprites/tilesprite inside crop rect.php diff --git a/examples/tile sprites/tilesprite2.php b/examples/tile sprites/tilesprite.php similarity index 100% rename from examples/tile sprites/tilesprite2.php rename to examples/tile sprites/tilesprite.php diff --git a/examples/tweens/fading in a sprite.php b/examples/tweens/fading in a sprite.php index 51790c7c..ca4f11f0 100644 --- a/examples/tweens/fading in a sprite.php +++ b/examples/tweens/fading in a sprite.php @@ -1,5 +1,5 @@ diff --git a/examples/tweens/tweening several properties.php b/examples/tweens/tweening several properties.php index d358278c..4d6c8a58 100644 --- a/examples/tweens/tweening several properties.php +++ b/examples/tweens/tweening several properties.php @@ -1,5 +1,5 @@ From 44613f71407862d404e89b3c65298dfb7a9837a0 Mon Sep 17 00:00:00 2001 From: Webeled Date: Mon, 14 Oct 2013 13:40:02 +0100 Subject: [PATCH 4/4] Should resolve the conflict --- examples/tilemaps/wip1.php | 71 ++++++++++++++++++++++++++------------ 1 file changed, 49 insertions(+), 22 deletions(-) diff --git a/examples/tilemaps/wip1.php b/examples/tilemaps/wip1.php index 731ba5c9..eae717d7 100644 --- a/examples/tilemaps/wip1.php +++ b/examples/tilemaps/wip1.php @@ -10,54 +10,81 @@ function preload() { - game.load.tilemap('cybernoidLevel3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.JSON); - game.load.tileset('cybernoidTiles', 'assets/maps/cybernoid.png', 16, 16); + game.load.tilemap('level3', 'assets/maps/cybernoid.json', null, Phaser.Tilemap.TILED_JSON); + game.load.tileset('tiles', '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' + ]; - // layer = new Phaser.TilemapLayer(game, 0, 0, 500, 500, [], 'snes'); + // map.dump(); - // layer = new Phaser.TilemapLayer(game, 0, 0, 500, 500); + // 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.sprite.anchor.setTo(0.5, 0.5); - // layer.load(mapData, tileset); - // layer.create(mapWidth, mapHeight, [tileset]); + game.world.add(layer.sprite); - // layer.updateTileset('cybernoidTiles'); // can change on the fly + // layer.sprite.scale.setTo(2, 2); + // Works a treat :) + // 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); - // 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(); - */ + cursors = game.input.keyboard.createCursorKeys(); } 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(); }