GS2-AdReward Script トリガーリファレンス
拡張スクリプトを呼び出す イベントトリガー のリファレンス
トリガー
acquirePoint
ポイント獲得
同期実行スクリプト
スクリプト、ポイント獲得の順に同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| point | Point | 獲得処理前ポイント |
| acquirePointValue | long | 獲得ポイント量 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | ポイント獲得を許可するか | ||
| overridePointValue | long | 0 ~ 2147483645 | 上書きする入手ポイント量 |
実装例
namespace = args.namespace
point = args.point
acquirePointValue = args.acquirePointValue
result = {
permit=permit,
overridePointValue=overridePointValue
}非同期実行スクリプト
ポイント獲得の実行後にスクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| point | Point | 獲得処理前ポイント |
| afterPoint | Point | 獲得後ポイント |
| acquirePointValue | long | 獲得ポイント量 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 |
|---|
実装例
namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
acquirePointValue = args.acquirePointValue
result = {
}consumePoint
ポイント消費
同期実行スクリプト
スクリプト、ポイント消費の順に同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| point | Point | 消費処理前ポイント |
| consumePointValue | long | 消費ポイント量 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 | |
|---|---|---|---|---|---|
| permit | bool | ✓ | ポイント消費を許可するか | ||
| overridePointValue | long | 0 ~ 2147483645 | 上書きする消費ポイント量 |
実装例
namespace = args.namespace
point = args.point
consumePointValue = args.consumePointValue
result = {
permit=permit,
overridePointValue=overridePointValue
}非同期実行スクリプト
ポイント消費の実行後にスクリプトが非同期実行されます。
Request
| 型 | 説明 | |
|---|---|---|
| namespace | Namespace | ネームスペース |
| point | Point | 消費処理前ポイント |
| afterPoint | Point | 消費後ポイント |
| consumePointValue | long | 消費ポイント量 |
Result
| 型 | 必須 | デフォルト | 値の制限 | 説明 |
|---|
実装例
namespace = args.namespace
point = args.point
afterPoint = args.afterPoint
consumePointValue = args.consumePointValue
result = {
}