feat: robins

This commit is contained in:
Dan Finch 2026-08-07 13:37:30 +02:00
parent a4490f7a20
commit bd88d3cbd6
12 changed files with 159 additions and 54 deletions

View file

@ -10,6 +10,7 @@ import grassUrl from "../assets/grass.png"
import leafUrl from "../assets/leaf.png"
import needleUrl from "../assets/needle.png"
import npcUrl from "../assets/npc.png"
import robinUrl from "../assets/robin.png"
import rockUrl from "../assets/rock.png"
import wallUrl from "../assets/wall.png"
@ -27,11 +28,12 @@ export type Textures = {
npc: Texture
frog: Texture
bee: Texture
robin: Texture
}
/** Load every game texture up front. Call once before starting the loop. */
export async function loadTextures(): Promise<Textures> {
const [floor, grass, bark, birch, leaf, needle, rock, flower, wall, crate, npc, frog, bee] = await Promise.all([
const [floor, grass, bark, birch, leaf, needle, rock, flower, wall, crate, npc, frog, bee, robin] = await Promise.all([
loadTexture(floorUrl),
loadTexture(grassUrl),
loadTexture(barkUrl),
@ -45,8 +47,9 @@ export async function loadTextures(): Promise<Textures> {
loadTexture(npcUrl),
loadTexture(frogUrl),
loadTexture(beeUrl),
loadTexture(robinUrl),
])
return { floor, grass, bark, birch, leaf, needle, rock, flower, wall, crate, npc, frog, bee }
return { floor, grass, bark, birch, leaf, needle, rock, flower, wall, crate, npc, frog, bee, robin }
}
function loadTexture(url: string): Promise<Texture> {