Class: Treasure

Treasure()

new Treasure()

Source:

Members

Schema

Source:

isTaken

Source:

resources

Source:

resources[undefined]

Source:

Methods

CollectionTime() → {number}

Source:
Returns:
- The time in milliseconds it takes to collect this treasure.
Type
number

ComputeReward()

Source:

Init()

Source:

IsAvailable() → {boolean}

We might live long enough for a collecting entity to find us again after taking us.
Source:
Returns:
- Whether we are taken already.
Type
boolean

OnOwnershipChanged()

Source:

OnValueModification()

Source:

Resources() → {Object}

Source:
Returns:
- The resources given by this treasure.
Type
Object

Reward(entity) → {boolean}

Parameters:
Name Type Description
entity number The entity collecting us.
Source:
Returns:
- Whether the reward was granted.
Type
boolean