cleanup
This commit is contained in:
@@ -47,15 +47,14 @@ public class Element {
|
||||
protected virtual void Tick() {
|
||||
Vector2I randomDirection = RandomDirectionDown();
|
||||
|
||||
if (Level.IsEmpty(Position + Vector2I.Down)) {
|
||||
if (Level.IsEmpty(Position + Vector2I.Down))
|
||||
Level.Swap(this, Position + Vector2I.Down);
|
||||
|
||||
} else if (Level.IsEmpty(Position + randomDirection)) {
|
||||
else if (Level.IsEmpty(Position + randomDirection))
|
||||
Level.Swap(this, Position + randomDirection);
|
||||
|
||||
} else if (Level.IsEmpty(Position + randomDirection * VERTICAL_OPPOSITE)) {
|
||||
else if (Level.IsEmpty(Position + randomDirection * VERTICAL_OPPOSITE))
|
||||
Level.Swap(this, Position + randomDirection * VERTICAL_OPPOSITE);
|
||||
}
|
||||
|
||||
if (GD.Randi() % MAX_DIFFUSE_SPEED > DiffuseSpeed) return; // ascend slower
|
||||
|
||||
|
||||
Reference in New Issue
Block a user