Inheritance: UnityEngine.ScriptableObject
Exemplo n.º 1
0
 void FillAniBoneInfo(Transform root, FB.PosePlus.AniPlayer controller, FB.PosePlus.AniClip ani)
 {
     string path = getPath(root, controller.transform);
     if (ani.boneinfo == null)
         ani.boneinfo = new List<string>();
     ani.boneinfo.Add(path);
     foreach (Transform t in root)
     {
         FillAniBoneInfo(t, controller, ani);
     }
 }
Exemplo n.º 2
0
 private void OnDllLoaded(IFacebook fb)
 {
     FB.facebook = fb;
     FB.OnDllLoaded();
 }
Exemplo n.º 3
0
 public void QueryNickname()
 {
     FB.API("me", HttpMethod.GET, QueryNicknameCallback);
 }
Exemplo n.º 4
0
 public override void Share(string path)
 {
     FB.ShareLink(new System.Uri(Share_Uri), callback: ShareCallback);
 }
Exemplo n.º 5
0
    // Use this for initialization
//	void Start ()
//	{
//        Debug.Log();
//	}

    public void Init(int _stationID)
    {
        reviews       = new Reviews();
        reviewsDao    = new Reviews_DAO();
        facilitiesDao = new Facilities_DAO();
        DateReview.GetComponent <UILabel>().text = DateTime.Now.Date.ToString("dd-MM-yyyy");
        reviews.Date = DateReview.GetComponent <UILabel>().text;
        Debug.Log(reviews.Date);
        stationID         = _stationID;
        reviews.Stationid = stationID;

        EventDelegate.Add(buttonBack.GetComponent <UIButton>().onClick,
                          () =>
        {
            gameObject.GetComponentInParent <AppManager>().form[2].SetActive(true);
            gameObject.SetActive(false);
        });



        EventDelegate.Add(Rating.GetComponent <UIPopupList>().onChange,
                          () =>
        {
            Debug.Log(ConvertStarToPoint(Rating.GetComponent <UIPopupList>().value));
            reviews.Rating = ConvertStarToPoint(Rating.GetComponent <UIPopupList>().value);
        });

        EventDelegate.Add(TypeOfFacilities.GetComponent <UIPopupList>().onChange,
                          () =>
        {
            Debug.Log("Facilities ID: " + facilitiesDao.GetFacilitiesIDByName(TypeOfFacilities.GetComponent <UIPopupList>().value) + " | facilities Name: " + TypeOfFacilities.GetComponent <UIPopupList>().value);
            reviews.Facilitiyid =
                facilitiesDao.GetFacilitiesIDByName(
                    TypeOfFacilities.GetComponent <UIPopupList>().value);
        });

        EventDelegate.Add(Save.GetComponent <UIButton>().onClick,
                          () =>
        {
            reviews.Comment = Comment.GetComponent <UIInput>().value;
            EnableAllControl(false);
            PopupSave.SetActive(true);
            EventDelegate.Add(GameObject.Find("PopUp/btnBack").GetComponent <UIButton>().onClick,
                              () =>
            {
                EnableAllControl(true);
                PopupSave.SetActive(false);
            });
            EventDelegate.Add(GameObject.Find("PopUp/btnConfirm").GetComponent <UIButton>().onClick,
                              () =>
            {
                SaveData();
                EnableAllControl(true);
                PopupSave.SetActive(false);
            });
        }
                          );

        EventDelegate.Add(ShareFb.GetComponent <UIButton>().onClick,
                          () =>
        {
            EnableAllControl(false);
            reviews.Comment = Comment.GetComponent <UIInput>().value;
            FB.Init(() =>
            {
                if (!FB.IsLoggedIn)
                {
                    FB.Logout();
                    FB.Login("public_profile,email,user_friends",
                             (FBResult resuit)
                             =>
                    {
                        PopupFb.SetActive(true);
                        PopupFb.GetComponent <PopupShareFb_UI>().ShareFeed(reviews);
                    });
                }
                else
                {
                    FB.Login("public_profile,email,user_friends",
                             (FBResult resuit)
                             =>
                    {
                        PopupFb.SetActive(true);
                        PopupFb.GetComponent <PopupShareFb_UI>().ShareFeed(reviews);
                    });
                }
            });
        });
    }
Exemplo n.º 6
0
 public void GetLeaderBoard()
 {
     FB.API("app/scores?fields=score", HttpMethod.GET, GetScoreCallback);
 }
 //Delete scores for a player
 public void DeletePlayerScores()
 {
     FB.API("/" + UserId + "/scores", FB_HttpMethod.DELETE, OnScoreDeleted);
 }
