phaser/Tests/particles/basic emitter.ts

19 lines
470 B
TypeScript
Raw Normal View History

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