From bdc8edea9dc1e0302acd6b457df883940d887bfa Mon Sep 17 00:00:00 2001 From: Webeled Date: Mon, 30 Sep 2013 17:30:45 +0100 Subject: [PATCH] Lots of new examples :) Lots of new examples, the wip/examples folder can be destoryed I think --- examples/display/fullscreen.php | 55 ++++++++ examples/display/linkedList.php | 65 +++++++++ .../groups/sub groups and group length.php | 77 +++++++++++ .../groups/swap children inside a group.php | 52 +++++++ examples/input/drag.php | 2 +- examples/input/drop limitation.php | 63 +++++++++ examples/input/game scale.php | 76 +++++++++++ examples/input/keyboard.php | 2 +- examples/input/motion lock - horizontal.php | 54 ++++++++ examples/input/motion lock - vertical.php | 54 ++++++++ examples/input/multi touch.php | 10 +- .../override browser keyboard controls.php | 127 ++++++++++++++++++ examples/misc/net.php | 39 ++++++ examples/physics/Motion.php | 80 +++++++++++ examples/physics/sprite bounds.php | 62 +++++++++ 15 files changed, 807 insertions(+), 11 deletions(-) create mode 100644 examples/display/fullscreen.php create mode 100644 examples/display/linkedList.php create mode 100644 examples/groups/sub groups and group length.php create mode 100644 examples/groups/swap children inside a group.php create mode 100644 examples/input/drop limitation.php create mode 100644 examples/input/game scale.php create mode 100644 examples/input/motion lock - horizontal.php create mode 100644 examples/input/motion lock - vertical.php create mode 100644 examples/input/override browser keyboard controls.php create mode 100644 examples/misc/net.php create mode 100644 examples/physics/Motion.php create mode 100644 examples/physics/sprite bounds.php diff --git a/examples/display/fullscreen.php b/examples/display/fullscreen.php new file mode 100644 index 00000000..966974c8 --- /dev/null +++ b/examples/display/fullscreen.php @@ -0,0 +1,55 @@ + + + + + \ No newline at end of file diff --git a/examples/display/linkedList.php b/examples/display/linkedList.php new file mode 100644 index 00000000..44e0a1f2 --- /dev/null +++ b/examples/display/linkedList.php @@ -0,0 +1,65 @@ + + + + + + diff --git a/examples/groups/sub groups and group length.php b/examples/groups/sub groups and group length.php new file mode 100644 index 00000000..d423dce8 --- /dev/null +++ b/examples/groups/sub groups and group length.php @@ -0,0 +1,77 @@ + + + + + + diff --git a/examples/groups/swap children inside a group.php b/examples/groups/swap children inside a group.php new file mode 100644 index 00000000..d4e9138d --- /dev/null +++ b/examples/groups/swap children inside a group.php @@ -0,0 +1,52 @@ + + + + + + diff --git a/examples/input/drag.php b/examples/input/drag.php index 5b22b440..8e0b42f7 100644 --- a/examples/input/drag.php +++ b/examples/input/drag.php @@ -1,5 +1,5 @@ diff --git a/examples/input/drop limitation.php b/examples/input/drop limitation.php new file mode 100644 index 00000000..a7326688 --- /dev/null +++ b/examples/input/drop limitation.php @@ -0,0 +1,63 @@ + + + + + + diff --git a/examples/input/game scale.php b/examples/input/game scale.php new file mode 100644 index 00000000..2a6c7d32 --- /dev/null +++ b/examples/input/game scale.php @@ -0,0 +1,76 @@ + + + + + diff --git a/examples/input/keyboard.php b/examples/input/keyboard.php index c5a432da..7b9a5def 100644 --- a/examples/input/keyboard.php +++ b/examples/input/keyboard.php @@ -44,7 +44,7 @@ game.add.sprite(900, 170, 'cloud2') .scrollFactor.setTo(0.7, 0.3); - // Create a ufo spirte as player. + // Create a ufo sprite as player. ufo = game.add.sprite(320, 240, 'ufo'); ufo.anchor.setTo(0.5, 0.5); diff --git a/examples/input/motion lock - horizontal.php b/examples/input/motion lock - horizontal.php new file mode 100644 index 00000000..39d4957b --- /dev/null +++ b/examples/input/motion lock - horizontal.php @@ -0,0 +1,54 @@ + + + + + diff --git a/examples/input/motion lock - vertical.php b/examples/input/motion lock - vertical.php new file mode 100644 index 00000000..a67e3a1f --- /dev/null +++ b/examples/input/motion lock - vertical.php @@ -0,0 +1,54 @@ + + + + + diff --git a/examples/input/multi touch.php b/examples/input/multi touch.php index a34ebe10..1ab9ccf3 100644 --- a/examples/input/multi touch.php +++ b/examples/input/multi touch.php @@ -7,13 +7,8 @@ (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.CANVAS, '', {create: create, render: render }); - function preload() { - - // game.load.image('disk', 'assets/sprites/ra_dont_crack_under_pressure.png'); - - } function create() { @@ -21,9 +16,6 @@ } - function update() { - } - function render() { game.debug.renderPointer(game.input.mousePointer); diff --git a/examples/input/override browser keyboard controls.php b/examples/input/override browser keyboard controls.php new file mode 100644 index 00000000..8d2cdb78 --- /dev/null +++ b/examples/input/override browser keyboard controls.php @@ -0,0 +1,127 @@ + + + + + + diff --git a/examples/misc/net.php b/examples/misc/net.php new file mode 100644 index 00000000..35032df4 --- /dev/null +++ b/examples/misc/net.php @@ -0,0 +1,39 @@ + + + + +Reload with query string + + + diff --git a/examples/physics/Motion.php b/examples/physics/Motion.php new file mode 100644 index 00000000..bb9dd509 --- /dev/null +++ b/examples/physics/Motion.php @@ -0,0 +1,80 @@ + + + + + + diff --git a/examples/physics/sprite bounds.php b/examples/physics/sprite bounds.php new file mode 100644 index 00000000..f299b2fb --- /dev/null +++ b/examples/physics/sprite bounds.php @@ -0,0 +1,62 @@ + + + + + +