NewgroundsMedal

Newgrounds medal auto unlocks in newgrounds API Particle Emitter - Spawns particles with the given settings

Constructor

new NewgroundsMedal(id, name, descriptionopt, iconopt, srcopt)

Create a newgrounds medal object and adds it to the list of medals

Parameters:
NameTypeAttributesDescription
idNumber

The unique identifier of the medal

nameString

Name of the medal

descriptionString<optional>

Description of the medal

iconString<optional>

Icon for the medal

srcString<optional>

Image location for the medal

Extends

Members

description

Properties
TypeDescription
String

Description of the medal

icon

Properties
TypeDescription
String

Icon for the medal

Overrides

id

Properties
TypeDescription
Number

The unique identifier of the medal

Overrides

name

Properties
TypeDescription
String

Name of the medal

Overrides

unlocked

Properties
TypeDescription
boolean

Is the medal unlocked?

Methods

render(hidePercentopt)

Render a medal

Parameters:
NameTypeAttributesDefaultDescription
hidePercentNumber<optional>
0

How much to slide the medal off screen

Overrides

renderIcon(pos, sizeopt)

Render the icon for a medal

Parameters:
NameTypeAttributesDefaultDescription
posVector2

Screen space position

sizeNumber<optional>
medalDisplayIconSize

Screen space size

unlock()

Unlocks a medal if not already unlocked

Overrides