예제 #1
0
        public EatResponse OnEvent(EventId id, object cookie)
        {
            EventManager eventManager = Service.Get <EventManager>();

            if (id != EventId.WorldLoadComplete)
            {
                if (id == EventId.IAPProductIDsReady)
                {
                    eventManager.UnregisterObserver(this, EventId.IAPProductIDsReady);
                    PromoCodeTest.RunTest();
                }
            }
            else
            {
                eventManager.UnregisterObserver(this, EventId.WorldLoadComplete);
                if (!Service.Get <InAppPurchaseController>().AreProductIdsReady)
                {
                    eventManager.RegisterObserver(this, EventId.IAPProductIDsReady, EventPriority.Default);
                }
                else
                {
                    PromoCodeTest.RunTest();
                }
            }
            return(EatResponse.NotEaten);
        }
예제 #2
0
 public unsafe static long $Invoke1(long instance, long *args)
 {
     PromoCodeTest.RunTest();
     return(-1L);
 }