phaser/wip/phaser tests/particles/basic emitter.ts
2013-09-13 16:24:01 +01:00

18 lines
465 B
TypeScript

/// <reference path="../../Phaser/Game.ts" />
(function () {
var myGame = new Phaser.Game(this, 'game', 800, 600, null, create);
var emitter: Phaser.Emitter;
function create() {
// Creates a basic emitter, bursting out 50 default sprites (i.e. 16x16 white boxes)
emitter = myGame.add.emitter(myGame.stage.centerX, myGame.stage.centerY);
emitter.makeParticles(null, 50, false, 0);
emitter.start(true);
}
})();