|
@@ -68,7 +68,7 @@ public class Paper : MonoBehaviour
|
|
|
Vector3 startPosition = transform.position;
|
|
|
startPosition.z = 10;
|
|
|
transform.position = startPosition;
|
|
|
-
|
|
|
+
|
|
|
transform.DOMoveZ(toPositionZ, 1f);
|
|
|
}
|
|
|
|
|
@@ -361,9 +361,7 @@ public class Paper : MonoBehaviour
|
|
|
|
|
|
_canFold = false;
|
|
|
|
|
|
-
|
|
|
-
|
|
|
- LeanTween.moveZ(gameObject, -20f, 0.7f).setEaseInBack().setOnComplete(() => { });
|
|
|
+ transform.DOMoveZ(-20f, 0.7f).SetEase(Ease.InBack).OnComplete(() => { });
|
|
|
|
|
|
if (effect.StickerEffect != null)
|
|
|
{
|
|
@@ -378,7 +376,6 @@ public class Paper : MonoBehaviour
|
|
|
Destroy(stickerEffect.gameObject);
|
|
|
}
|
|
|
|
|
|
- UIManager.setLevelCompleteDelegate?.Invoke();
|
|
|
levelCompleteCallBack?.Invoke();
|
|
|
yield break;
|
|
|
}
|
|
@@ -388,12 +385,17 @@ public class Paper : MonoBehaviour
|
|
|
bool animationComplete = false;
|
|
|
|
|
|
Debug.Log("Wrong!");
|
|
|
-
|
|
|
- LeanTween.moveLocalX(gameObject, transform.position.x + 0.1f, 0.1f).setEaseShake().setOnComplete(() =>
|
|
|
+
|
|
|
+ transform.DOLocalMoveX(transform.position.x + 0.1f, 0.1f).SetEase(Ease.InBounce).OnComplete(() =>
|
|
|
{
|
|
|
- LeanTween.moveLocalX(gameObject, transform.position.x - 0.1f, 0.1f).setEaseShake()
|
|
|
- .setOnComplete(() => { animationComplete = true; });
|
|
|
+ transform.DOLocalMoveX(transform.position.x - 0.1f, 0.1f).SetEase(Ease.InBounce)
|
|
|
+ .OnComplete(() => { animationComplete = true; });
|
|
|
});
|
|
|
+ // LeanTween.moveLocalX(gameObject, transform.position.x + 0.1f, 0.1f).setEaseShake().setOnComplete(() =>
|
|
|
+ // {
|
|
|
+ // LeanTween.moveLocalX(gameObject, transform.position.x - 0.1f, 0.1f).setEaseShake()
|
|
|
+ // .setOnComplete(() => { animationComplete = true; });
|
|
|
+ // });
|
|
|
|
|
|
yield return new WaitUntil(() => animationComplete);
|
|
|
animationComplete = false;
|
|
@@ -404,7 +406,6 @@ public class Paper : MonoBehaviour
|
|
|
UnfoldAllFoldings();
|
|
|
|
|
|
|
|
|
- UIManager.wrongPaperFolded?.Invoke();
|
|
|
wrongPaperFolded?.Invoke();
|
|
|
yield break;
|
|
|
}
|