mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
25 lines
519 B
TypeScript
25 lines
519 B
TypeScript
/// <reference path="../../Phaser/Game.ts" />
|
|
|
|
(function () {
|
|
|
|
var myGame = new Phaser.Game(this, 'game', 800, 600, init, create);
|
|
|
|
var emitter: Phaser.Emitter;
|
|
|
|
function init() {
|
|
|
|
myGame.loader.addImageFile('jet', 'assets/sprites/jets.png');
|
|
|
|
myGame.loader.load();
|
|
|
|
}
|
|
|
|
function create() {
|
|
|
|
emitter = myGame.createEmitter(myGame.stage.centerX, myGame.stage.centerY);
|
|
emitter.makeParticles('jet', 50, 0, false, 0);
|
|
emitter.start(false, 10, 0.1);
|
|
|
|
}
|
|
|
|
})();
|