Skip to content

Commit 77b553a

Browse files
author
Webeled
committed
Test
1 parent 664c512 commit 77b553a

23 files changed

Lines changed: 47 additions & 96 deletions

examples/camera/basic follow.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ function create() {
2828

2929
game.add.tileSprite(0, 0, 2000, 2000, 'background');
3030

31-
game.world.setSize(1400,1400);
31+
game.world.setBounds(1400,1400);
3232

3333
for(var i=0,nb=10;i<nb;i++){
3434

examples/camera/follow styles.php

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function preload() {
3636
function create() {
3737

3838
//make the world larger than the actual canvas
39-
game.world.setSize(1400,1400);
39+
game.world.setBounds(1400,1400);
4040

4141
for(var i=0,nb=10;i<nb;i++){
4242

@@ -46,18 +46,12 @@ function create() {
4646

4747

4848
// background images
49-
game.add.sprite(0, 0, 'sky')
50-
.scrollFactor.setTo(0, 0);
51-
game.add.sprite(0, 360, 'ground')
52-
.scrollFactor.setTo(0.5, 0.1);
53-
game.add.sprite(0, 400, 'river')
54-
.scrollFactor.setTo(1.3, 0.16);
55-
game.add.sprite(200, 120, 'cloud0')
56-
.scrollFactor.setTo(0.3, 0.1);
57-
game.add.sprite(-60, 120, 'cloud1')
58-
.scrollFactor.setTo(0.5, 0.1);
59-
game.add.sprite(900, 170, 'cloud2')
60-
.scrollFactor.setTo(0.7, 0.1);
49+
game.add.sprite(0, 0, 'sky');
50+
game.add.sprite(0, 360, 'ground');
51+
game.add.sprite(0, 400, 'river');
52+
game.add.sprite(200, 120, 'cloud0');
53+
game.add.sprite(-60, 120, 'cloud1');
54+
game.add.sprite(900, 170, 'cloud2');
6155

6256

6357
// ufo sprite

examples/camera/moving the camera.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,11 @@ function create() {
1818
game.stage.backgroundColor = '#2d2d2d';
1919

2020
// Make our game world 2000x2000 pixels in size (the default is to match the game size)
21-
game.world.setSize(2000, 2000);
21+
game.world.setBounds(2000, 2000);
2222

2323
for (var i = 0; i < 50; i++)
2424
{
2525
var s = game.add.sprite(game.world.randomX, game.world.randomY, 'mushroom');
26-
s.scrollFactor.setTo(0.5, 0.5);
2726
}
2827

2928
for (var i = 0; i < 50; i++)
@@ -34,7 +33,6 @@ function create() {
3433
for (var i = 0; i < 50; i++)
3534
{
3635
var s = game.add.sprite(game.world.randomX, game.world.randomY, 'mushroom');
37-
s.scrollFactor.setTo(2, 2);
3836
}
3937

4038
}

examples/camera/moving the game camera.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function create() {
1919

2020

2121
//setting the size of the game world larger than the tilemap's size
22-
game.world.setSize(2000,2000);
22+
game.world.setBounds(2000,2000);
2323

2424
game.stage.backgroundColor = '#255d3b';
2525

examples/camera/world sprite.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
function preload() {
1414

15-
game.world.setSize(1920, 1200);
15+
game.world.setBounds(1920, 1200);
1616

1717
game.load.image('backdrop', 'assets/pics/remember-me.jpg');
1818
game.load.image('card', 'assets/sprites/mana_card.png');

examples/display/linkedList.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ function create() {
4747
list.add(e.input);
4848
list.add(f.input);
4949

50-
list.dump();
51-
52-
// list.remove(d.input);
53-
54-
// list.dump();
55-
5650
}
5751

5852
})();

examples/games/starstruck.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ function create() {
3131
game.stage.backgroundColor = '#000000';
3232

3333
bg = game.add.tileSprite(0, 0, 800, 600, 'background');
34-
bg.scrollFactor.setTo(0, 0);
3534

3635
map = game.add.tilemap(0, 0, 'level1');
3736
map.setCollisionRange(1, 12, true, true, true, true);

examples/groups/add to group 1.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ function create() {
4646
}
4747
function render() {
4848

49-
game.debug.renderText('ufo added to game.world.group and "friendAndFoe" group', 20, 24);
49+
game.debug.renderText('ufo added to game.world.and "friendAndFoe" group', 20, 24);
5050
game.debug.renderText('others ONLY added to "enemies" group', 20, 40);
5151

5252
}

examples/groups/call all.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function kill(item) {
3636
item.kill();
3737
}
3838
function reviveAll() {
39-
game.world.group.callAll('revive');
39+
game.world.callAll('revive');
4040
}
4141
function render() {
4242

examples/groups/display order.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ function preload() {
2020

2121
}
2222

23-
var items;
23+
var items,
2424
card;
2525

2626
function create() {

0 commit comments

Comments
 (0)