Medals

LittleJS Medal System

  • Tracks and displays medals
  • Saves medals to local storage
  • Newgrounds integration

Members

(static, constant) medals :Array

List of all medals

Type:
  • Array

Methods

(static) medalsInit(saveName)

Initialize medals with a save name used for storage

  • Call this after creating all medals
  • Checks if medals are unlocked
Parameters:
NameTypeDescription
saveNameString

(static) newgroundsInit(app_id, cipheropt, cryptoJSopt)

This can used to enable Newgrounds functionality

Parameters:
NameTypeAttributesDescription
app_idNumber

The newgrounds App ID

cipherString<optional>

The encryption Key (AES-128/Base64)

cryptoJSObject<optional>

An instance of CryptoJS, if there is a cipher