fixed rain
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using System.Reflection;
|
||||
using FOU.Scripts;
|
||||
using Godot;
|
||||
|
||||
public partial class SettingsController : VBoxContainer
|
||||
@@ -18,7 +19,7 @@ public partial class SettingsController : VBoxContainer
|
||||
slSize.Value = main.BrushSize;
|
||||
|
||||
slRain.ValueChanged += OnRainValueChanged;
|
||||
slRain.Value = main.RainAmount;
|
||||
slRain.Value = main.rainAmount;
|
||||
}
|
||||
|
||||
private void OnSizeValueChanged(double value) {
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_k1i8e")
|
||||
DebugMode = true
|
||||
BrushSize = 2
|
||||
BrushSize = 4
|
||||
RainAmount = 1.0
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
@@ -85,6 +85,6 @@ custom_minimum_size = Vector2(150, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 1
|
||||
max_value = 5.0
|
||||
max_value = 10.0
|
||||
step = 0.01
|
||||
value = 1.0
|
||||
|
||||
@@ -9,14 +9,21 @@ 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;
|
||||
[Export] public float rainAmount = 0;
|
||||
|
||||
public static Main Instance;
|
||||
public Level Level;
|
||||
|
||||
private TextureRect mLevelDrawer;
|
||||
private bool enableRain;
|
||||
private float rainAmount;
|
||||
|
||||
public float RainAmount {
|
||||
get => rainAmount;
|
||||
set {
|
||||
rainAmount = value;
|
||||
Level?.SetRainAmount(rainAmount);
|
||||
}
|
||||
}
|
||||
|
||||
public override void _Ready() {
|
||||
Level = new Level(this, (int)(GetViewportRect().Size.X * TextureResolution),
|
||||
|
||||
Reference in New Issue
Block a user