Exemplo n.º 8
0
 void FbInitCallBack()
 {
     FB.ActivateApp();
     Debug.Log("FB has been initialized");
     fbandcsInitiated = fbandcsInitiated + 1;
 }
 //Read scores for players and friends
 public void LoadAppScores()
 {
     FB.API("/" + AppId + "/scores", FB_HttpMethod.GET, OnAppScoresComplete);
 }
    //--------------------------------------
    //  Scores API
    //  https://developers.facebook.com/docs/games/scores
    //------------------------------------



    //Read score for a player
    public void LoadPlayerScores()
    {
        FB.API("/" + UserId + "/scores", FB_HttpMethod.GET, OnLoaPlayrScoresComplete);
    }
    //--------------------------------------
    //  Requests API
    //--------------------------------------


    public void LoadPendingRequests()
    {
        FB.API("/" + UserId + "/apprequests?fields=id,application,data,message,action_type,from,object", FB_HttpMethod.GET, OnRequestsLoadComplete);
    }
    //--------------------------------------
    //  API METHODS
    //--------------------------------------


    /*
     * public void CallPermissionCheck() {
     *      FB.API("/me/permissions", FB_HttpMethod.GET, PermissionCallback);
     * }
     *
     * public void RevokePermission(FBPermission permission) {
     *      FB.API ("me/permissions/" + permission.Name, FB_HttpMethod.DELETE, RemovePermissionCallback);
     * }
     */

    public void Logout()
    {
        OnLogOut();
        FB.Logout();
    }
    public void Login(params string[] scopes)
    {
        OnLoginStarted();

        FB.Login(scopes);
    }
 void Awake()
 {
     FB.Init(SetInit, OnHideUnity);
 }
Exemplo n.º 15
0
 public void fetchFBName()
 {
     FB.API("me?fields=first_name", HttpMethod.GET, NameCallBack);
 }
Exemplo n.º 16
0
    public static void WriteAniClip(FB.PosePlus.AniClip clip, System.IO.Stream ms)
    {
        //name
        var nameb = System.Text.Encoding.UTF8.GetBytes(clip.name);
        ms.WriteByte((byte)nameb.Length);
        ms.Write(nameb, 0, nameb.Length);
        //fps
        byte[] fpsb = BitConverter.GetBytes(clip.fps);
        ms.Write(fpsb, 0, 4);
        //loop
        ms.WriteByte((byte)(clip.loop ? 1 : 0));
        {
            //boneinfo
            int c = clip.boneinfo.Count;
            byte[] cliplenb = BitConverter.GetBytes(c);
            ms.Write(cliplenb, 0, 4);
            for (int i = 0; i < c; i++)
            {
                byte[] bnameb = System.Text.Encoding.UTF8.GetBytes(clip.boneinfo[i]);
                ms.WriteByte((byte)bnameb.Length);
                ms.Write(bnameb, 0, bnameb.Length);
            }
        }
        {
            //subclips
            int c = clip.subclips.Count;
            byte[] cliplenb = BitConverter.GetBytes(c);
            ms.Write(cliplenb, 0, 4);
            for (int i = 0; i < c; i++)
            {
                byte[] bnameb = System.Text.Encoding.UTF8.GetBytes(clip.subclips[i].name);
                ms.WriteByte((byte)bnameb.Length);
                ms.Write(bnameb, 0, bnameb.Length);

                ms.WriteByte((byte)(clip.subclips[i].loop ? 1 : 0));
                byte[] sb = BitConverter.GetBytes(clip.subclips[i].startframe);
                byte[] eb = BitConverter.GetBytes(clip.subclips[i].endframe);
            }
        }

        {//frame
            int c = clip.frames.Count;
            byte[] cliplenb = BitConverter.GetBytes(c);
            ms.Write(cliplenb, 0, 4);
            for (int i = 0; i < c; i++)
            {
                byte[] fidb = BitConverter.GetBytes(clip.frames[i].fid);
                ms.Write(fidb, 0, 4);
                ms.WriteByte((byte)(clip.frames[i].key ? 1 : 0));

                for (int ib = 0; ib < clip.boneinfo.Count; ib++)
                {
                    clip.frames[i].bonesinfo[ib].Save(ms,
                        i > 0 ? clip.frames[i - 1].bonesinfo[ib] : null);
                }
            }
        }
    }
 //Create or update a score
 public void SubmitScore(int score)
 {
     lastSubmitedScore = score;
     FB.API("/" + UserId + "/scores?score=" + score, FB_HttpMethod.POST, OnScoreSubmited);
 }
Exemplo n.º 18
0
 public void Login()
 {
     FB.LogInWithReadPermissions(callback: OnLoginIn);
 }