add background to game
This commit is contained in:
parent
5942746bf4
commit
2c12b43b5e
1 changed files with 2 additions and 2 deletions
|
@ -132,7 +132,7 @@ Q.Sprite.extend("Starbug",{
|
||||||
Q.scene("level1",function(stage) {
|
Q.scene("level1",function(stage) {
|
||||||
|
|
||||||
// Add in a repeater for a little parallax action
|
// Add in a repeater for a little parallax action
|
||||||
stage.insert(new Q.Repeater({ asset: "background-wall.png", speedX: 0.5, speedY: 0.5 }));
|
stage.insert(new Q.Repeater({ asset: "background.png", speedX: 0.5, speedY: 0.5 }));
|
||||||
|
|
||||||
// Add in a tile layer, and make it the collision layer
|
// Add in a tile layer, and make it the collision layer
|
||||||
stage.collisionLayer(new Q.TileLayer({
|
stage.collisionLayer(new Q.TileLayer({
|
||||||
|
@ -183,7 +183,7 @@ Q.scene('endGame',function(stage) {
|
||||||
// Q.load can be called at any time to load additional assets
|
// Q.load can be called at any time to load additional assets
|
||||||
// assets that are already loaded will be skipped
|
// assets that are already loaded will be skipped
|
||||||
// The callback will be triggered when everything is loaded
|
// The callback will be triggered when everything is loaded
|
||||||
Q.load("sprites.png, sprites.json, level.json, tiles.png, background-wall.png", function() {
|
Q.load("sprites.png, sprites.json, level.json, tiles.png, background.png", function() {
|
||||||
// Sprites sheets can be created manually
|
// Sprites sheets can be created manually
|
||||||
Q.sheet("tiles","tiles.png", { tilew: 32, tileh: 32 });
|
Q.sheet("tiles","tiles.png", { tilew: 32, tileh: 32 });
|
||||||
|
|
||||||
|
|
Reference in a new issue