コード例 #1
0
        private static void RewardedAdDidRewardCallback(
            IntPtr rewardedAdClient, int amount, string type)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(rewardedAdClient);
            Reward           reward = new Reward(amount, type);

            if (client.OnRewarded != null)
            {
                client.OnRewarded(client, reward);
            }
        }
コード例 #2
0
        private static void RewardedAdDidDismissCallback(
            IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(
                rewardedAdClient);

            if (client.OnRewardedAdDismissed != null)
            {
                client.OnRewardedAdDismissed(client, EventArgs.Empty);
            }
        }
コード例 #3
0
        private static void RewardedAdWillAppearCallback(
            IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(
                rewardedAdClient);

            if (client.OnRewardedAdShown != null)
            {
                client.OnRewardedAdShown(client, EventArgs.Empty);
            }
        }
コード例 #4
0
        private static void RewardedAdWillLeaveApplicationCallback(
            IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(
                rewardedAdClient);

            if (client.OnRewardedAdLeftApplication != null)
            {
                client.OnRewardedAdLeftApplication(client, EventArgs.Empty);
            }
        }
コード例 #5
0
        private static void RewardedAdWillPresentScreenCallback(
            IntPtr rewardedAdClient)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(
                rewardedAdClient);

            if (client.OnRewardedAdOpened != null)
            {
                client.OnRewardedAdOpened(client, EventArgs.Empty);
            }
        }
コード例 #6
0
        private static void RewardedAdDidFailToShowCallback(
            IntPtr rewardedAdClient, string error)
        {
            RewardedAdClient client = IntPtrToRewardedAdClient(
                rewardedAdClient);

            if (client.OnRewardedAdFailedToShow != null)
            {
                AdFailureEventArgs args = new AdFailureEventArgs()
                {
                    Message = error
                };
                client.OnRewardedAdFailedToShow(client, args);
            }
        }