From 903b11b730021deece294cc4ec7d5c62bbf2be76 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 27 Sep 2013 13:27:15 +0100 Subject: [PATCH 1/3] Groups examples and some boolean checks corrected --- examples/camera/follow styles.php | 3 - 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/groups/call all.php | 52 +++++++++++++++ examples/groups/create group.php | 57 ++++++++++++++++ examples/groups/display order.php | 64 ++++++++++++++++++ examples/groups/for each.php | 50 ++++++++++++++ examples/groups/get first.php | 72 ++++++++++++++++++++ src/core/Game.js | 2 +- src/input/InputHandler.js | 2 +- 12 files changed, 563 insertions(+), 5 deletions(-) create mode 100644 examples/groups/add to group 1.php create mode 100644 examples/groups/add to group 2.php create mode 100644 examples/groups/bring to top 2.php create mode 100644 examples/groups/bring to top.php create mode 100644 examples/groups/call all.php create mode 100644 examples/groups/create group.php create mode 100644 examples/groups/display order.php create mode 100644 examples/groups/for each.php create mode 100644 examples/groups/get first.php diff --git a/examples/camera/follow styles.php b/examples/camera/follow styles.php index dac30a44..ee0f1dc9 100644 --- a/examples/camera/follow styles.php +++ b/examples/camera/follow styles.php @@ -71,9 +71,6 @@ game.camera.follow(ufo); - - - // follow style switch buttons btn0 = game.add.button(6, 40, 'button', lockonFollow,this, 0, 0, 0); btn1 = game.add.button(6, 120, 'button', platformerFollow,this, 1, 1, 1); diff --git a/examples/groups/add to group 1.php b/examples/groups/add to group 1.php new file mode 100644 index 00000000..03e6f9ca --- /dev/null +++ b/examples/groups/add to group 1.php @@ -0,0 +1,63 @@ + + + + + + diff --git a/examples/groups/add to group 2.php b/examples/groups/add to group 2.php new file mode 100644 index 00000000..726a1f68 --- /dev/null +++ b/examples/groups/add to group 2.php @@ -0,0 +1,56 @@ + + + + + + diff --git a/examples/groups/bring to top 2.php b/examples/groups/bring to top 2.php new file mode 100644 index 00000000..56872efc --- /dev/null +++ b/examples/groups/bring to top 2.php @@ -0,0 +1,101 @@ + + + + + + diff --git a/examples/groups/bring to top.php b/examples/groups/bring to top.php new file mode 100644 index 00000000..4849b19b --- /dev/null +++ b/examples/groups/bring to top.php @@ -0,0 +1,46 @@ + + + + + + diff --git a/examples/groups/call all.php b/examples/groups/call all.php new file mode 100644 index 00000000..c7f22265 --- /dev/null +++ b/examples/groups/call all.php @@ -0,0 +1,52 @@ + + + + + + diff --git a/examples/groups/create group.php b/examples/groups/create group.php new file mode 100644 index 00000000..3ce40f43 --- /dev/null +++ b/examples/groups/create group.php @@ -0,0 +1,57 @@ + + + + + + diff --git a/examples/groups/display order.php b/examples/groups/display order.php new file mode 100644 index 00000000..35b97990 --- /dev/null +++ b/examples/groups/display order.php @@ -0,0 +1,64 @@ + + + + + + diff --git a/examples/groups/for each.php b/examples/groups/for each.php new file mode 100644 index 00000000..32ca7739 --- /dev/null +++ b/examples/groups/for each.php @@ -0,0 +1,50 @@ + + + + + + diff --git a/examples/groups/get first.php b/examples/groups/get first.php new file mode 100644 index 00000000..c7cdd446 --- /dev/null +++ b/examples/groups/get first.php @@ -0,0 +1,72 @@ + + + + + + diff --git a/src/core/Game.js b/src/core/Game.js index c24dbb40..bf73da33 100644 --- a/src/core/Game.js +++ b/src/core/Game.js @@ -31,7 +31,7 @@ Phaser.Game = function (width, height, renderer, parent, state, transparent, ant renderer = renderer || Phaser.AUTO; parent = parent || ''; state = state || null; - transparent = transparent || false; + if (typeof transparent == 'undefined') { transparent = false; } antialias = typeof antialias === 'undefined' ? true : antialias; /** diff --git a/src/input/InputHandler.js b/src/input/InputHandler.js index 4bcec1bf..6f14400a 100644 --- a/src/input/InputHandler.js +++ b/src/input/InputHandler.js @@ -75,7 +75,7 @@ Phaser.InputHandler.prototype = { start: function (priority, useHandCursor) { priority = priority || 0; - useHandCursor = useHandCursor || false; + if (typeof useHandCursor == 'undefined') { useHandCursor = false; } // Turning on if (this.enabled == false) From efa01dcaa319bb403314145850372414d01cd4de Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 27 Sep 2013 18:06:36 +0100 Subject: [PATCH 2/3] Final commit of the day more groups examples --- examples/groups/group as layer.php | 91 ++++++++++++++++++++ examples/groups/group transform - rotate.php | 63 ++++++++++++++ examples/groups/group transform - tween.php | 72 ++++++++++++++++ examples/groups/group transform.php | 78 +++++++++++++++++ examples/groups/recyling.php | 70 +++++++++++++++ examples/groups/remove.php | 73 ++++++++++++++++ examples/groups/replace.php | 79 +++++++++++++++++ examples/groups/set All.php | 46 ++++++++++ 8 files changed, 572 insertions(+) create mode 100644 examples/groups/group as layer.php create mode 100644 examples/groups/group transform - rotate.php create mode 100644 examples/groups/group transform - tween.php create mode 100644 examples/groups/group transform.php create mode 100644 examples/groups/recyling.php create mode 100644 examples/groups/remove.php create mode 100644 examples/groups/replace.php create mode 100644 examples/groups/set All.php diff --git a/examples/groups/group as layer.php b/examples/groups/group as layer.php new file mode 100644 index 00000000..1e2d25aa --- /dev/null +++ b/examples/groups/group as layer.php @@ -0,0 +1,91 @@ + + + + + + diff --git a/examples/groups/group transform - rotate.php b/examples/groups/group transform - rotate.php new file mode 100644 index 00000000..f2b0c7cd --- /dev/null +++ b/examples/groups/group transform - rotate.php @@ -0,0 +1,63 @@ + + + + + + diff --git a/examples/groups/group transform - tween.php b/examples/groups/group transform - tween.php new file mode 100644 index 00000000..b11d2560 --- /dev/null +++ b/examples/groups/group transform - tween.php @@ -0,0 +1,72 @@ + + + + + + diff --git a/examples/groups/group transform.php b/examples/groups/group transform.php new file mode 100644 index 00000000..c6a4fcea --- /dev/null +++ b/examples/groups/group transform.php @@ -0,0 +1,78 @@ + + + + + + diff --git a/examples/groups/recyling.php b/examples/groups/recyling.php new file mode 100644 index 00000000..bee0343a --- /dev/null +++ b/examples/groups/recyling.php @@ -0,0 +1,70 @@ + + + + + + diff --git a/examples/groups/remove.php b/examples/groups/remove.php new file mode 100644 index 00000000..1684870c --- /dev/null +++ b/examples/groups/remove.php @@ -0,0 +1,73 @@ + + + + + + diff --git a/examples/groups/replace.php b/examples/groups/replace.php new file mode 100644 index 00000000..6bbf5ba8 --- /dev/null +++ b/examples/groups/replace.php @@ -0,0 +1,79 @@ + + + + + + diff --git a/examples/groups/set All.php b/examples/groups/set All.php new file mode 100644 index 00000000..356bbaf7 --- /dev/null +++ b/examples/groups/set All.php @@ -0,0 +1,46 @@ + + + + + + From 8096dc67f5a7e094899d77c1a4dcb5f04a478d76 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 27 Sep 2013 18:25:18 +0100 Subject: [PATCH 3/3] Corrected few typos and added a keyboard exampl --- examples/groups/add to group 2.php | 2 +- examples/groups/create group.php | 2 +- examples/groups/group transform - rotate.php | 2 +- examples/groups/group transform.php | 2 +- examples/input/keyboard.php | 95 ++++++++++++++++++++ 5 files changed, 99 insertions(+), 4 deletions(-) create mode 100644 examples/input/keyboard.php diff --git a/examples/groups/add to group 2.php b/examples/groups/add to group 2.php index 726a1f68..5ece783f 100644 --- a/examples/groups/add to group 2.php +++ b/examples/groups/add to group 2.php @@ -23,7 +23,7 @@ friendAndFoe = game.add.group(); enemies = game.add.group(); - // You can directly create sprite and add it to a group + // You can directly create a sprite and add it to a group // using just one line. friendAndFoe.create(200, 240, 'ufo'); diff --git a/examples/groups/create group.php b/examples/groups/create group.php index 3ce40f43..0474e4bf 100644 --- a/examples/groups/create group.php +++ b/examples/groups/create group.php @@ -1,6 +1,6 @@ diff --git a/examples/groups/group transform - rotate.php b/examples/groups/group transform - rotate.php index f2b0c7cd..e569cc68 100644 --- a/examples/groups/group transform - rotate.php +++ b/examples/groups/group transform - rotate.php @@ -1,6 +1,6 @@ diff --git a/examples/groups/group transform.php b/examples/groups/group transform.php index c6a4fcea..06a8854a 100644 --- a/examples/groups/group transform.php +++ b/examples/groups/group transform.php @@ -1,6 +1,6 @@ diff --git a/examples/input/keyboard.php b/examples/input/keyboard.php new file mode 100644 index 00000000..c5a432da --- /dev/null +++ b/examples/input/keyboard.php @@ -0,0 +1,95 @@ + + + + + +