LittleJS 1.28.0

Wavedash

WavedashMedal

WavedashMedal: a medal that is also a Wavedash achievement, unlocked on Wavedash by its identifier

Extends Medal

Constructor

new WavedashMedal(id, achievement, name, description, icon, src)wavedash.js:72

Create a WavedashMedal and add it to the list of medals

id number

The unique identifier of the medal, as for any Medal

achievement string

The identifier of its Wavedash achievement, as made with the Wavedash CLI

name string

Name of the medal

description string optional

Description of the medal

icon string optional

Icon for the medal

src string optional

Image location for the medal

const medal_finish = new WavedashMedal(0, 'ACH_01_FINISH', 'Finish', 'Finish a level');
medal_finish.unlock(); // Wavedash's toast on Wavedash, the engine's popup anywhere else

Members

Methods

Inherited from Medal

Members

achievement : stringwavedash.js:88

The identifier of its Wavedash achievement

Methods

unlock() → Promise<boolean>wavedash.js:95

Unlocks the medal if not already unlocked, saved as any medal is; on Wavedash its achievement is sent, until Wavedash takes it, and Wavedash shows its own toast in place of the engine's popup; one unlocked before the plugin is made is sent when it is

Returns
  • Whether the medal is unlocked