mirror of
https://github.com/wassname/phaser.git
synced 2026-08-08 11:23:41 +08:00
Test
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
|
||||
game.add.tileSprite(0, 0, 2000, 2000, 'background');
|
||||
|
||||
game.world.setSize(1400,1400);
|
||||
game.world.setBounds(1400,1400);
|
||||
|
||||
for(var i=0,nb=10;i<nb;i++){
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
function create() {
|
||||
|
||||
//make the world larger than the actual canvas
|
||||
game.world.setSize(1400,1400);
|
||||
game.world.setBounds(1400,1400);
|
||||
|
||||
for(var i=0,nb=10;i<nb;i++){
|
||||
|
||||
@@ -46,18 +46,12 @@
|
||||
|
||||
|
||||
// background images
|
||||
game.add.sprite(0, 0, 'sky')
|
||||
.scrollFactor.setTo(0, 0);
|
||||
game.add.sprite(0, 360, 'ground')
|
||||
.scrollFactor.setTo(0.5, 0.1);
|
||||
game.add.sprite(0, 400, 'river')
|
||||
.scrollFactor.setTo(1.3, 0.16);
|
||||
game.add.sprite(200, 120, 'cloud0')
|
||||
.scrollFactor.setTo(0.3, 0.1);
|
||||
game.add.sprite(-60, 120, 'cloud1')
|
||||
.scrollFactor.setTo(0.5, 0.1);
|
||||
game.add.sprite(900, 170, 'cloud2')
|
||||
.scrollFactor.setTo(0.7, 0.1);
|
||||
game.add.sprite(0, 0, 'sky');
|
||||
game.add.sprite(0, 360, 'ground');
|
||||
game.add.sprite(0, 400, 'river');
|
||||
game.add.sprite(200, 120, 'cloud0');
|
||||
game.add.sprite(-60, 120, 'cloud1');
|
||||
game.add.sprite(900, 170, 'cloud2');
|
||||
|
||||
|
||||
// ufo sprite
|
||||
|
||||
@@ -18,12 +18,11 @@
|
||||
game.stage.backgroundColor = '#2d2d2d';
|
||||
|
||||
// Make our game world 2000x2000 pixels in size (the default is to match the game size)
|
||||
game.world.setSize(2000, 2000);
|
||||
game.world.setBounds(2000, 2000);
|
||||
|
||||
for (var i = 0; i < 50; i++)
|
||||
{
|
||||
var s = game.add.sprite(game.world.randomX, game.world.randomY, 'mushroom');
|
||||
s.scrollFactor.setTo(0.5, 0.5);
|
||||
}
|
||||
|
||||
for (var i = 0; i < 50; i++)
|
||||
@@ -34,7 +33,6 @@
|
||||
for (var i = 0; i < 50; i++)
|
||||
{
|
||||
var s = game.add.sprite(game.world.randomX, game.world.randomY, 'mushroom');
|
||||
s.scrollFactor.setTo(2, 2);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
|
||||
|
||||
//setting the size of the game world larger than the tilemap's size
|
||||
game.world.setSize(2000,2000);
|
||||
game.world.setBounds(2000,2000);
|
||||
|
||||
game.stage.backgroundColor = '#255d3b';
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
function preload() {
|
||||
|
||||
game.world.setSize(1920, 1200);
|
||||
game.world.setBounds(1920, 1200);
|
||||
|
||||
game.load.image('backdrop', 'assets/pics/remember-me.jpg');
|
||||
game.load.image('card', 'assets/sprites/mana_card.png');
|
||||
|
||||
Reference in New Issue
Block a user