neingeist
/
cosmos
Archived
1
0
Fork 0

add background to game

master
neingeist 11 years ago
parent 5942746bf4
commit 2c12b43b5e

@ -132,7 +132,7 @@ Q.Sprite.extend("Starbug",{
Q.scene("level1",function(stage) {
// 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
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
// assets that are already loaded will be skipped
// 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
Q.sheet("tiles","tiles.png", { tilew: 32, tileh: 32 });