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
pandaConfig = { | |
storage: { | |
id: 'com.mycompany.mygame' | |
} | |
}; |
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
pandaConfig = { | |
debug: { | |
color: 'white', | |
position: { | |
x: 2, | |
y: 740 | |
} | |
} | |
}; |
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
pandaConfig = { | |
// Global config | |
}; | |
pandaConfig.iOS = { | |
// Config for iOS devices | |
}; | |
pandaConfig.android = { | |
// Config for Android devices |
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() { | |
var logo = new game.Sprite('logo.png'); | |
this.stage.addChild(logo); | |
} | |
}); |
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.Sprite('sprite.png'); | |
// Make sprite half size | |
sprite.scale.set(0.5, 0.5); |
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.Sprite('sprite.png'); | |
sprite.position.set(200, 200); |
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.Sprite('sprite.png'); | |
// Set sprite anchor to center | |
sprite.anchor.set(0.5, 0.5); |
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.Sprite('sprite.png'); | |
sprite.rotation = 0.2; |
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.Sprite('sprite.png'); | |
// Set sprite opacity to 50% | |
sprite.alpha = 0.5; |
OlderNewer