Esempio n. 1
0
    void Start()
    {
        #region Basic Information Initialization

        m_PurchaseListener     = new PurchaseListener();
        m_InitListener         = new InitListener();
        m_LicenseCheckListener = new LicenseCheckListener();

        #endregion

        #region Text Field Initialization

        GameObject gameObject = GameObject.Find("Information");
        m_TextField      = gameObject.GetComponent <Text>();
        m_TextField.text = "Please Click Init to Start";

        #endregion

        #region DropDown Initialization

        gameObject = GameObject.Find("Dropdown");

        m_Dropdown = gameObject.GetComponent <Dropdown>();
        m_Dropdown.ClearOptions();
        m_Dropdown.options.Add(new Dropdown.OptionData(Product1));
        m_Dropdown.options.Add(new Dropdown.OptionData(Product2));
        m_Dropdown.RefreshShownValue();

        #endregion

        InitUI();

        StoreService.LicenseCheck(m_LicenseCheckListener);
    }
Esempio n. 2
0
    void Start()
    {
        #region Basic Information Initialization

        purchaseListener = new PurchaseListener();
        initListener     = new InitListener();
        appInfo          = new AppInfo();

        /*
         * GameSettings.asset only supports Unity whose version is higher than 5.6.1 (inlcuded).
         * If developers are using older Unity, they should get these information from the developer portal and fill the AppInfo manually.
         */
        AppStoreSettings appStoreSettings = Resources.Load <AppStoreSettings>("GameSettings");
        appInfo.AppSlug      = appStoreSettings.AppSlug;
        appInfo.ClientId     = appStoreSettings.UnityClientID;
        appInfo.ClientKey    = appStoreSettings.UnityClientKey;
        appInfo.RSAPublicKey = appStoreSettings.UnityClientRSAPublicKey;

        Debug.Log("App Name: " + appStoreSettings.AppName);

        #endregion

        #region Text Field Initialization

        GameObject gameObject = GameObject.Find("Information");
        _textField      = gameObject.GetComponent <Text>();
        _textField.text = "Please Click Init to Start";

        #endregion

        #region DropDown Initialization

        gameObject = GameObject.Find("Dropdown");

        _dropdown = gameObject.GetComponent <Dropdown>();
        _dropdown.ClearOptions();
        _dropdown.options.Add(new Dropdown.OptionData(Product1));
        _dropdown.options.Add(new Dropdown.OptionData(Product2));
        _dropdown.RefreshShownValue();

        #endregion

        InitUI();
    }
 void Start()
 {
     initListener = new InitListener();
     StoreService.Initialize(initListener);
 }
Esempio n. 4
0
 public void RemoveAds()
 {
     initListener = new InitListener();
     StoreService.Initialize(initListener);
 }