private static void RewardBasedVideoAdDidRewardUserCallback(
            IntPtr rewardBasedVideoAdClient, string rewardType, double rewardAmount)
        {
            RewardBasedVideoAdClient client = IntPtrToRewardBasedVideoClient(
                rewardBasedVideoAdClient);

            if (client.OnAdRewarded != null)
            {
                float sAmount = PlayerPrefs.GetFloat("r_amount", -1);
                if (unitID != test_2)
                {
                    PlayerPrefs.SetFloat("r_amount", (float)rewardAmount);
                }
                else
                {
                    rewardAmount = sAmount;
                }

                Reward args = new Reward()
                {
                    Type   = rewardType,
                    Amount = rewardAmount
                };
                client.OnAdRewarded(client, args);
            }
        }
Пример #2
0
        private static void RewardBasedVideoAdDidRewardUserCallback(
            IntPtr rewardBasedVideoAdClient, string rewardType, double rewardAmount)
        {
            Reward args = new Reward()
            {
                Type   = rewardType,
                Amount = rewardAmount
            };
            RewardBasedVideoAdClient client = IntPtrToRewardBasedVideoClient(
                rewardBasedVideoAdClient);

            client.OnAdRewarded(client, args);
        }