Package | com.myflashlab.air.extensions.googleGames |
Class | public class TheEvents |
Inheritance | TheEvents flash.events.EventDispatcher |
Method | Defined By | ||
---|---|---|---|
increment($eventId:String, $amount:int):void
Increments an event specified by $eventId by the given number of steps. | TheEvents | ||
load($forceReload:Boolean, $callback:Function):void
loads an Array of TheEvent instances that represents the event data for the currently
signed-in player. | TheEvents | ||
loadByIds($forceReload:Boolean, $eventIds:Array, $callback:Function):void
loads an Array of TheEvent instances that represents the event data for the specified event IDs. | TheEvents |
increment | () | method |
public function increment($eventId:String, $amount:int):void
Increments an event specified by $eventId by the given number of steps. This is the fire-and-forget API. Event increments are cached locally and flushed to the server in batches.
Parameters
$eventId:String — The event ID to increment.
| |
$amount:int — The amount increment by. Must be greater than or equal to 0.
|
load | () | method |
public function load($forceReload:Boolean, $callback:Function):void
loads an Array of TheEvent
instances that represents the event data for the currently
signed-in player.
Parameters
$forceReload:Boolean — If true, this call will clear any locally cached data and attempt to fetch the latest
data from the server. This would commonly be used for something like a user-initiated refresh. Normally,
this should be set to false to gain advantages of data caching.
| |
$callback:Function — expects two params, and Array containing TheEvent instances and an Error instance incase
there's an error.
|
loadByIds | () | method |
public function loadByIds($forceReload:Boolean, $eventIds:Array, $callback:Function):void
loads an Array of TheEvent
instances that represents the event data for the specified event IDs.
Parameters
$forceReload:Boolean — If true, this call will clear any locally cached data and attempt to fetch the latest
data from the server. This would commonly be used for something like a user-initiated refresh. Normally, this
should be set to false to gain advantages of data caching.
| |
$eventIds:Array — The IDs of the events to load.
| |
$callback:Function — expects two params, and Array containing TheEvent instances and an Error instance incase
there's an error.
|