Cascading
This commit is contained in:
@@ -13,7 +13,7 @@ namespace ScriptableObjects {
|
||||
public float bombDelay = 0.1f;
|
||||
public float bombSelfDelay = 0.05f;
|
||||
public int bombRadius = 1;
|
||||
public int dropHeight = 1;
|
||||
public float dropHeight = 1;
|
||||
public float gemSpeed = 0.1f;
|
||||
public float scoreSpeed = 5;
|
||||
public int width;
|
||||
|
||||
@@ -25,8 +25,7 @@ namespace Services {
|
||||
}
|
||||
|
||||
GemView gemView;
|
||||
float randomOffset = Random.Range(1f, 2.5f);
|
||||
Vector2 vector2Position = new Vector2(position.x, position.y + dropHeight * randomOffset);
|
||||
Vector2 vector2Position = new Vector2(position.x, position.y + dropHeight);
|
||||
if (this.gemTypeToPools[type].Count > 0) {
|
||||
gemView = this.gemTypeToPools[type].Pop();
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace Views {
|
||||
}
|
||||
|
||||
private async UniTask FallDelay() {
|
||||
float randomDelay = Random.Range(0.05f, 0.5f);
|
||||
float randomDelay = 1 * this.gem.Position.y / 100f;
|
||||
await UniTask.WaitForSeconds(randomDelay);
|
||||
this.isFalling = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user