123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- using UnityEngine;
- using System.Collections;
- using System;
- public class NoLivesLeftDialog : MonoBehaviour
- {
- ScreenBase screen;
- void Awake()
- {
- screen = GetComponent<ScreenBase>();
- //MediaPlayerCtrl.Instance.OnEnd += OnEnd;
- }
- /*public void OnEnd()
- {
- Debug.Log("OnEnd");
- LivesManager.Instance.RechargeOneLife();
- }*/
- void OnRequestLivesButtonMsg()
- {
- screen.Hide();
- FacebookHelper.Instance.RequestLives();
- }
- void OnRequestLivesAdButtonMsg()
- {
- screen.Hide();
- }
- void OnHide()
- {
- screen.Hide();
- }
- void OnRequestInvite()
- {
- WrapperFB.InviteFriends();
- }
-
- void OnBuyLivesButtonMsg()
- {
- StoreManager.Instance.Purchase(StoreProductId.lives_5);
- }
- public void OnRequestShowAdButton()
- {
- //screen.Hide();
- if (!ConnectivityPollManager.HasInternet)
- {
- MenuManager._instance.scoresScreen.GetComponent<FacebookDialogManager>().noInternetDialog.Show();
- return;
- }
- PlayerPrefs.SetInt("PlayAdForLifes", 1);
- PlayerPrefs.Save();
-
- MenuManager._instance.VideoAd.Show();
- VideoManager.Instance.PlayAd();
- screen.Hide();
- //MediaPlayerCtrl.Instance.PlayAd();
- }
-
- }
|