コード例 #1
0
    void SetupPurchaser()
    {
        _purchaser = Purchaser.Create();

        _purchaser.SetStatusLabel(_statusTxt);

        _purchaser.onInitializeSuccess.AddListener(OnInitializeSuccess);
        _purchaser.onPurchaseSuccess.AddListener(OnPurchaseSuccess);

        _purchaser.AddProduct(kProductIDConsumable, AppcoinsProductType.Consumable);
        _purchaser.AddProduct(kProductIDNonConsumable, AppcoinsProductType.NonConsumable);

        _purchaser.InitializePurchasing();

        _purchaser.SetupCustomValidator(this);
    }