1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- using Prime31;
- using UnityEngine;
- using System.Collections;
- public class UIPostInviteFriends : MonoBehaviour {
- void completionHandler(string error, object result)
- {
- if (error != null)
- {
- Debug.LogError(error);
- //MenuManager._instance.FBShareDialog.Hide();
- //MenuManager._instance.OnActionAfterWin();
- }
- else
- {
- Prime31.Utils.logObject(result);
- //MenuManager._instance.FBShareDialog.Hide();
- //MenuManager._instance.OnActionAfterWin();
- }
- }
- void Start()
- {
- //FacebookManager.shareDialogFailedEvent += shareDialogFailedEvent;
- //FacebookManager.shareDialogSucceededEvent += shareDialogSucceededEvent;
- }
- public void PostInviteFB()
- {
-
- //LifeManager.Instance.InvitePlayer();
- //SocialWrapper.Invite();
- }
- void OnDisable()
- {
- //FacebookManager.shareDialogFailedEvent -= shareDialogFailedEvent;
- //FacebookManager.shareDialogSucceededEvent -= shareDialogSucceededEvent;
- }
- void shareDialogSucceededEvent(string postId)
- {
- AdManager.Instance.PlayVideoAd();
- Debug.Log("shareDialogSucceededEvent: " + postId);
- }
- void shareDialogFailedEvent(P31Error error)
- {
- AdManager.Instance.PlayVideoAd();
- Debug.Log("shareDialogFailedEvent: " + error);
- }
- }
|