/// <summary> Called when the store has connected - displays the products </summary> private void OnConnected() { if (_Store == null || _Store.Fading) { return; } if (PurchaseManager.Instance.Connected) { _Store.SetStatus(" "); _Store.ShowProducts(); _Store.ToggleButtonStates(true); } else { _Store.SetStatus("not connected!"); } }
/// <summary> Called when the state is entered - connects the purchase manager </summary> public override void OnEnter() { _Store = new StoreScene() { Visible = true }; _Store.StartFade(0, 1, () => { _Store.SetStatus("loading"); PurchaseManager.Instance.Connect(OnConnected); _Store.BackButton.TouchEnabled = true; _Store.BackButton.OnButtonRelease += OnBackRelease; }); }