This commit is contained in:
2025-12-15 03:44:53 +08:00
parent 25a5950e8d
commit 2a3bcf7423
12 changed files with 326 additions and 107 deletions

View File

@@ -28,7 +28,7 @@ namespace Views {
this.isFalling = true;
}
public async UniTaskVoid UpdatePosition(Vector2Int positionBasedOnIndex) {
public async UniTaskVoid UpdatePosition(Vector2Int positionBasedOnIndex, float gemSpeed) {
if (!this.isFalling) {
await FallDelay();
}
@@ -37,7 +37,7 @@ namespace Views {
return;
if (Vector2.Distance(this.transform.position, positionBasedOnIndex.ToVector2()) > 0.01f) {
this.transform.position = Vector2.Lerp(this.transform.position, positionBasedOnIndex.ToVector2(), 0.05f);
this.transform.position = Vector2.Lerp(this.transform.position, positionBasedOnIndex.ToVector2(), gemSpeed);
}
}
}