diff --git a/Scenes/SettingsController.cs b/Scenes/SettingsController.cs index c195317..fe603ca 100644 --- a/Scenes/SettingsController.cs +++ b/Scenes/SettingsController.cs @@ -1,5 +1,3 @@ -using System.Reflection; -using FOU.Scripts; using Godot; public partial class SettingsController : VBoxContainer diff --git a/Scripts/Elements/Element.cs b/Scripts/Elements/Element.cs index 92fea11..bb09478 100644 --- a/Scripts/Elements/Element.cs +++ b/Scripts/Elements/Element.cs @@ -82,11 +82,11 @@ public class Element{ if (Chunk.IsEmpty(Position + Vector2I.Down)) Chunk.Swap(this, Position + Vector2I.Down); - else if (Chunk.IsEmpty(Position + randomDirection)) - Chunk.Swap(this, Position + randomDirection); + else if (Chunk.IsEmpty(Position + Vector2I.Down + randomDirection)) + Chunk.Swap(this, Position + Vector2I.Down + randomDirection); - else if (Chunk.IsEmpty(Position + randomDirection * VERTICAL_OPPOSITE)) - Chunk.Swap(this, Position + randomDirection * VERTICAL_OPPOSITE); + else if (Chunk.IsEmpty(Position + Vector2I.Down + randomDirection * VERTICAL_OPPOSITE)) + Chunk.Swap(this, Position + Vector2I.Down + randomDirection * VERTICAL_OPPOSITE); // density check if (Chunk.Get(Position + Vector2I.Down)?.Density < Density)