Game Jolt Unity API  v2.5.8
Static Public Member Functions | List of all members
GameJolt.API.Trophies Class Reference

Trophies API methods More...

Static Public Member Functions

static void Unlock (Trophy trophy, Action< bool > callback=null)
 Unlock the specified Trophy. More...
 
static void Unlock (int id, Action< bool > callback=null)
 Unlock the specified Trophy by its id. More...
 
static void TryUnlock (Trophy trophy, Action< TryUnlockResult > callback=null)
 Unlocks the trophy if it was not already unlocked. More...
 
static void TryUnlock (int id, Action< TryUnlockResult > callback=null)
 Unlocks the trophy if it was not already unlocked. More...
 
static void Get (int id, Action< Trophy > callback)
 Get a Trophy by id. More...
 
static void Get (int[] ids, Action< Trophy[]> callback)
 Get the Trophys by id. More...
 
static void Get (Action< Trophy[]> callback)
 Get the Trophys information. More...
 
static void Get (bool unlocked, Action< Trophy[]> callback)
 Get all locked/unlocked Trophys. More...
 
static void Remove (Trophy trophy, Action< bool > callback=null)
 Removes the trophy. More...
 
static void Remove (int id, Action< bool > callback=null)
 Removes the trophy. More...
 

Detailed Description

Trophies API methods

Member Function Documentation

◆ Get() [1/4]

static void GameJolt.API.Trophies.Get ( int  id,
Action< Trophy callback 
)
inlinestatic

Get a Trophy by id.

Parameters
idThe Trophy id.
callbackA callback function accepting a single parameter, a Trophy.

◆ Get() [2/4]

static void GameJolt.API.Trophies.Get ( int []  ids,
Action< Trophy[]>  callback 
)
inlinestatic

Get the Trophys by id.

Parameters
idsAn array of Trophys IDs
callbackA callback function accepting a single parameter, an array of Trophys.

◆ Get() [3/4]

static void GameJolt.API.Trophies.Get ( Action< Trophy[]>  callback)
inlinestatic

Get the Trophys information.

Parameters
callbackA callback function accepting a single parameter, an array of Trophys.

◆ Get() [4/4]

static void GameJolt.API.Trophies.Get ( bool  unlocked,
Action< Trophy[]>  callback 
)
inlinestatic

Get all locked/unlocked Trophys.

Parameters
unlockedA boolean indicating whether to retrieve unlocked (true) or locked (false) Trophys.
callbackA callback function accepting a single parameter, an array of Trophys.

◆ Remove() [1/2]

static void GameJolt.API.Trophies.Remove ( Trophy  trophy,
Action< bool >  callback = null 
)
inlinestatic

Removes the trophy.

Parameters
trophyThe trophy to lock again.
callbackA callback function accepting a single parameter, a boolean indicating the success of this function.

◆ Remove() [2/2]

static void GameJolt.API.Trophies.Remove ( int  id,
Action< bool >  callback = null 
)
inlinestatic

Removes the trophy.

Parameters
idThe trophy id to lock again.
callbackA callback function accepting a single parameter, a boolean indicating the success of this function.

◆ TryUnlock() [1/2]

static void GameJolt.API.Trophies.TryUnlock ( Trophy  trophy,
Action< TryUnlockResult callback = null 
)
inlinestatic

Unlocks the trophy if it was not already unlocked.

Parameters
trophyThe Trophy to unlock.
callbackA callback function accepting a single parameter, an enum indicating success.

◆ TryUnlock() [2/2]

static void GameJolt.API.Trophies.TryUnlock ( int  id,
Action< TryUnlockResult callback = null 
)
inlinestatic

Unlocks the trophy if it was not already unlocked.

Parameters
trophyThe Trophy ID.
callbackA callback function accepting a single parameter, an enum indicating success.

◆ Unlock() [1/2]

static void GameJolt.API.Trophies.Unlock ( Trophy  trophy,
Action< bool >  callback = null 
)
inlinestatic

Unlock the specified Trophy.

Parameters
trophyThe Trophy to unlock.
callbackA callback function accepting a single parameter, a boolean indicating success.

◆ Unlock() [2/2]

static void GameJolt.API.Trophies.Unlock ( int  id,
Action< bool >  callback = null 
)
inlinestatic

Unlock the specified Trophy by its id.

Parameters
idThe Trophy ID.
callbackA callback function accepting a single parameter, a boolean indicating success.

The documentation for this class was generated from the following file: