feat: boulders
This commit is contained in:
parent
9aa0ec6a3f
commit
680e08aadc
7 changed files with 169 additions and 11 deletions
|
|
@ -6,6 +6,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 rockUrl from "../assets/rock.png"
|
||||
import wallUrl from "../assets/wall.png"
|
||||
|
||||
export type Textures = {
|
||||
|
|
@ -14,6 +15,7 @@ export type Textures = {
|
|||
bark: Texture
|
||||
leaf: Texture
|
||||
needle: Texture
|
||||
rock: Texture
|
||||
wall: Texture
|
||||
crate: Texture
|
||||
npc: Texture
|
||||
|
|
@ -21,17 +23,18 @@ export type Textures = {
|
|||
|
||||
/** Load every game texture up front. Call once before starting the loop. */
|
||||
export async function loadTextures(): Promise<Textures> {
|
||||
const [floor, grass, bark, leaf, needle, wall, crate, npc] = await Promise.all([
|
||||
const [floor, grass, bark, leaf, needle, rock, wall, crate, npc] = await Promise.all([
|
||||
loadTexture(floorUrl),
|
||||
loadTexture(grassUrl),
|
||||
loadTexture(barkUrl),
|
||||
loadTexture(leafUrl),
|
||||
loadTexture(needleUrl),
|
||||
loadTexture(rockUrl),
|
||||
loadTexture(wallUrl),
|
||||
loadTexture(crateUrl),
|
||||
loadTexture(npcUrl),
|
||||
])
|
||||
return { floor, grass, bark, leaf, needle, wall, crate, npc }
|
||||
return { floor, grass, bark, leaf, needle, rock, wall, crate, npc }
|
||||
}
|
||||
|
||||
function loadTexture(url: string): Promise<Texture> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue