You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
656 B
TypeScript
30 lines
656 B
TypeScript
/// <reference types="vite/client" />
|
|
|
|
declare global {
|
|
interface Moveable {
|
|
x: number // position on x-axis (fixed for the player)
|
|
y: number // position on y-axis (fixed for the player)
|
|
lastDir: number // store last face direction
|
|
vx: number // velocity on the x-axis
|
|
vy: number // velocity on the y-axis
|
|
}
|
|
|
|
type InventoryItem = {
|
|
name: string
|
|
type: string
|
|
icon: string
|
|
quality?: 'bronze' | 'iron' | 'silver' | 'gold' | 'diamond'
|
|
}
|
|
|
|
interface Player extends Moveable {
|
|
inventory: InventoryItem[]
|
|
}
|
|
|
|
interface Npc extends Moveable {
|
|
hostile: boolean
|
|
inventory: InventoryItem[]
|
|
}
|
|
}
|
|
|
|
export {}
|