re-enabled rain

This commit is contained in:
2024-10-27 13:53:49 +01:00
parent 7388e1a2d7
commit bb2f498ac5
4 changed files with 33 additions and 13 deletions

View File

@@ -9,16 +9,27 @@ public partial class Main : Node2D {
[Export] public int BrushSize = 5;
[Export] public float TextureResolution = 0.5f;
[Export] public int ChunksPerAxis = 2;
[Export] public float RainAmount = 0.01f;
[Export]
public float RainAmount {
get => rainAmount;
set {
rainAmount = value;
mLevel.SetRainAmount(rainAmount);
}
}
public static Main Instance;
private TextureRect mLevelDrawer;
private Level mLevel;
private bool enableRain;
private float rainAmount;
public override void _Ready() {
mLevel = new Level(this, (int)(GetViewportRect().Size.X * TextureResolution),
(int)(GetViewportRect().Size.Y * TextureResolution));
mLevel.SetRainAmount(rainAmount);
mLevelDrawer = GetNode<TextureRect>("CanvasLayer/LevelDrawer");
Instance = this;