Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void ShowRewardedVideo()
- {
- if (IsRealRewardedVideoLoaded())
- {
- Time.timeScale = 0;
- Appodeal.show(Appodeal.REWARDED_VIDEO);
- MuteSounds();
- }
- }
- public bool IsRealRewardedVideoLoaded()
- {
- if (Appodeal.isLoaded(Appodeal.REWARDED_VIDEO))
- return true;
- else
- return false;
- }
- #region Rewarded Video callback handlers
- public void onRewardedVideoLoaded() { print("Video loaded"); }
- public void onRewardedVideoFailedToLoad() { Time.timeScale = 1; print("Video failed"); TurnBackSounds(); }
- public void onRewardedVideoShown() { Time.timeScale = 1; print("Video shown"); TurnBackSounds(); }
- public void onRewardedVideoClosed(bool finished) { Time.timeScale = 1; print("Video closed"); TurnBackSounds(); }
- public void onRewardedVideoFinished(int amount, string name)
- {
- Time.timeScale = 1;
- TurnBackSounds();
- PersistentDataManager.Instance.firebreathCount++;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement