Beispiel #1
0
    //--- IIAPDelegate

    private void handleOnIAPInitialized(Dictionary <string, IAPProduct> products)
    {
        OnInitialized.Invoke(products);

//		Debug.Log("handleOnIAPInitialized: " + products);
        if (products != null)
        {
            // Enabled restore button
            if (restoreButton != null)
            {
                if (restoreButton.GetComponent <Button>() != null)
                {
                    restoreButton.GetComponent <Button>().interactable = true;
                    restoreButton.GetComponent <Button>().enabled      = true;
                }
                                #if ENABLE_NGUI
                else if (restoreButton.GetComponent <UIButton>() != null)
                {
                    restoreButton.GetComponent <UIButton>().isEnabled = true;
                    //					restoreButton.GetComponent<UIButton>().enabled=true;
                }
                                #endif
            }

            foreach (IAPProduct product in products.Values)
            {
                UpdateUI(product);
            }
        }

        IAPManager.OnIAPInitialized -= handleOnIAPInitialized;
    }
 // Forwards invocations of C# event OnSdkInitializedEvent to UnityEvent OnInitialized.
 protected void fwdSdkInitialized(string adunitid)
 {
     if (isActiveAndEnabled && Initialized != null)
     {
         Initialized.Invoke(adunitid);
     }
 }
Beispiel #3
0
        public bool Init()
        {
            length = myRenderer.bounds.size.x;

            if (length <= 0.0f)
            {
                return(false);
            }

            length *= 1.0f - intersectionAmount;

            var cloneOffset = length / transform.localScale.x;

            var leftClone  = CreateChildClone(-cloneOffset);
            var rightClone = CreateChildClone(cloneOffset);

            leftClone.transform.SetParent(transform, false);
            rightClone.transform.SetParent(transform, false);

            InitializedEvent?.Invoke(this, new ScrollEventArgs {
                PositionX = startPos.x, Offset = length
            });

            return(true);
        }
        public IEnumerator InitializeRoutine()
        {
            repositoriesBase.CreateAllRepositories();
            interactorsBase.CreateAllInteractors();
            yield return(null);

            repositoriesBase.SendOnCreateToAllRepositories();
            interactorsBase.SendOnCreateToAllInteractors();
            yield return(null);

            repositoriesBase.InitializeAllRepositories();
            interactorsBase.InitializeAllInteractors();
            yield return(null);

            repositoriesBase.SendOnStartToAllRepositories();
            interactorsBase.SendOnStartToAllInteractors();
            InitializedEvent?.Invoke();
        }
Beispiel #5
0
 public void OnInitialized()
 {
     InitializedEvent?.Invoke();
 }
//		void OnValidate()
//		{
//			Debug.Log("OnValidate");
//		}

        //--- IIAPDelegate

        private void handleOnIAPInitialized(Dictionary <string, IAPProduct> products)
        {
            OnIAPInitialized.Invoke(products);
        }