람다식이 익숙치가 않아서 도대체 뭘건들여야 할지 감도 안잡히네요...
아래 댓글에 람다식을 이용하면 코루틴도 필요없다던데 구글링해봐도 기본적인건 이해하는데 아래코드같은경우는 어떻게 써야하는지 모르겠습니다 ㅠ.ㅠ
IEnumerator EnterToPortal(List<UnitInfo> unit)
{
int i = 0;
while (i < PlayerManagerForTouchScreen.Instance.partyCount)
{
unit[i].agentNavMesh.navState = NavState.Uncontrol;
unit[i].animator.SetFloat(AnimationName.VelocityZ.ToString(), 4);
unit[i].nav.enabled = false;
Sequence mySequence = DOTween.Sequence();
mySequence.Append(unit[i].obj.transform.DOMove(enterPos.position, 2))
.PrependInterval(0)
.Insert(0, unit[i].obj.transform.DOLookAt(enterPos.position + Vector3.up * 0.5f, 0.5F))
.Append(unit[i].obj.transform.DOMove(outPos.position, 2))
.PrependInterval(0)
.Insert(2, unit[i].obj.transform.DOLookAt(outPos.position + Vector3.up * 0.5f, 0.5F));
i++;
yield return new WaitForSeconds(1);
}
yield return null;
}
람다식과 코루틴 기능이 같을 것 같냐? 개소리 같은데
카톡 남겨
shadoweye 입니다
와 나도 알고싶다 해당 내용 댓글 남겨주면 안되냐