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); } }
void Start() { if (string.IsNullOrEmpty(no) == true) { SmoothMoves.BoneAnimation boneAni = gameObject.GetComponent <SmoothMoves.BoneAnimation>(); string aniName = boneAni.GetAnimationClipName(0); no = _no = aniName.Split('_') [1]; } }
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); } }