NoLivesLeftDialog.cs 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. using UnityEngine;
  2. using System.Collections;
  3. using System;
  4. public class NoLivesLeftDialog : MonoBehaviour
  5. {
  6. ScreenBase screen;
  7. void Awake()
  8. {
  9. screen = GetComponent<ScreenBase>();
  10. //MediaPlayerCtrl.Instance.OnEnd += OnEnd;
  11. }
  12. /*public void OnEnd()
  13. {
  14. Debug.Log("OnEnd");
  15. LivesManager.Instance.RechargeOneLife();
  16. }*/
  17. void OnRequestLivesButtonMsg()
  18. {
  19. screen.Hide();
  20. FacebookHelper.Instance.RequestLives();
  21. }
  22. void OnRequestLivesAdButtonMsg()
  23. {
  24. screen.Hide();
  25. }
  26. void OnHide()
  27. {
  28. screen.Hide();
  29. }
  30. void OnRequestInvite()
  31. {
  32. WrapperFB.InviteFriends();
  33. }
  34. void OnBuyLivesButtonMsg()
  35. {
  36. StoreManager.Instance.Purchase(StoreProductId.lives_5);
  37. }
  38. void OnRequestShowAdButton()
  39. {
  40. //screen.Hide();
  41. if (!ConnectivityPollManager.HasInternet)
  42. {
  43. MenuManager._instance.scoresScreen.GetComponent<FacebookDialogManager>().noInternetDialog.Show();
  44. return;
  45. }
  46. Adware.Instance.Show(() => { });
  47. }
  48. }