mirror of
https://github.com/photonstorm/phaser
synced 2024-11-26 22:52:14 +00:00
21 lines
741 B
JavaScript
21 lines
741 B
JavaScript
/// <reference path="../../Phaser/Game.ts" />
|
|
(function () {
|
|
var game = new Phaser.Game(this, 'game', 800, 600, init, create, null, render);
|
|
|
|
var robot;
|
|
var eye, body, leftArm, rightArm, leftLeg, rightLeg;
|
|
|
|
function init() {
|
|
game.load.spritesheet('buttons', 'assets/buttons/number-buttons.png', 90, 90);
|
|
game.load.start();
|
|
}
|
|
function create() {
|
|
// Add 6 groups and childs.
|
|
var item = game.add.group();
|
|
item.texture.loadImage('buttons');
|
|
}
|
|
function render() {
|
|
Phaser.DebugUtils.context.fillStyle = 'rgb(0, 160, 213)';
|
|
Phaser.DebugUtils.context.fillText('Group can have a texture too, so you can use it just like a simple sprite.', 180, 380);
|
|
}
|
|
})();
|