neingeist
/
cosmos
Archived
1
0
Fork 0
master
neingeist 11 years ago
parent 024aded1a4
commit e2b531a6ed

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

@ -1 +1 @@
{"astronaut":{"sx":0,"sy":1,"cols":1,"tilew":24,"tileh":24,"frames":1},"minecraft-cake":{"sx":0,"sy":26,"cols":1,"tilew":32,"tileh":32,"frames":1},"neingeist":{"sx":0,"sy":59,"cols":1,"tilew":24,"tileh":24,"frames":1},"starbug":{"sx":0,"sy":84,"cols":1,"tilew":24,"tileh":24,"frames":1}}
{"astronaut":{"sx":0,"sy":1,"cols":1,"tilew":24,"tileh":24,"frames":1},"minecraft-cake":{"sx":0,"sy":26,"cols":1,"tilew":32,"tileh":32,"frames":1},"neingeist":{"sx":0,"sy":59,"cols":1,"tilew":24,"tileh":24,"frames":1},"rocket":{"sx":0,"sy":84,"cols":1,"tilew":26,"tileh":52,"frames":1},"starbug":{"sx":0,"sy":137,"cols":1,"tilew":24,"tileh":24,"frames":1}}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

@ -47,11 +47,11 @@ Q.Sprite.extend("Player",{
// hit.sprite is called everytime the player collides with a sprite
this.on("hit.sprite",function(collision) {
// Check the collision, if it's the cake, you win!
if(collision.obj.isA("Cake")) {
// Check the collision, if it's the rocket, you win!
if(collision.obj.isA("Rocket")) {
this.destroy();
$("#einladung").center();
$("#einladung").show("slow");
Q.stageScene("ThereWillBeCake",1, { label: "You Won!" });
}
});
@ -60,9 +60,9 @@ Q.Sprite.extend("Player",{
});
Q.Sprite.extend("Cake", {
Q.Sprite.extend("Rocket", {
init: function(p) {
this._super(p, { sheet: 'minecraft-cake' });
this._super(p, { sheet: 'rocket' });
}
});
@ -155,8 +155,7 @@ Q.scene("level1",function(stage) {
stage.insert(new Q.Starbug({ x: 600, y: 0 }));
stage.insert(new Q.Neingeist({ x: 650, y: 0 }));
// Finally add the cake
stage.insert(new Q.Cake({ x: 146, y: 36 }));
stage.insert(new Q.Rocket({ x: 146, y: 32 }));
});
// To display a game over / game won popup box,