Skip to content

spendCoins

spendCoins(world, amount): void

Defined in: packages/engine/src/gameplay/behaviours/systems.ts:138

Takes amount off the player’s wallet, never below zero. A world with no player, or a player with no wallet, has nothing to take it from.

Parameter Type
world World
amount number

void