1681-engine / index / Footsteps
Class: Footsteps ​
Defined in: src/audio/Footsteps.ts:26
Footsteps by the ground under the feet. The game says what a point is made of (surfaceAt: a tile's surface, a Tiled property, a floor collider), and calls step on each beat of a walk or a gait; the sound is the surface's, through sound at the feet, quieter and muffled with distance like every other sound, and dropped first when too many sounds play at once.
Constructors ​
Constructor ​
new Footsteps(options): Footsteps;Defined in: src/audio/Footsteps.ts:29
Parameters ​
| Parameter | Type |
|---|---|
options | FootstepOptions |
Returns ​
Footsteps
Methods ​
setSurfaceAt() ​
setSurfaceAt(surfaceAt): void;Defined in: src/audio/Footsteps.ts:32
Where the surface of a world point comes from; undefined is the fallback surface.
Parameters ​
| Parameter | Type |
|---|---|
surfaceAt | (x, y) => string | undefined |
Returns ​
void
step() ​
step(
x,
y,
local,
mounted?
): void;Defined in: src/audio/Footsteps.ts:42
One step (or a beat of hooves when mounted) at the feet, world x/y; local is the player's own.
Parameters ​
| Parameter | Type | Default value |
|---|---|---|
x | number | undefined |
y | number | undefined |
local | boolean | undefined |
mounted | boolean | false |
Returns ​
void
surface() ​
surface(x, y): string;Defined in: src/audio/Footsteps.ts:37
The surface at a world point.
Parameters ​
| Parameter | Type |
|---|---|
x | number |
y | number |
Returns ​
string