summaryrefslogtreecommitdiff
path: root/src/entities/wordRock.js
diff options
context:
space:
mode:
authorLogan Hunt <loganhunt@simponic.xyz>2022-04-04 18:30:11 -0600
committerLogan Hunt <loganhunt@simponic.xyz>2022-04-04 18:30:11 -0600
commitdee568c51dbf2393aa7bd75f4241602af8022a2c (patch)
tree2e559ede69540b680a00ccf20bf96ff998230ed8 /src/entities/wordRock.js
parent14ddb31441e35dce7425385948a9ee63b262cece (diff)
downloadbbiy-dee568c51dbf2393aa7bd75f4241602af8022a2c.tar.gz
bbiy-dee568c51dbf2393aa7bd75f4241602af8022a2c.zip
Fix flickering issue by having singleton sprites; add loading priority; load levels from source
Diffstat (limited to 'src/entities/wordRock.js')
-rw-r--r--src/entities/wordRock.js10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/entities/wordRock.js b/src/entities/wordRock.js
index 2e698b3..66f4efb 100644
--- a/src/entities/wordRock.js
+++ b/src/entities/wordRock.js
@@ -1,13 +1,7 @@
game.createWordRock = () => {
const wordRock = game.Entity();
- wordRock.addComponent(game.components.Position({x: 0, y: 0}));
+ wordRock.addComponent(game.components.LoadPriority({priority: 3}));
wordRock.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100}));
- wordRock.sprite = game.graphics.Sprite({
- image: game.assets.wordRock,
- spriteHeight: 24,
- spriteWidth: 24,
- numFrames: 3,
- timePerFrame: 100,
- });
+ wordRock.sprite = game.sprites.wordRock;
return wordRock;
}