コード例 #1
0
    IEnumerator cheatAniPlay(string no)
    {
        SmoothMoves.BoneAnimation boneAni = gameObject.GetComponent <SmoothMoves.BoneAnimation>();

        if (string.IsNullOrEmpty(no) == true)
        {
            string aniName = boneAni.GetAnimationClipName(0);
            no = aniName.Split('_') [1];
        }
        string ani = "Atk_" + no;
        int    i   = boneAni.GetAnimationClipIndex(ani);

        if (i == -1)
        {
            yield break;
        }

        if (boneAni.IsPlaying(ani) == true)
        {
            boneAni.Stop();
        }

        Debug.Log(boneAni[ani].length);

        boneAni.CrossFade(ani);

        yield return(new WaitForSeconds(boneAni[ani].length));

        if (boneAni != null)
        {
            boneAni.CrossFade("Idle_" + no);
        }
    }
コード例 #2
0
 void Start()
 {
     if (string.IsNullOrEmpty(no) == true)
     {
         SmoothMoves.BoneAnimation boneAni = gameObject.GetComponent <SmoothMoves.BoneAnimation>();
         string aniName = boneAni.GetAnimationClipName(0);
         no = _no = aniName.Split('_') [1];
     }
 }
コード例 #3
0
ファイル: SmallFireTowerAnim.cs プロジェクト: mellwa/csci526
 void Start()
 {
     if (string.IsNullOrEmpty(no) == true)
     {
         SmoothMoves.BoneAnimation boneAni = gameObject.GetComponent <SmoothMoves.BoneAnimation>();
         string aniName = boneAni.GetAnimationClipName(0);
         no = _no = aniName.Split('_') [1];
         ChangeNo(changeTo);
         StartCoroutine("cheatAniPlay", no);
     }
 }