diffuse in both directions
This commit is contained in:
@@ -93,6 +93,8 @@ public class Element{
|
|||||||
Chunk.Swap(this, Position + Vector2I.Down);
|
Chunk.Swap(this, Position + Vector2I.Down);
|
||||||
else if (Chunk.Get(Position + Vector2I.Down + randomDirection)?.Density < Density)
|
else if (Chunk.Get(Position + Vector2I.Down + randomDirection)?.Density < Density)
|
||||||
Chunk.Swap(this, Position + Vector2I.Down + randomDirection);
|
Chunk.Swap(this, Position + Vector2I.Down + randomDirection);
|
||||||
|
else if (Chunk.Get(Position + Vector2I.Down + randomDirection * VERTICAL_OPPOSITE)?.Density < Density)
|
||||||
|
Chunk.Swap(this, Position + Vector2I.Down + randomDirection * VERTICAL_OPPOSITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
protected Vector2I RandomDirectionDown() {
|
protected Vector2I RandomDirectionDown() {
|
||||||
|
|||||||
Reference in New Issue
Block a user