From 903b11b730021deece294cc4ec7d5c62bbf2be76 Mon Sep 17 00:00:00 2001 From: Webeled Date: Fri, 27 Sep 2013 13:27:15 +0100 Subject: [PATCH] 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)