This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.module( | |
'game.main' | |
) | |
.body(function() { | |
game.addAsset('logo.png'); | |
SceneGame = game.Scene.extend({ | |
init: function() { | |
var sprite = new game.Sprite('logo.png'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sprite = new game.SpriteSheet('spritesheet.png', 80, 96); | |
sprite.frame(6); // Set texture to frame 6 | |
sprite.addTo(this.stage); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.createScene('Main', { | |
init: function() { | |
this.gameMusic(); | |
}, | |
gameMusic: function() { | |
var music = new game.Music('music.m4a'); | |
music.play(); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.createClass('A', { | |
init: function() { | |
this.obj = new game.B(); | |
} | |
}); | |
game.createClass('B', { | |
test: 'hello' | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.module( | |
'game.utils' | |
) | |
.body(function() { | |
var seed = 0; | |
game.random = function () { | |
var x = Math.sin(.8765111159592828 + seed++) * 10000; | |
return x - Math.floor(x); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.module( | |
'game.main' | |
) | |
.require( | |
'game.objects' | |
) | |
.body(function() { | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.module( | |
'game.main' | |
) | |
.body(function() { | |
game.createScene('Main', { | |
init: function() { | |
this.mob = new game.Mob(); | |
this.mob.gfx.addTo(this.stage); | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Amount amount = new Amount( | |
"USD", | |
total, | |
total, | |
0, | |
0, | |
"ROAM Discount", | |
0 | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.module( | |
'game.main' | |
) | |
.require( | |
'game.player' | |
) | |
.body(function() { | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
game.module( | |
'game.main' | |
) | |
.body(function() { | |
game.addAsset('panda.png'); | |
game.createClass('Player', { | |
init: function(x, y) { | |
this.sprite = new game.Sprite('panda.png', x, y).addTo(game.scene.stage); |
NewerOlder