diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-10 22:13:05 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-10 22:13:05 -0600 |
commit | 69b5f4448c1cbd00ebcb6f444f2434cc272b7e97 (patch) | |
tree | 02152d8eb67f1b4913222b412d72740f59808c7b /src/entities/borderParticles.js | |
parent | a23ea2e014d140dbe9c090e6cf7d55906480c260 (diff) | |
download | bbiy-69b5f4448c1cbd00ebcb6f444f2434cc272b7e97.tar.gz bbiy-69b5f4448c1cbd00ebcb6f444f2434cc272b7e97.zip |
Unlimited undo; add spritename component instead of sprites on each entity; update canvas on game object
Diffstat (limited to 'src/entities/borderParticles.js')
-rw-r--r-- | src/entities/borderParticles.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/entities/borderParticles.js b/src/entities/borderParticles.js index a8d7036..34512bc 100644 --- a/src/entities/borderParticles.js +++ b/src/entities/borderParticles.js @@ -31,9 +31,7 @@ game.createBorderParticles = ({colors, maxAmount, minAmount, minLife, maxLife, m } return particle; }); - particles.addComponent(game.components.LoadPriority({priority: 1})); - particles.addComponent(game.components.Alive()); - particles.sprite = game.graphics.Sprite({ + game.sprites.borderParticle = game.graphics.Sprite({ drawFunction: (elapsedTime, {x, y, width, height}, context) => { particleSpecs.map((spec) => spec.elapsed += elapsedTime); particleSpecs = particleSpecs.filter((spec) => spec.lifetime > spec.elapsed); @@ -51,5 +49,8 @@ game.createBorderParticles = ({colors, maxAmount, minAmount, minLife, maxLife, m }); } }) + particles.addComponent(game.components.LoadPriority({priority: 1})); + particles.addComponent(game.components.Alive()); + particles.addComponent(game.components.Sprite({spriteName: "borderParticle"})) return particles; }
\ No newline at end of file |