Skip to content

Commit

Permalink
Particles doesn't generate nodes inside Object Tree
Browse files Browse the repository at this point in the history
  • Loading branch information
kleber-jg committed Apr 19, 2022
1 parent 8e02066 commit 9b213e6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
Binary file added example/assets/particles/blue.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions example/game.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ let _colorIndex = 0;

function preload() {
game.load.image('phaser', 'assets/sprites/phaser1.png');
game.load.image('particle', 'assets/particles/blue.png');
game.load.bitmapFont('font', 'assets/fonts/nokia.png', 'assets/fonts/nokia.xml');
}

Expand Down Expand Up @@ -131,6 +132,15 @@ function create() {
sprite.inputEnabled = true;
sprite.pivot.set(0, 20);

// const emitter = game.add.emitter(game.world.centerX, game.world.centerY + 500, 200);
// emitter.makeParticles('particle');

// emitter.setRotation(0, 0);
// emitter.setAlpha(0.3, 0.8);
// emitter.setScale(0.5, 1);
// emitter.gravity = -200;
// emitter.start(false, 5000, 100);

plugin.show();
}

Expand Down
2 changes: 1 addition & 1 deletion src/data/phaser-meta.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class PhaserMeta {
[Phaser.RETROFONT]: { type: 'Phaser.RetroFont', icon: 'fa-font' },
[Phaser.TEXT]: { type: 'Phaser.Text', icon: 'fa-font' },
[Phaser.TILESPRITE]: { type: 'Phaser.TileSprite', icon: 'fa-chess-board' },
// [Phaser.EMITTER]: { type: 'Phaser.Emitter', icon: '' },
[Phaser.EMITTER]: { type: 'Phaser.Emitter', icon: 'fa-snowflake', ignoreChildren: true },
// [Phaser.SPRITEBATCH]: { type: 'Phaser.SpriteBatch', icon: 'fa-images' },
// [Phaser.TILEMAP]: { type: 'Phaser.TileMap', icon: '' },
// [Phaser.TILEMAPLAYER]: { type: 'Phaser.TileMapPlayer', icon: '' },
Expand Down

0 comments on commit 9b213e6

Please sign in to comment.