Skip to content

Commit

Permalink
chore(sprites): add spiny anims
Browse files Browse the repository at this point in the history
  • Loading branch information
remarkablemark committed Jan 24, 2025
1 parent 7d46cf5 commit b3e086d
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 9 deletions.
Binary file modified public/sprites/spiny.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 15 additions & 9 deletions src/scenes/preload.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
import { Animation, Music, Scene, Sound, Sprite } from '../constants'

scene(Scene.Preload, () => {
loadSprite(Sprite.Shellie, 'sprites/shellie.png', {
sliceX: 4,
anims: {
[Animation.Attack]: 1,
[Animation.Cooldown]: 2,
[Animation.Idle]: 0,
[Animation.Stunned]: 3,
},
const spritesheets = [
[Sprite.Shellie, 'sprites/shellie.png'],
[Sprite.Spiny, 'sprites/spiny.png'],
]

spritesheets.forEach(([name, src]) => {
loadSprite(name, src, {
sliceX: 4,
anims: {
[Animation.Idle]: 0,
[Animation.Attack]: 1,
[Animation.Cooldown]: 2,
[Animation.Stunned]: 3,
},
})
})

loadSprite(Sprite.Pokey, 'sprites/pokey.png', {
Expand All @@ -31,7 +38,6 @@ scene(Scene.Preload, () => {
[Sprite.Bubbie, 'sprites/bubbie.png'],
[Sprite.Gooba, 'sprites/gooba.png'],
[Sprite.Projectile, 'sprites/projectile.png'],
[Sprite.Spiny, 'sprites/spiny.png'],
]

sprites.forEach(([name, src]) => {
Expand Down

0 comments on commit b3e086d

Please sign in to comment.