12345678910111213141516171819202122 |
- using UnityEngine;
- using System.Collections;
- [RequireComponent(typeof(ScreenBase))]
- public class CloseOnPurchaseSuccessful : MonoBehaviour
- {
- void OnEnable()
- {
- CoreNotificationCenter.AddListener(OnPurchaseSuccessful, CoreNotificationType.PurchaseSuccessful);
- }
- void OnDisable()
- {
- CoreNotificationCenter.RemoveListener(OnPurchaseSuccessful, CoreNotificationType.PurchaseSuccessful);
- }
- void OnPurchaseSuccessful(CoreNotification note)
- {
- GetComponent<ScreenBase>().Hide();
- }
- }
|