#region animation관련 (플레이 백, startTIme,endTime)
public void AnimationPlayAndBack(bool isOn)
{
Debug.Log("ani.clip.name:" + animation_Tutorials[0].clip.name);
if (isOn)
{
animation_Tutorials[0][animation_Tutorials[0].clip.name].time = 0;
animation_Tutorials[0][animation_Tutorials[0].clip.name].speed = 1;
animation_Tutorials[0].Play(animation_Tutorials[0].clip.name);
}
else
{
animation_Tutorials[0][animation_Tutorials[0].clip.name].time = animation_Tutorials[0][animation_Tutorials[0].clip.name].length;
animation_Tutorials[0][animation_Tutorials[0].clip.name].speed = -1;
animation_Tutorials[0].Play(animation_Tutorials[0].clip.name);
}
}
//public void AnimationPlay(float startTime,float endTime)
//{
// animation_Tutorials[0][animation_Tutorials[0].clip.name].time = startTime;
// animation_Tutorials[0][animation_Tutorials[0].clip.name].speed = 1;
//}
public void OnAnimationPlayCustomTime(float startTime, float endTime)
{
if (cor_CustomAnimation != null)
{
StopCoroutine(cor_CustomAnimation);
cor_CustomAnimation = null;
}
cor_CustomAnimation = cor_AnimationPlayCustomTime(startTime, endTime);
StartCoroutine(cor_CustomAnimation);
Animation_StartTimes.Enqueue(startTime);
}
public void OnAnimationPlayBackCustomTime(float startTime)
{
if (cor_CustomAnimationBack != null)
{
StopCoroutine(cor_CustomAnimationBack);
cor_CustomAnimationBack = null;
}
cor_CustomAnimationBack = cor_AnimationBackPlayCustomTime(startTime);
StartCoroutine(cor_CustomAnimationBack);
}
IEnumerator PlayBack()
{
while (Animation_StartTimes.Count > 0)
{
float startTime = Animation_StartTimes.Dequeue();
float PlayTime = animation_Tutorials[0][animation_Tutorials[0].clip.name].time - startTime;
OnAnimationPlayBackCustomTime(startTime);
yield return new WaitForSeconds(PlayTime);
}
}
IEnumerator cor_AnimationPlayCustomTime(float startTime, float endTime)
{
animation_Tutorials[0][animation_Tutorials[0].clip.name].time = startTime;
animation_Tutorials[0][animation_Tutorials[0].clip.name].speed = 1;
animation_Tutorials[0].Play(animation_Tutorials[0].clip.name);
float playTime = endTime - startTime;
yield return new WaitForSeconds(playTime);
animation_Tutorials[0].Stop();
animation_Tutorials[0][animation_Tutorials[0].clip.name].time = endTime;
}
IEnumerator cor_AnimationBackPlayCustomTime(float startTime)
{
float playTime = animation_Tutorials[0][animation_Tutorials[0].clip.name].time - startTime;
animation_Tutorials[0][animation_Tutorials[0].clip.name].speed = -1;
animation_Tutorials[0].Play(animation_Tutorials[0].clip.name);
yield return new WaitForSeconds(playTime);
animation_Tutorials[0].Stop();
animation_Tutorials[0][animation_Tutorials[0].clip.name].time = startTime;
}
#endregion
피드 구독하기:
댓글 (Atom)
git rejected error(feat. cherry-pick)
문제 아무 생각 없이 pull을 받지않고 로컬에서 작업! 커밋, 푸시 진행을 해버렷다. push에선 remote와 다르니 당연히 pull을 진행해라고 하지만 로컬에서 작업한 내용을 백업하지 않고 진행하기에는 부담스럽다(로컬작업 유실 가능성) 해결하려...
-
/// < summary > /// 검색 조건과 내용으로 테이블에 있는 데이터를 검색하는 메서드 /// </ summary > /// < param name = "valu...
-
public class Test : MonoBehaviour { //매출 데이터를 읽어 들이고 Sales 객체 리스트를 반환한다. List<string> list = new List<string> { ...
-
설명과 package파일 https://gitlab.com/dooo3/scrollview_objpool 하는이유 100개 이상일때 scrollview가 퍼포먼스가 떨어진다... Point!!!! 1.shopItemTableViewCell,...
댓글 없음:
댓글 쓰기