예제 #1
0
 public void MenuFriends(MenuStack menuStack)
 {
     this.menuFriends.Update();
     if (this.menuFriends.AddItem("Friends", User.get_IsSignedInPSN() && !Friends.FriendsListIsBusy()))
     {
         this.ErrorHandlerFriends(Friends.RequestFriendsList());
     }
     if (this.menuFriends.AddItem("Set Presence", User.get_IsSignedInPSN() && !User.OnlinePresenceIsBusy()))
     {
         this.ErrorHandlerPresence(User.SetOnlinePresence("Testing UnityNpToolkit"));
     }
     if (this.menuFriends.AddItem("Clear Presence", User.get_IsSignedInPSN() && !User.OnlinePresenceIsBusy()))
     {
         this.ErrorHandlerPresence(User.SetOnlinePresence(string.Empty));
     }
     if (this.menuFriends.AddItem("Post On Facebook", User.get_IsSignedInPSN() && !Facebook.IsBusy()))
     {
         this.ErrorHandlerFacebook(Facebook.PostMessage(new Facebook.PostFacebook
         {
             appID            = 701792156521339L,
             userText         = "I'm testing Unity's facebook integration !",
             photoURL         = "http://uk.playstation.com/media/RZXT_744/159/PlayStationNetworkFeaturedImage.jpg",
             photoTitle       = "Title",
             photoCaption     = "This is the caption",
             photoDescription = "This is the description",
             actionLinkName   = "Go To Unity3d.com",
             actionLinkURL    = "http://unity3d.com/"
         }));
     }
     if (this.menuFriends.AddItem("Post On Twitter", User.get_IsSignedInPSN() && !Twitter.IsBusy()))
     {
         this.ErrorHandlerTwitter(Twitter.PostMessage(new Twitter.PostTwitter
         {
             userText             = "I'm testing Unity's Twitter integration !",
             imagePath            = Application.get_streamingAssetsPath() + "/TweetUnity.png",
             forbidAttachPhoto    = false,
             disableEditTweetMsg  = true,
             forbidOnlyImageTweet = false,
             forbidNoImageTweet   = false,
             disableChangeImage   = false,
             limitToScreenShot    = true
         }));
     }
     if (this.menuFriends.AddBackIndex("Back", true))
     {
         menuStack.PopMenu();
     }
 }