diff --git a/entity/gem/RandomValue.gd b/entity/gem/RandomValue.gd index 3b76b51..e72ea7a 100644 --- a/entity/gem/RandomValue.gd +++ b/entity/gem/RandomValue.gd @@ -1,4 +1,9 @@ extends Node + +@export var min_value: int +@export var max_value: int + + func _ready(): - get_parent().value=Randomizer.rng.randi_range(0,360) + get_parent().value = Randomizer.rng.randi_range(min_value, max_value) diff --git a/entity/gem/gem.tscn b/entity/gem/gem.tscn index 29f0f5f..08cd7e6 100644 --- a/entity/gem/gem.tscn +++ b/entity/gem/gem.tscn @@ -38,10 +38,12 @@ shader = ExtResource("5_v6ppl") type = &"Gem" [node name="Valuable" parent="." instance=ExtResource("5_7bd6c")] -value = 10 +value = 1000 [node name="RandomValue" type="Node" parent="Valuable"] script = ExtResource("6_3lulr") +min_value = 900 +max_value = 1300 [node name="SoundWorking" type="AudioStreamPlayer" parent="."] stream = ExtResource("6_svrnw")