Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/modules/game/config/sprite"

Index

Variables

Const HOP_TICKS_PER_FRAME

HOP_TICKS_PER_FRAME: 2 = 2 as const

Number of game ticks per frame of hop animation.

Const SPRITE_DEFINITIONS

SPRITE_DEFINITIONS: Record<string, ISpriteDefinition> = {cube: { w: 14, h: 14, anchor: { x: 7, y: 7 } },'cube-idle': { w: 14, h: 14, anchor: { x: 7, y: 7 } },'cube-off': { w: 14, h: 14, anchor: { x: 7, y: 7 } },'talk-right': { w: 14, h: 14, anchor: { x: 7, y: 7 }, animation: true },'talk-left': { w: 14, h: 14, anchor: { x: 7, y: 7 }, animation: true },'hop-west': { w: 35, h: 27, anchor: { x: 26, y: 18 }, animation: true },'hop-north': { w: 35, h: 27, anchor: { x: 9, y: 18 }, animation: true },'hop-east': { w: 35, h: 25, anchor: { x: 9, y: 9 }, animation: true },'hop-south': { w: 35, h: 25, anchor: { x: 26, y: 9 }, animation: true },'brick-edge': { w: 32, h: 16, anchor: { x: 0, y: 0 } },'grass-brick': { w: 32, h: 16, anchor: { x: 0, y: 0 } },flowers: { w: 32, h: 16, anchor: { x: 0, y: 0 } },grass: { w: 32, h: 16, anchor: { x: 0, y: 0 } },beacon: { w: 31, h: 56, anchor: { x: 0, y: 0 } },} as const

Sprite data used to configure PIXI textures in [[loader]].

Const SPRITE_JSON_PATH

SPRITE_JSON_PATH: "./img/sprites.json" = './img/sprites.json' as const

Object literals

Const HOP_OFFSETS

HOP_OFFSETS: object

Sprite Y coordinate and z-index offsets to apply at specified frames during hop animations.

hopDownY

hopDownY: object

frames

frames: number[] = [4, 5, 6, 7, 8, 9]

values

values: number[] = [1, 1, 2, 1, 2, 1]

hopUpY

hopUpY: object

frames

frames: number[] = [4, 6, 7, 8, 9]

values

values: number[] = [-1, -1, -1, -2, -3]

hopZDepth

hopZDepth: object

east

east: number[] = [0.5, 0.5]

frames

frames: number[] = [6, 9]

north

north: number[] = [-0.5, -0.5]

south

south: number[] = [0.5, 0.5]

west

west: number[] = [-0.5, -0.5]

Generated using TypeDoc