diff options
author | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-04 18:30:11 -0600 |
---|---|---|
committer | Logan Hunt <loganhunt@simponic.xyz> | 2022-04-04 18:30:11 -0600 |
commit | dee568c51dbf2393aa7bd75f4241602af8022a2c (patch) | |
tree | 2e559ede69540b680a00ccf20bf96ff998230ed8 /src/entities/wordYou.js | |
parent | 14ddb31441e35dce7425385948a9ee63b262cece (diff) | |
download | bbiy-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/wordYou.js')
-rw-r--r-- | src/entities/wordYou.js | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/entities/wordYou.js b/src/entities/wordYou.js index 8dcf587..574ba4d 100644 --- a/src/entities/wordYou.js +++ b/src/entities/wordYou.js @@ -1,13 +1,7 @@ game.createWordYou = () => { const wordYou = game.Entity(); - wordYou.addComponent(game.components.Position({x: 0, y: 0})); + wordYou.addComponent(game.components.LoadPriority({priority: 3})); wordYou.addComponent(game.components.Appearance({rot: 0, width: 100, height: 100})); - wordYou.sprite = game.graphics.Sprite({ - image: game.assets.wordYou, - spriteHeight: 24, - spriteWidth: 24, - numFrames: 3, - timePerFrame: 100, - }); + wordYou.sprite = game.sprites.wordYou; return wordYou; } |