diff --git a/examples/animation/multiple anims.php b/examples/animation/multiple anims.php
index 2ae09ac4..5189cfe3 100644
--- a/examples/animation/multiple anims.php
+++ b/examples/animation/multiple anims.php
@@ -7,7 +7,7 @@
- var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create });
+ var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
function preload() {
game.load.atlas('bot', 'assets/misc/NumberSprite.png', 'assets/misc/NumberSprite.json');
@@ -22,7 +22,7 @@
bot.animations.add('num3', ['num30000','num30001','num30002','num30003','num30004','num30005'], 24, false, false);
// bot.animations.play('num1', 15, true);
- bot.animations.play('num2', 15, true);
+ //bot.animations.play('num2', 15, true);
// bot.animations.play('num3', 15, true);
}
diff --git a/examples/camera/follow styles.php b/examples/camera/follow styles.php
index 5ff57587..148eec18 100644
--- a/examples/camera/follow styles.php
+++ b/examples/camera/follow styles.php
@@ -46,7 +46,7 @@
// background images
- game.add.sprite(0, 0, 'sky');
+ game.add.tileSprite(0, 0,1400,600, 'sky');
game.add.sprite(0, 360, 'ground');
game.add.sprite(0, 400, 'river');
game.add.sprite(200, 120, 'cloud0');
diff --git a/examples/camera/world sprite.php b/examples/camera/world sprite.php
index ca22cb9c..9a0dca40 100644
--- a/examples/camera/world sprite.php
+++ b/examples/camera/world sprite.php
@@ -12,7 +12,7 @@
function preload() {
- game.world.setBounds(1920, 1200);
+ game.world.setBounds(0,0,1920, 1200);
game.load.image('backdrop', 'assets/pics/remember-me.jpg');
game.load.image('card', 'assets/sprites/mana_card.png');
diff --git a/examples/collision/group vs group.php b/examples/collision/group vs group.php
index 195a5642..d8a03298 100644
--- a/examples/collision/group vs group.php
+++ b/examples/collision/group vs group.php
@@ -56,16 +56,16 @@
function update() {
- sprite.velocity.x = 0;
- sprite.velocity.y = 0;
+ sprite.body.velocity.x = 0;
+ sprite.body.velocity.y = 0;
if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT))
{
- sprite.velocity.x = -200;
+ sprite.body.velocity.x = -200;
}
else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT))
{
- sprite.velocity.x = 200;
+ sprite.body.velocity.x = 200;
}
if (game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR))
@@ -86,7 +86,7 @@
if (bullet)
{
bullet.reset(sprite.x + 6, sprite.y - 8);
- bullet.velocity.y = -300;
+ bullet.body.velocity.y = -300;
bulletTime = game.time.now + 250;
}
}
diff --git a/examples/collision/sprite vs group.php b/examples/collision/sprite vs group.php
index a5c70261..a8153b41 100644
--- a/examples/collision/sprite vs group.php
+++ b/examples/collision/sprite vs group.php
@@ -49,25 +49,25 @@
function update() {
- sprite.velocity.x = 0;
- sprite.velocity.y = 0;
+ sprite.body.velocity.x = 0;
+ sprite.body.velocity.y = 0;
if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT))
{
- sprite.velocity.x = -200;
+ sprite.body.velocity.x = -200;
}
else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT))
{
- sprite.velocity.x = 200;
+ sprite.body.velocity.x = 200;
}
if (game.input.keyboard.isDown(Phaser.Keyboard.UP))
{
- sprite.velocity.y = -200;
+ sprite.body.velocity.y = -200;
}
else if (game.input.keyboard.isDown(Phaser.Keyboard.DOWN))
{
- sprite.velocity.y = 200;
+ sprite.body.velocity.y = 200;
}
game.physics.collide(sprite, group, collisionHandler, null, this);
diff --git a/examples/display/graphics.php b/examples/display/graphics.php
index 2a102148..530fa88d 100644
--- a/examples/display/graphics.php
+++ b/examples/display/graphics.php
@@ -55,8 +55,6 @@
graphics.moveTo(30,30);
graphics.lineTo(600, 300);
- game.add.tween(graphics).to({ x: 200 }, 2000, Phaser.Easing.Linear.None, true, 0, 1000, true);
-
}
diff --git a/examples/games/invaders.php b/examples/games/invaders.php
index f2d59ff6..05e671d2 100644
--- a/examples/games/invaders.php
+++ b/examples/games/invaders.php
@@ -65,16 +65,16 @@
function update() {
- player.velocity.x = 0;
- player.velocity.y = 0;
+ player.body.velocity.x = 0;
+ player.body.velocity.y = 0;
if (game.input.keyboard.isDown(Phaser.Keyboard.LEFT))
{
- player.velocity.x = -200;
+ player.body.velocity.x = -200;
}
else if (game.input.keyboard.isDown(Phaser.Keyboard.RIGHT))
{
- player.velocity.x = 200;
+ player.body.velocity.x = 200;
}
if (game.input.keyboard.isDown(Phaser.Keyboard.SPACEBAR))
@@ -95,7 +95,7 @@
if (bullet)
{
bullet.reset(player.x, player.y - 8);
- bullet.velocity.y = -300;
+ bullet.body.velocity.y = -300;
bulletTime = game.time.now + 250;
}
}
diff --git a/examples/geometry/circle.php b/examples/geometry/circle.php
new file mode 100644
index 00000000..3672d01f
--- /dev/null
+++ b/examples/geometry/circle.php
@@ -0,0 +1,32 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/geometry/line.php b/examples/geometry/line.php
new file mode 100644
index 00000000..edfd6474
--- /dev/null
+++ b/examples/geometry/line.php
@@ -0,0 +1,32 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/geometry/playing with points.php b/examples/geometry/playing with points.php
new file mode 100644
index 00000000..c1e008c7
--- /dev/null
+++ b/examples/geometry/playing with points.php
@@ -0,0 +1,70 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/geometry/rectangle.php b/examples/geometry/rectangle.php
new file mode 100644
index 00000000..c1d9211c
--- /dev/null
+++ b/examples/geometry/rectangle.php
@@ -0,0 +1,30 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/geometry/rotate point.php b/examples/geometry/rotate point.php
new file mode 100644
index 00000000..25905f26
--- /dev/null
+++ b/examples/geometry/rotate point.php
@@ -0,0 +1,47 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/groups/group as layer.php b/examples/groups/group as layer.php
index 5ee9e4f0..ac433a8d 100644
--- a/examples/groups/group as layer.php
+++ b/examples/groups/group as layer.php
@@ -11,7 +11,7 @@
var game = new Phaser.Game(800, 600, Phaser.CANVAS, '', { preload: preload, create: create,render:render});
function preload() {
- game.world.setBounds(1280, 800);
+ game.world.setBounds(0,0,1280, 800);
game.load.image('ground', 'assets/tests/ground-2x.png');
game.load.image('river', 'assets/tests/river-2x.png');
diff --git a/examples/input/game scale.php b/examples/input/game scale.php
index 7aa95b3a..c977bd65 100644
--- a/examples/input/game scale.php
+++ b/examples/input/game scale.php
@@ -27,7 +27,7 @@
function create() {
//We increase the size of our game world
- game.world.setBounds(2000, 2000);
+ game.world.setBounds(0,0,2000, 2000);
for (var i = 0; i < 1000; i++)
{
diff --git a/examples/input/keyboard.php b/examples/input/keyboard.php
index 423a71e6..26078b13 100644
--- a/examples/input/keyboard.php
+++ b/examples/input/keyboard.php
@@ -15,7 +15,7 @@
var speed=4;
function preload() {
- game.world.setBounds(1280, 600);
+ game.world.setBounds(0,0,1280, 600);
game.load.image('ground', 'assets/tests/ground-2x.png');
game.load.image('river', 'assets/tests/river-2x.png');
game.load.image('sky', 'assets/tests/sky-2x.png');
@@ -31,7 +31,7 @@
}
function create() {
// background images
- game.add.sprite(0, 0, 'sky');
+ game.add.tileSprite(0, 0,1280,600, 'sky');
game.add.sprite(0, 360, 'ground');
game.add.sprite(0, 400, 'river');
game.add.sprite(200, 120, 'cloud0');
diff --git a/examples/input/override browser keyboard controls.php b/examples/input/override browser keyboard controls.php
index ed382531..71eed94b 100644
--- a/examples/input/override browser keyboard controls.php
+++ b/examples/input/override browser keyboard controls.php
@@ -15,7 +15,7 @@
var speed=4;
function preload() {
- game.world.setBounds(1280, 600);
+ game.world.setBounds(0,0,1280, 600);
game.load.image('ground', 'assets/tests/ground-2x.png');
game.load.image('river', 'assets/tests/river-2x.png');
game.load.image('sky', 'assets/tests/sky-2x.png');
diff --git a/examples/input/pixelpick3.php b/examples/input/pixelpick - scrolling background.php
similarity index 93%
rename from examples/input/pixelpick3.php
rename to examples/input/pixelpick - scrolling background.php
index e9473637..e8d6495b 100644
--- a/examples/input/pixelpick3.php
+++ b/examples/input/pixelpick - scrolling background.php
@@ -1,5 +1,5 @@
@@ -23,10 +23,10 @@
function create() {
// Make our world big ...
- game.world.setBounds(4000, 2000);
+ game.world.setBounds(0,0,4000, 2000);
// Scrolling background
- s = game.add.tileSprite(0, 0, 800, 600, 'stars');
+ s = game.add.tileSprite(0, 0, 4000, 600, 'stars');
b = game.add.sprite(200, 200, 'mummy');
b.anchor.setTo(0.5, 0.5);
diff --git a/examples/input/pixelpick2.php b/examples/input/pixelpick - spritesheet.php
similarity index 88%
rename from examples/input/pixelpick2.php
rename to examples/input/pixelpick - spritesheet.php
index 8cb96428..4eaad2b6 100644
--- a/examples/input/pixelpick2.php
+++ b/examples/input/pixelpick - spritesheet.php
@@ -1,5 +1,5 @@
@@ -7,7 +7,7 @@
- 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, '', { preload: preload, create: create, render: render });
function preload() {
@@ -47,10 +47,6 @@
console.log('out');
}
- function update() {
- // b.angle += 0.1;
- }
-
function render() {
game.debug.renderSpriteInputInfo(b, 32, 32);
diff --git a/examples/input/pixelpick.php b/examples/input/pixelpick.php
index 83917d71..8c4e9fb0 100644
--- a/examples/input/pixelpick.php
+++ b/examples/input/pixelpick.php
@@ -1,5 +1,5 @@
diff --git a/examples/loader/preloadSprite.php b/examples/loader/preloadSprite.php
new file mode 100644
index 00000000..0b22a34e
--- /dev/null
+++ b/examples/loader/preloadSprite.php
@@ -0,0 +1,45 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/quadtree/quadtree.php b/examples/quadtree/quadtree.php
index 2cd20d15..ddb3c76f 100644
--- a/examples/quadtree/quadtree.php
+++ b/examples/quadtree/quadtree.php
@@ -20,7 +20,7 @@
function create() {
- game.world.setBounds(2000, 2000);
+ game.world.setBounds(0,0,2000, 2000);
aliens = [];
diff --git a/examples/sprites/collide world bounds.php b/examples/sprites/collide world bounds.php
new file mode 100644
index 00000000..35dbf284
--- /dev/null
+++ b/examples/sprites/collide world bounds.php
@@ -0,0 +1,40 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/sprites/destroy.php b/examples/sprites/destroy.php
new file mode 100644
index 00000000..2a611f91
--- /dev/null
+++ b/examples/sprites/destroy.php
@@ -0,0 +1,39 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/examples/sprites/scale a sprite.php b/examples/sprites/scale a sprite.php
new file mode 100644
index 00000000..ccfa8852
--- /dev/null
+++ b/examples/sprites/scale a sprite.php
@@ -0,0 +1,33 @@
+
+
+
+
+
\ No newline at end of file