Skip to content

Instantly share code, notes, and snippets.

@ekelokorpi
Last active January 25, 2023 18:10
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ekelokorpi/9719395 to your computer and use it in GitHub Desktop.
Save ekelokorpi/9719395 to your computer and use it in GitHub Desktop.
Phaser vs. Panda
game.module(
'game.main'
)
.body(function() {
game.addAsset('logo.png');
SceneGame = game.Scene.extend({
init: function() {
var sprite = new game.Sprite('logo.png');
this.stage.addChild(sprite);
}
});
game.start();
});
var game = new Phaser.Game(800, 600, Phaser.CANVAS, 'phaser-example', {
preload: preload,
create: create
});
function preload() {
game.load.image('logo', 'media/logo.png');
};
function create() {
game.add.sprite(0, 0, 'logo');
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment