Cleanup
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,8 +12,8 @@ namespace Views {
|
||||
this.scoreText = GetComponentInChildren<TextMeshProUGUI>();
|
||||
}
|
||||
|
||||
public void UpdateScore() {
|
||||
this.displayScore = Mathf.Lerp(this.displayScore, this.actualScore, 5 * Time.deltaTime);
|
||||
public void UpdateScore(float scoreSpeed) {
|
||||
this.displayScore = Mathf.Lerp(this.displayScore, this.actualScore, scoreSpeed * Time.deltaTime);
|
||||
this.scoreText.text = this.displayScore.ToString("0");
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user