allowed more rain!
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Reflection;
|
||||
using Godot;
|
||||
|
||||
public partial class SettingsController : VBoxContainer
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
script = ExtResource("1_k1i8e")
|
||||
BrushSize = 1
|
||||
TextureResolution = 0.25
|
||||
RainAmount = 0.0
|
||||
RainAmount = 5.0
|
||||
|
||||
[node name="CanvasLayer" type="CanvasLayer" parent="."]
|
||||
|
||||
@@ -75,6 +75,6 @@ custom_minimum_size = Vector2(150, 0)
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 8
|
||||
size_flags_vertical = 1
|
||||
max_value = 1.0
|
||||
max_value = 5.0
|
||||
step = 0.01
|
||||
value = 1.0
|
||||
|
||||
@@ -45,7 +45,10 @@ public class Level {
|
||||
}
|
||||
|
||||
private void MakeItRain(float rainAmount) {
|
||||
if (GD.Randf() < rainAmount) {
|
||||
int rainDrops = (int)Math.Round(rainAmount);
|
||||
|
||||
for (int i = 0; i <= rainDrops; i++) {
|
||||
if (GD.Randf() < rainAmount)
|
||||
WritePixel<Water>((int)(GD.Randi() % SizeX), 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user