Last active
January 25, 2023 18:10
-
-
Save ekelokorpi/9719395 to your computer and use it in GitHub Desktop.
Phaser vs. Panda
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.stage.addChild(sprite); | |
} | |
}); | |
game.start(); | |
}); |
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 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