fixed a path visualiser bug and did a little balancing

This commit is contained in:
Lexi Quinn 2023-11-18 00:01:04 +11:00
parent 9cf6944ac8
commit 422c163dcd
8 changed files with 15 additions and 12 deletions

View File

@ -37,6 +37,7 @@ status_stats = ExtResource("3_xhrj0")
stats = ExtResource("4_rkhup") stats = ExtResource("4_rkhup")
[node name="GPUParticles3D" type="GPUParticles3D" parent="." index="5"] [node name="GPUParticles3D" type="GPUParticles3D" parent="." index="5"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1.6, 0)
amount = 12 amount = 12
lifetime = 0.6 lifetime = 0.6
process_material = SubResource("ParticleProcessMaterial_q1hpa") process_material = SubResource("ParticleProcessMaterial_q1hpa")

View File

@ -6,7 +6,7 @@
[sub_resource type="Resource" id="Resource_j28f4"] [sub_resource type="Resource" id="Resource_j28f4"]
script = ExtResource("1_ppnfm") script = ExtResource("1_ppnfm")
key = "Fire Delay" key = "Fire Delay"
value = 2.0 value = 2.5
[sub_resource type="Resource" id="Resource_likes"] [sub_resource type="Resource" id="Resource_likes"]
script = ExtResource("1_ppnfm") script = ExtResource("1_ppnfm")
@ -16,7 +16,7 @@ value = 0.0
[sub_resource type="Resource" id="Resource_b65mk"] [sub_resource type="Resource" id="Resource_b65mk"]
script = ExtResource("1_ppnfm") script = ExtResource("1_ppnfm")
key = "Range" key = "Range"
value = 30.0 value = 20.0
[resource] [resource]
script = ExtResource("2_5jdx5") script = ExtResource("2_5jdx5")

View File

@ -7,7 +7,7 @@
script = ExtResource("1_eh52x") script = ExtResource("1_eh52x")
name = "Radioactive" name = "Radioactive"
max_stacks = 0 max_stacks = 0
proc_cd = 3.0 proc_cd = 5.0
duration = 0.0 duration = 0.0
potency = 1.0 potency = 1.0
icon = ExtResource("1_2vw1n") icon = ExtResource("1_2vw1n")

View File

@ -13,12 +13,12 @@ world_model = NodePath("CSGSphere3D")
minimap_model = NodePath("Sprite3D") minimap_model = NodePath("Sprite3D")
[node name="CSGSphere3D" type="CSGSphere3D" parent="."] [node name="CSGSphere3D" type="CSGSphere3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.1, 0)
radius = 0.05 radius = 0.05
material = SubResource("StandardMaterial3D_lutld") material = SubResource("StandardMaterial3D_lutld")
[node name="Sprite3D" type="Sprite3D" parent="."] [node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0.385229, 0) transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 0.242234, 0)
layers = 4 layers = 4
texture_filter = 0 texture_filter = 0
texture = ExtResource("2_0gsds") texture = ExtResource("2_0gsds")

View File

@ -9,6 +9,7 @@ func _physics_process(_delta: float) -> void:
for enemy in get_tree().get_nodes_in_group("Enemies"): for enemy in get_tree().get_nodes_in_group("Enemies"):
if !is_instance_valid(enemy) or !enemy.alive or global_position.distance_to(enemy.global_position) > target_range: if !is_instance_valid(enemy) or !enemy.alive or global_position.distance_to(enemy.global_position) > target_range:
continue continue
if enemy.stats.target_type & stats.target_type:
enemies_in_range.append(enemy) enemies_in_range.append(enemy)
if time_since_firing >= time_between_shots: if time_since_firing >= time_between_shots:
time_since_firing -= time_between_shots time_since_firing -= time_between_shots

View File

@ -105,7 +105,7 @@ func set_upcoming_wave():
if is_multiplayer_authority(): if is_multiplayer_authority():
var spawn_power = WaveManager.calculate_spawn_power(wave + 1, connected_players_nodes.size()) var spawn_power = WaveManager.calculate_spawn_power(wave + 1, connected_players_nodes.size())
var new_wave = WaveManager.generate_wave(spawn_power, level.enemy_pool) var new_wave = WaveManager.generate_wave(spawn_power, level.enemy_pool)
networked_set_upcoming_wave.rpc(new_wave, 6 + floori(spawn_power / 50)) networked_set_upcoming_wave.rpc(new_wave, 6 + floori(spawn_power / 70))
@rpc("reliable", "call_local") @rpc("reliable", "call_local")

View File

@ -7,11 +7,12 @@ var visualizer_points = []
func spawn_visualizer_points() -> void: func spawn_visualizer_points() -> void:
var new_length = curve.get_baked_length() var new_length = curve.get_baked_length()
for x in new_length - length: for x in floori(new_length) - visualizer_points.size():
var point = visual_scene.instantiate() var point = visual_scene.instantiate()
visualizer_points.append(point) visualizer_points.append(point)
add_child(point) add_child(point)
length = new_length length = new_length
#print(str(int(length)) + " / " + str(visualizer_points.size()) + ", diff: " + str(visualizer_points.size() - length))
for x in visualizer_points.size(): for x in visualizer_points.size():
visualizer_points[x].progress_ratio = float(x) / visualizer_points.size() visualizer_points[x].progress_ratio = float(x) / visualizer_points.size()

File diff suppressed because one or more lines are too long