BindRewardResultObserver
Registers the callback of LI PASS reward event, the game needs to process the callback function. When calling reward related APIs, the callback is triggered. For more information on the callback data structure, see BindRewardResult.
note
It is strongly recommended to incorporate the callback within the startup function of the game.
Function definition
// Add callbacks
void AddBindRewardResultObserver(OnLIEventResultHandler<BindRewardResult> liEvent);
// Remove callbacks
void RemoveBindRewardResultObserver(OnLIEventResultHandler<BindRewardResult> liEvent);
Code sample
// Add callbacks
public void AddBindRewardObserver()
{
LevelInfinite.AddBindRewardResultObserver(OnBindRewardEventResult);
}
// Remove callbacks
public void RemoveBindRewardObserver()
{
INTLAPI.RemoveBindRewardResultObserver(OnBindRewardEventResult);
}
private void OnBindRewardEventResult(BindRewardResult liRet)
{
}