// Use this for initialization void Awake() { AIRE aire = AIRE.getInstance(); aire.setServerUrl("https://2ceg9ozg2i.execute-api.eu-west-1.amazonaws.com/Prod/ingestion/aire-sdk"); aire.logging = true; aire.init("e7177d872ff62c0356c973848c7bffba"); }
void OnGUI() { // Make a background box GUI.Box(new Rect(10, 10, 200, 200), "Demo menu"); if (GUI.Button(new Rect(20, 40, 180, 20), "View bundle")) { AIRE aire = AIRE.Instance; aire.bundleViewOpen(bundles[0]); } if (GUI.Button(new Rect(20, 60, 180, 20), "Close bundle")) { AIRE aire = AIRE.Instance; aire.bundleViewClose(bundles[0]); } if (GUI.Button(new Rect(20, 80, 180, 20), "Begin bundle purchase")) { AIRE aire = AIRE.Instance; aire.bundlePurchaseBegin(bundles[0]); } if (GUI.Button(new Rect(20, 100, 180, 20), "Complete bundle purchase")) { AIRE aire = AIRE.Instance; aire.bundlePurchaseCompleted(bundles[0], "my receipt"); } if (GUI.Button(new Rect(20, 120, 180, 20), "Abort bundle purchase")) { AIRE aire = AIRE.Instance; aire.bundlePurchaseAborted(bundles[0]); } }
// Use this for initialization void Start() { StartCoroutine(AIRE.getInstance().GetRecommendedBundle(bundle => bundles.Add(bundle))); }