コード例 #1
0
    //change to the choosed anim and start the anim, then swipe to the second screen automatically
    public void onStartSport()
    {
        RuntimeAnimatorController choosedAnim = Resources.Load("Anim/AnimController/" + StaticItems.AnimName) as RuntimeAnimatorController;

        //check which joints to evaluate from Playfab database
        if (PlayFabClientAPI.IsClientLoggedIn())
        {
            try
            {
                StaticItems.ClientGetTitleData(StaticItems.AnimName);
            }
            finally
            {
                Debug.Log("finished");
            }
        }
        //if not login, assum evaluate default joints
        else
        {
            StaticItems.ChoosedAngles = StaticItems.ChoosedAngles_default;
        }

        StaticItems.Coach.GetComponent <Animator>().runtimeAnimatorController = choosedAnim;
        GameObject.Find("Screens").GetComponent <LeanSnap>().SnapWrapper(-1000f);
        GameObject.Find("LeanWindowCloser").GetComponent <LeanWindowCloser>().CloseAll();
    }