public void Update()
{
Vector3 dest = playerDest;
if (isOpponentCard)
{
animTime = 0.3f;
dest = opponentDest;
iTweenExtensions.RotateTo(card.gameObject, new Vector3(0, 180, 180), animTime, 0, EaseType.easeOutCubic);
}
else
{
iTweenExtensions.RotateTo(card.gameObject, Vector3.zero, animTime, 0, EaseType.easeOutCubic);
}
iTweenExtensions.MoveToLocal(card.gameObject, dest, animTime, 0, EaseType.easeOutCubic);
if (Vector3.Distance(card.gameObject.transform.localPosition, dest) < 0.08f)
{
card.gameObject.transform.localPosition = dest;
Complete = true;
cardDrawn.Dispatch(card);
}
}