oh man i fixed that status effect bug
This commit is contained in:
parent
c44a730b59
commit
400415f8a5
@ -1,4 +1,4 @@
|
|||||||
[gd_resource type="Resource" script_class="HeroClass" load_steps=11 format=3 uid="uid://b5pc3frhx467q"]
|
[gd_resource type="Resource" script_class="HeroClass" load_steps=12 format=3 uid="uid://b5pc3frhx467q"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://dq8v5e11rvyi6" path="res://Classes/Engineer/plan.tscn" id="1_2m5d7"]
|
[ext_resource type="PackedScene" uid="uid://dq8v5e11rvyi6" path="res://Classes/Engineer/plan.tscn" id="1_2m5d7"]
|
||||||
[ext_resource type="Script" uid="uid://d40isem6w5d8" path="res://Scripts/Resources/card.gd" id="1_t4fvj"]
|
[ext_resource type="Script" uid="uid://d40isem6w5d8" path="res://Scripts/Resources/card.gd" id="1_t4fvj"]
|
||||||
@ -7,6 +7,7 @@
|
|||||||
[ext_resource type="Resource" uid="uid://cvto66tp7rrst" path="res://Cards/gatling.tres" id="4_ovvb2"]
|
[ext_resource type="Resource" uid="uid://cvto66tp7rrst" path="res://Cards/gatling.tres" id="4_ovvb2"]
|
||||||
[ext_resource type="Resource" uid="uid://cucdevshmdohf" path="res://Cards/overclock_card.tres" id="5_vqkxt"]
|
[ext_resource type="Resource" uid="uid://cucdevshmdohf" path="res://Cards/overclock_card.tres" id="5_vqkxt"]
|
||||||
[ext_resource type="Texture2D" uid="uid://ctkixdue3o7ec" path="res://Classes/Engineer/red_hand.png" id="6_a8dvt"]
|
[ext_resource type="Texture2D" uid="uid://ctkixdue3o7ec" path="res://Classes/Engineer/red_hand.png" id="6_a8dvt"]
|
||||||
|
[ext_resource type="Resource" uid="uid://b3o112jw3loiu" path="res://Cards/reactor.tres" id="7_1qd1v"]
|
||||||
[ext_resource type="Script" uid="uid://dcwtg2gev3uia" path="res://Scripts/Resources/hero_class.gd" id="7_ftkad"]
|
[ext_resource type="Script" uid="uid://dcwtg2gev3uia" path="res://Scripts/Resources/hero_class.gd" id="7_ftkad"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ciagj1hfn4gou" path="res://Classes/Engineer/podium.tscn" id="7_nyup7"]
|
[ext_resource type="PackedScene" uid="uid://ciagj1hfn4gou" path="res://Classes/Engineer/podium.tscn" id="7_nyup7"]
|
||||||
[ext_resource type="Texture2D" uid="uid://d4jd718brpsed" path="res://Classes/Engineer/doe.png" id="8_0o0bw"]
|
[ext_resource type="Texture2D" uid="uid://d4jd718brpsed" path="res://Classes/Engineer/doe.png" id="8_0o0bw"]
|
||||||
@ -16,7 +17,7 @@ script = ExtResource("7_ftkad")
|
|||||||
hero_name = "Engineer"
|
hero_name = "Engineer"
|
||||||
texture = ExtResource("8_0o0bw")
|
texture = ExtResource("8_0o0bw")
|
||||||
hand_texture = ExtResource("6_a8dvt")
|
hand_texture = ExtResource("6_a8dvt")
|
||||||
deck = Array[ExtResource("1_t4fvj")]([ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("3_eml7q"), ExtResource("4_ovvb2"), ExtResource("5_vqkxt")])
|
deck = Array[ExtResource("1_t4fvj")]([ExtResource("2_62g46"), ExtResource("2_62g46"), ExtResource("3_eml7q"), ExtResource("4_ovvb2"), ExtResource("5_vqkxt"), ExtResource("7_1qd1v")])
|
||||||
faction = 1
|
faction = 1
|
||||||
podium = ExtResource("7_nyup7")
|
podium = ExtResource("7_nyup7")
|
||||||
card_item = ExtResource("1_2m5d7")
|
card_item = ExtResource("1_2m5d7")
|
||||||
|
@ -126,13 +126,13 @@ curve = SubResource("Curve_kobsv")
|
|||||||
metadata/_custom_type_script = "uid://cl2mi4bnpatwk"
|
metadata/_custom_type_script = "uid://cl2mi4bnpatwk"
|
||||||
|
|
||||||
[node name="Plane" type="MeshInstance3D" parent="Node3D"]
|
[node name="Plane" type="MeshInstance3D" parent="Node3D"]
|
||||||
transform = Transform3D(0.183, 0, 0, 0, 0.153, 0, 0, 0, 0.137, -0.758238, 0.0293462, -0.313285)
|
transform = Transform3D(0.129, 0, 0, 0, 0.108, 0, 0, 0, 0.097, -0.536755, 0.0293462, -0.257914)
|
||||||
mesh = SubResource("ArrayMesh_kobsv")
|
mesh = SubResource("ArrayMesh_kobsv")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
surface_material_override/0 = ExtResource("5_2u312")
|
surface_material_override/0 = ExtResource("5_2u312")
|
||||||
|
|
||||||
[node name="Plane2" type="MeshInstance3D" parent="Node3D"]
|
[node name="Plane2" type="MeshInstance3D" parent="Node3D"]
|
||||||
transform = Transform3D(0.183, 0, 0, 0, 0.153, 0, 0, 0, 0.137, -0.758238, 0.0293462, -0.313285)
|
transform = Transform3D(0.129, 0, 0, 0, 0.108, 0, 0, 0, 0.097, -0.536755, 0.0293462, -0.257914)
|
||||||
mesh = SubResource("ArrayMesh_75s6s")
|
mesh = SubResource("ArrayMesh_75s6s")
|
||||||
skeleton = NodePath("")
|
skeleton = NodePath("")
|
||||||
|
|
||||||
|
@ -18,36 +18,39 @@ radius = 3.0
|
|||||||
height = 1.0
|
height = 1.0
|
||||||
sides = 32
|
sides = 32
|
||||||
|
|
||||||
[node name="CharacterSprite" type="Sprite3D" parent="Base"]
|
|
||||||
transform = Transform3D(1.6895, 0, -2.47903, 0, 3, 0, 2.47903, 0, 1.6895, -0.0459526, 1.91885, -0.305444)
|
|
||||||
modulate = Color(0.517184, 0.517184, 0.517184, 1)
|
|
||||||
billboard = 2
|
|
||||||
texture_filter = 0
|
|
||||||
texture = ExtResource("2_4b5pd")
|
|
||||||
|
|
||||||
[node name="Node3D" parent="Base" instance=ExtResource("3_pmyku")]
|
[node name="Node3D" parent="Base" instance=ExtResource("3_pmyku")]
|
||||||
transform = Transform3D(0.563166, 0, -0.826344, 0, 1, 0, 0.826344, 0, 0.563166, -1.32611, 0.5, -0.864711)
|
transform = Transform3D(0.563166, 0, -0.826344, 0, 1, 0, 0.826344, 0, 0.563166, -1.32611, 0.5, -0.864711)
|
||||||
|
|
||||||
[node name="Assaultmod" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(-0.155908, 0.191531, -0.37018, -7.29442e-09, 0.395231, 0.204492, 0.416795, 0.0716447, -0.138472, 1.08392, 0.959456, -1.22038)
|
|
||||||
mesh = ExtResource("4_1jafm")
|
|
||||||
skeleton = NodePath("../../..")
|
|
||||||
|
|
||||||
[node name="Snipermodel" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(0.410348, 0.0352013, 0.0823131, 0.0231825, 0.331215, -0.257215, -0.0864702, 0.255847, 0.32166, -1.09654, 0.957512, 0.64087)
|
|
||||||
mesh = ExtResource("5_851y4")
|
|
||||||
skeleton = NodePath("../../..")
|
|
||||||
|
|
||||||
[node name="Gattlemesh" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(0.11298, -0.0560454, 0.277704, 2.63199e-09, 0.298972, 0.0603377, -0.283303, -0.0223507, 0.110748, 0.976316, 0.901463, 0.843925)
|
|
||||||
mesh = ExtResource("6_iftlf")
|
|
||||||
skeleton = NodePath("../../..")
|
|
||||||
|
|
||||||
[node name="SpotLight3D" type="SpotLight3D" parent="Base"]
|
[node name="SpotLight3D" type="SpotLight3D" parent="Base"]
|
||||||
transform = Transform3D(0.563166, 0.826344, 3.61207e-08, 1.35728e-16, -4.37114e-08, 1, 0.826344, -0.563166, -2.46168e-08, -0.0459526, 4, -0.305444)
|
transform = Transform3D(0.563166, 0.826344, 3.61207e-08, 1.35728e-16, -4.37114e-08, 1, 0.826344, -0.563166, -2.46168e-08, -0.0459526, 4, -0.305444)
|
||||||
spot_range = 10.0
|
spot_range = 10.0
|
||||||
spot_attenuation = 0.39
|
spot_attenuation = 0.39
|
||||||
|
|
||||||
[node name="Tower2" parent="Base" instance=ExtResource("7_pmyku")]
|
[node name="Content" type="Node3D" parent="Base"]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="CharacterSprite" type="Sprite3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(1.6895, 0, -2.47903, 0, 3, 0, 2.47903, 0, 1.6895, -0.0459526, 1.91885, -0.305444)
|
||||||
|
modulate = Color(0.517184, 0.517184, 0.517184, 1)
|
||||||
|
billboard = 2
|
||||||
|
texture_filter = 0
|
||||||
|
texture = ExtResource("2_4b5pd")
|
||||||
|
|
||||||
|
[node name="Assaultmod" type="MeshInstance3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(-0.155908, 0.191531, -0.37018, -7.29442e-09, 0.395231, 0.204492, 0.416795, 0.0716447, -0.138472, 1.08392, 0.959456, -1.22038)
|
||||||
|
mesh = ExtResource("4_1jafm")
|
||||||
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
|
[node name="Snipermodel" type="MeshInstance3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(0.410348, 0.0352013, 0.0823131, 0.0231825, 0.331215, -0.257215, -0.0864702, 0.255847, 0.32166, -1.09654, 0.957512, 0.64087)
|
||||||
|
mesh = ExtResource("5_851y4")
|
||||||
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
|
[node name="Gattlemesh" type="MeshInstance3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(0.11298, -0.0560454, 0.277704, 2.63199e-09, 0.298972, 0.0603377, -0.283303, -0.0223507, 0.110748, 0.976316, 0.901463, 0.843925)
|
||||||
|
mesh = ExtResource("6_iftlf")
|
||||||
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
|
[node name="Tower2" parent="Base/Content" instance=ExtResource("7_pmyku")]
|
||||||
transform = Transform3D(0.563166, 0, -0.826344, 0, 1, 0, 0.826344, 0, 0.563166, 2.31578, 1.01612, -0.162108)
|
transform = Transform3D(0.563166, 0, -0.826344, 0, 1, 0, 0.826344, 0, 0.563166, 2.31578, 1.01612, -0.162108)
|
||||||
stats = ExtResource("8_1jafm")
|
stats = ExtResource("8_1jafm")
|
||||||
|
@ -20,41 +20,45 @@ radius = 3.0
|
|||||||
height = 1.0
|
height = 1.0
|
||||||
sides = 32
|
sides = 32
|
||||||
|
|
||||||
[node name="Sprite3D" type="Sprite3D" parent="Base"]
|
|
||||||
transform = Transform3D(3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 1.91885, 0)
|
|
||||||
modulate = Color(0.446777, 0.446777, 0.446777, 1)
|
|
||||||
billboard = 2
|
|
||||||
texture_filter = 0
|
|
||||||
texture = ExtResource("2_skplt")
|
|
||||||
|
|
||||||
[node name="Node3D" parent="Base" instance=ExtResource("3_m1210")]
|
[node name="Node3D" parent="Base" instance=ExtResource("3_m1210")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21433, 0.5, -1.47375)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21433, 0.5, -1.47375)
|
||||||
|
|
||||||
[node name="Assaultmod" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(-0.216168, 0.271014, 0.279012, 0.174778, 0.352842, -0.207317, -0.347489, 0.00887582, -0.277844, 1.62687, 1.06376, -1.0274)
|
|
||||||
mesh = ExtResource("4_5wuy8")
|
|
||||||
skeleton = NodePath("../../..")
|
|
||||||
|
|
||||||
[node name="Snipermodel" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(0.332265, 0.0519786, -0.251592, -8.9882e-09, 0.411314, 0.0849769, 0.256905, -0.0672257, 0.325393, 0.500198, 0.978789, 1.90895)
|
|
||||||
mesh = ExtResource("5_tnndn")
|
|
||||||
skeleton = NodePath("../../..")
|
|
||||||
|
|
||||||
[node name="Magetowermesh" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(0.432921, 0, 0.719847, 0, 0.84, 0, -0.719847, 0, 0.432921, -1.62727, 0.5, -0.00850296)
|
|
||||||
mesh = ExtResource("6_67jsi")
|
|
||||||
|
|
||||||
[node name="OmniLight3D" type="OmniLight3D" parent="Base/Magetowermesh"]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.38274, 0)
|
|
||||||
light_color = Color(0.697081, 0.170704, 0.131545, 1)
|
|
||||||
light_energy = 3.586
|
|
||||||
omni_range = 1.824
|
|
||||||
|
|
||||||
[node name="SpotLight3D2" type="SpotLight3D" parent="Base"]
|
[node name="SpotLight3D2" type="SpotLight3D" parent="Base"]
|
||||||
transform = Transform3D(-4.37114e-08, 1, 4.37114e-08, 0, -4.37114e-08, 1, 1, 4.37114e-08, 1.91069e-15, 0, 4, 0)
|
transform = Transform3D(-4.37114e-08, 1, 4.37114e-08, 0, -4.37114e-08, 1, 1, 4.37114e-08, 1.91069e-15, 0, 4, 0)
|
||||||
spot_range = 10.0
|
spot_range = 10.0
|
||||||
spot_attenuation = 0.39
|
spot_attenuation = 0.39
|
||||||
|
|
||||||
[node name="Tower" parent="Base" instance=ExtResource("7_3ilqd")]
|
[node name="Content" type="Node3D" parent="Base"]
|
||||||
|
visible = false
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 1.91885, 0)
|
||||||
|
modulate = Color(0.446777, 0.446777, 0.446777, 1)
|
||||||
|
billboard = 2
|
||||||
|
texture_filter = 0
|
||||||
|
texture = ExtResource("2_skplt")
|
||||||
|
|
||||||
|
[node name="Assaultmod" type="MeshInstance3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(-0.216168, 0.271014, 0.279012, 0.174778, 0.352842, -0.207317, -0.347489, 0.00887582, -0.277844, 1.62687, 1.06376, -1.0274)
|
||||||
|
mesh = ExtResource("4_5wuy8")
|
||||||
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
|
[node name="Snipermodel" type="MeshInstance3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(0.332265, 0.0519786, -0.251592, -8.9882e-09, 0.411314, 0.0849769, 0.256905, -0.0672257, 0.325393, 0.500198, 0.978789, 1.90895)
|
||||||
|
mesh = ExtResource("5_tnndn")
|
||||||
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
|
[node name="Magetowermesh" type="MeshInstance3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(0.432921, 0, 0.719847, 0, 0.84, 0, -0.719847, 0, 0.432921, -1.62727, 0.5, -0.0085029)
|
||||||
|
mesh = ExtResource("6_67jsi")
|
||||||
|
skeleton = NodePath("../..")
|
||||||
|
|
||||||
|
[node name="OmniLight3D" type="OmniLight3D" parent="Base/Content/Magetowermesh"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.38274, 0)
|
||||||
|
light_color = Color(0.697081, 0.170704, 0.131545, 1)
|
||||||
|
light_energy = 3.586
|
||||||
|
omni_range = 1.824
|
||||||
|
|
||||||
|
[node name="Tower" parent="Base/Content" instance=ExtResource("7_3ilqd")]
|
||||||
transform = Transform3D(-0.642788, 0, -0.766044, 0, 1, 0, 0.766044, 0, -0.642788, 0.228261, 1.16271, -1.45948)
|
transform = Transform3D(-0.642788, 0, -0.766044, 0, 1, 0, 0.766044, 0, -0.642788, 0.228261, 1.16271, -1.45948)
|
||||||
stats = ExtResource("8_2wywa")
|
stats = ExtResource("8_2wywa")
|
||||||
|
@ -18,34 +18,35 @@ radius = 3.0
|
|||||||
height = 1.0
|
height = 1.0
|
||||||
sides = 32
|
sides = 32
|
||||||
|
|
||||||
[node name="Sprite3D" type="Sprite3D" parent="Base"]
|
[node name="Node3D" parent="Base" instance=ExtResource("3_il1ej")]
|
||||||
transform = Transform3D(3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 1.91885, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.18309, 0.5, 0.742893)
|
||||||
|
|
||||||
|
[node name="Content" type="Node3D" parent="Base"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(3, 0, 5.96046e-08, 0, 3, 0, -5.96046e-08, 0, 3, 0, 1.91885, 0)
|
||||||
modulate = Color(0.517184, 0.517184, 0.517184, 1)
|
modulate = Color(0.517184, 0.517184, 0.517184, 1)
|
||||||
billboard = 2
|
billboard = 2
|
||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
texture = ExtResource("2_05uii")
|
texture = ExtResource("2_05uii")
|
||||||
|
|
||||||
[node name="Node3D" parent="Base" instance=ExtResource("3_il1ej")]
|
[node name="Assaultmod" type="MeshInstance3D" parent="Base/Content"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.18309, 0.5, 0.742893)
|
|
||||||
|
|
||||||
[node name="Assaultmod" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(0.256614, 0.167067, -0.322898, -7.90479e-16, 0.395231, 0.204492, 0.363558, -0.117923, 0.227914, -0.119748, 0.959456, -1.44893)
|
transform = Transform3D(0.256614, 0.167067, -0.322898, -7.90479e-16, 0.395231, 0.204492, 0.363558, -0.117923, 0.227914, -0.119748, 0.959456, -1.44893)
|
||||||
mesh = ExtResource("4_mrig3")
|
mesh = ExtResource("4_mrig3")
|
||||||
skeleton = NodePath("../../..")
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
[node name="Snipermodel" type="MeshInstance3D" parent="Base"]
|
[node name="Snipermodel" type="MeshInstance3D" parent="Base/Content"]
|
||||||
transform = Transform3D(0.15964, 0.231242, 0.312158, 0.0231825, 0.331215, -0.257215, -0.387786, 0.114996, 0.113129, 0.190324, 0.957512, 1.40108)
|
transform = Transform3D(0.15964, 0.231242, 0.312158, 0.0231825, 0.331215, -0.257215, -0.387786, 0.114996, 0.113129, 0.190324, 0.957512, 1.40108)
|
||||||
mesh = ExtResource("5_yj8b1")
|
mesh = ExtResource("5_yj8b1")
|
||||||
skeleton = NodePath("../../..")
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
[node name="Gattlemesh" type="MeshInstance3D" parent="Base"]
|
[node name="Gattlemesh" type="MeshInstance3D" parent="Base/Content"]
|
||||||
transform = Transform3D(-0.170479, -0.0500322, 0.247909, 0, 0.298972, 0.0603377, -0.252907, 0.0337256, -0.16711, 1.52548, 0.901463, -0.197461)
|
transform = Transform3D(-0.170479, -0.0500322, 0.247909, 0, 0.298972, 0.0603377, -0.252907, 0.0337256, -0.16711, 1.52548, 0.901463, -0.197461)
|
||||||
mesh = ExtResource("6_jr17d")
|
mesh = ExtResource("6_jr17d")
|
||||||
skeleton = NodePath("../../..")
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
[node name="SpotLight3D" type="SpotLight3D" parent="Base"]
|
[node name="SpotLight3D" type="SpotLight3D" parent="Base/Content"]
|
||||||
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, 4, 0)
|
transform = Transform3D(1, -2.98023e-08, -1.77636e-15, 0, -4.37114e-08, 1, -2.98023e-08, -1, -4.37114e-08, 0, 4, 0)
|
||||||
visible = false
|
|
||||||
spot_range = 10.0
|
spot_range = 10.0
|
||||||
spot_attenuation = 0.39
|
spot_attenuation = 0.39
|
||||||
|
@ -18,40 +18,41 @@ radius = 3.0
|
|||||||
height = 1.0
|
height = 1.0
|
||||||
sides = 32
|
sides = 32
|
||||||
|
|
||||||
[node name="Sprite3D" type="Sprite3D" parent="Base"]
|
[node name="Node3D" parent="Base" instance=ExtResource("3_brui3")]
|
||||||
transform = Transform3D(3, 0, 0, 0, 3, 0, 0, 0, 3, 0, 1.91885, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21433, 0.5, -1.47375)
|
||||||
|
|
||||||
|
[node name="Content" type="Node3D" parent="Base"]
|
||||||
visible = false
|
visible = false
|
||||||
|
|
||||||
|
[node name="Sprite3D" type="Sprite3D" parent="Base/Content"]
|
||||||
|
transform = Transform3D(3, 0, 2.38419e-07, 0, 3, 0, -2.38419e-07, 0, 3, 0, 1.91885, 0)
|
||||||
modulate = Color(0.446777, 0.446777, 0.446777, 1)
|
modulate = Color(0.446777, 0.446777, 0.446777, 1)
|
||||||
billboard = 2
|
billboard = 2
|
||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
texture = ExtResource("2_e7ajb")
|
texture = ExtResource("2_e7ajb")
|
||||||
|
|
||||||
[node name="Node3D" parent="Base" instance=ExtResource("3_brui3")]
|
[node name="Assaultmod" type="MeshInstance3D" parent="Base/Content"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.21433, 0.5, -1.47375)
|
|
||||||
|
|
||||||
[node name="Assaultmod" type="MeshInstance3D" parent="Base"]
|
|
||||||
transform = Transform3D(-0.216168, 0.271014, 0.279012, 0.174778, 0.352842, -0.207317, -0.347489, 0.00887582, -0.277844, 1.62687, 1.06376, -1.0274)
|
transform = Transform3D(-0.216168, 0.271014, 0.279012, 0.174778, 0.352842, -0.207317, -0.347489, 0.00887582, -0.277844, 1.62687, 1.06376, -1.0274)
|
||||||
mesh = ExtResource("4_6igfd")
|
mesh = ExtResource("4_6igfd")
|
||||||
skeleton = NodePath("../../..")
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
[node name="Snipermodel" type="MeshInstance3D" parent="Base"]
|
[node name="Snipermodel" type="MeshInstance3D" parent="Base/Content"]
|
||||||
transform = Transform3D(0.332265, 0.0519786, -0.251592, -8.9882e-09, 0.411314, 0.0849769, 0.256905, -0.0672257, 0.325393, 0.500198, 0.978789, 1.90895)
|
transform = Transform3D(0.332265, 0.0519786, -0.251592, -8.9882e-09, 0.411314, 0.0849769, 0.256905, -0.0672257, 0.325393, 0.500198, 0.978789, 1.90895)
|
||||||
mesh = ExtResource("5_2o81e")
|
mesh = ExtResource("5_2o81e")
|
||||||
skeleton = NodePath("../../..")
|
skeleton = NodePath("../../../..")
|
||||||
|
|
||||||
[node name="Magetowermesh" type="MeshInstance3D" parent="Base"]
|
[node name="Magetowermesh" type="MeshInstance3D" parent="Base/Content"]
|
||||||
transform = Transform3D(0.432921, 0, 0.719847, 0, 0.84, 0, -0.719847, 0, 0.432921, -1.62727, 0.5, -0.00850296)
|
transform = Transform3D(0.432921, 0, 0.719847, 0, 0.84, 0, -0.719847, 0, 0.432921, -1.62727, 0.5, -0.00850284)
|
||||||
mesh = ExtResource("6_qcqfx")
|
mesh = ExtResource("6_qcqfx")
|
||||||
|
skeleton = NodePath("../..")
|
||||||
|
|
||||||
[node name="OmniLight3D" type="OmniLight3D" parent="Base/Magetowermesh"]
|
[node name="OmniLight3D" type="OmniLight3D" parent="Base/Content/Magetowermesh"]
|
||||||
transform = Transform3D(1.19048, 0, 0, 0, 1.19048, 0, 0, 0, 1.19048, 0, 3.38274, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 3.38274, 0)
|
||||||
visible = false
|
|
||||||
light_color = Color(0.697081, 0.170704, 0.131545, 1)
|
light_color = Color(0.697081, 0.170704, 0.131545, 1)
|
||||||
light_energy = 3.586
|
light_energy = 3.586
|
||||||
omni_range = 1.824
|
omni_range = 1.824
|
||||||
|
|
||||||
[node name="SpotLight3D2" type="SpotLight3D" parent="Base"]
|
[node name="SpotLight3D2" type="SpotLight3D" parent="Base/Content"]
|
||||||
transform = Transform3D(-4.37114e-08, 1, 4.37114e-08, 0, -4.37114e-08, 1, 1, 4.37114e-08, 1.91069e-15, 0, 4, 0)
|
transform = Transform3D(-2.98023e-08, 1, 4.37114e-08, 0, -4.37114e-08, 1, 1, 2.98023e-08, 1.77636e-15, 0, 4, 0)
|
||||||
visible = false
|
|
||||||
spot_range = 10.0
|
spot_range = 10.0
|
||||||
spot_attenuation = 0.39
|
spot_attenuation = 0.39
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
class_name CardPrinter extends StaticBody3D
|
class_name CardPrinter extends StaticBody3D
|
||||||
|
|
||||||
@export var button_collider: CollisionShape3D
|
@export var button_collider: CollisionShape3D
|
||||||
@export var button_box: Node3D
|
|
||||||
|
|
||||||
#TODO: use faction enum
|
#TODO: use faction enum
|
||||||
var base_faction: int = 1
|
var base_faction: int = 1
|
||||||
@ -37,6 +36,7 @@ func generate_rarity() -> int:
|
|||||||
|
|
||||||
func randomize_cards(faction: Card.Faction) -> void:
|
func randomize_cards(faction: Card.Faction) -> void:
|
||||||
#TODO: no magic numbers, asshole! 3 = cards to spawn
|
#TODO: no magic numbers, asshole! 3 = cards to spawn
|
||||||
|
var pos_x: float = 0.0
|
||||||
for x: int in 3:
|
for x: int in 3:
|
||||||
var decided_rarity: int = generate_rarity()
|
var decided_rarity: int = generate_rarity()
|
||||||
var card_choices: Array[Card] = get_faction_cards(faction)
|
var card_choices: Array[Card] = get_faction_cards(faction)
|
||||||
@ -58,7 +58,10 @@ func randomize_cards(faction: Card.Faction) -> void:
|
|||||||
card_array.erase(card)
|
card_array.erase(card)
|
||||||
var item: CardItem = reply_player.hero_class.card_item.instantiate() as CardItem
|
var item: CardItem = reply_player.hero_class.card_item.instantiate() as CardItem
|
||||||
item.set_card(card)
|
item.set_card(card)
|
||||||
item.position = Vector3(x, 1, 2)
|
item.position = Vector3(pos_x, 2, 0)
|
||||||
|
pos_x *= -1
|
||||||
|
if pos_x >= 0:
|
||||||
|
pos_x += 1.25
|
||||||
item.pressed.connect(card_picked_up)
|
item.pressed.connect(card_picked_up)
|
||||||
spawned_cards.append(item)
|
spawned_cards.append(item)
|
||||||
add_child(item)
|
add_child(item)
|
||||||
@ -71,13 +74,11 @@ func card_picked_up(card_item: CardItem) -> void:
|
|||||||
spawned_card.queue_free()
|
spawned_card.queue_free()
|
||||||
spawned_cards = []
|
spawned_cards = []
|
||||||
button_collider.disabled = false
|
button_collider.disabled = false
|
||||||
button_box.position = Vector3(0,0,0)
|
|
||||||
$StaticBody3D/AudioStreamPlayer3D.play()
|
$StaticBody3D/AudioStreamPlayer3D.play()
|
||||||
|
|
||||||
|
|
||||||
func _on_static_body_3d_button_interacted(_value: int, reply: Hero) -> void:
|
func _on_static_body_3d_button_interacted(_value: int, reply: Hero) -> void:
|
||||||
reply_player = reply
|
reply_player = reply
|
||||||
button_collider.disabled = true
|
button_collider.disabled = true
|
||||||
button_box.position = Vector3(0,0,-0.2)
|
|
||||||
$StaticBody3D/AudioStreamPlayer3D.play()
|
$StaticBody3D/AudioStreamPlayer3D.play()
|
||||||
randomize_cards(reply.hero_class.faction)
|
randomize_cards(reply.hero_class.faction)
|
||||||
|
@ -2,34 +2,26 @@
|
|||||||
|
|
||||||
[ext_resource type="Script" uid="uid://bivtfdl3p1brv" path="res://Scenes/CardPrinter/card_printer.gd" id="1_qft15"]
|
[ext_resource type="Script" uid="uid://bivtfdl3p1brv" path="res://Scenes/CardPrinter/card_printer.gd" id="1_qft15"]
|
||||||
[ext_resource type="Script" uid="uid://dkfswql8ui0bt" path="res://Scripts/interact_button.gd" id="4_eavi1"]
|
[ext_resource type="Script" uid="uid://dkfswql8ui0bt" path="res://Scripts/interact_button.gd" id="4_eavi1"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://b6i5w3mowcfcs" path="res://drafting_table.glb" id="4_kpujb"]
|
||||||
[ext_resource type="AudioStream" uid="uid://dknygn5eyuhxt" path="res://Audio/shot1.wav" id="5_m033a"]
|
[ext_resource type="AudioStream" uid="uid://dknygn5eyuhxt" path="res://Audio/shot1.wav" id="5_m033a"]
|
||||||
|
|
||||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_s02au"]
|
|
||||||
albedo_color = Color(0.203922, 0.592157, 0.592157, 1)
|
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_0ebt5"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_0ebt5"]
|
||||||
size = Vector3(2, 2.1, 1)
|
size = Vector3(2.17, 1.55307, 1.12)
|
||||||
|
|
||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_ikdwj"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_ikdwj"]
|
||||||
size = Vector3(1.29447, 0.342125, 0.277604)
|
size = Vector3(2.20033, 0.260753, 1.27008)
|
||||||
|
|
||||||
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_73g2w"]
|
[sub_resource type="AudioStreamRandomizer" id="AudioStreamRandomizer_73g2w"]
|
||||||
random_pitch = 1.1
|
random_pitch = 1.1
|
||||||
streams_count = 1
|
streams_count = 1
|
||||||
stream_0/stream = ExtResource("5_m033a")
|
stream_0/stream = ExtResource("5_m033a")
|
||||||
|
|
||||||
[node name="CardPrinter" type="StaticBody3D" node_paths=PackedStringArray("button_collider", "button_box")]
|
[node name="CardPrinter" type="StaticBody3D" node_paths=PackedStringArray("button_collider")]
|
||||||
script = ExtResource("1_qft15")
|
script = ExtResource("1_qft15")
|
||||||
button_collider = NodePath("StaticBody3D/CollisionShape3D2")
|
button_collider = NodePath("StaticBody3D/CollisionShape3D2")
|
||||||
button_box = NodePath("StaticBody3D/CollisionShape3D2/CSGBox3D")
|
|
||||||
|
|
||||||
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.05, 0)
|
|
||||||
size = Vector3(2, 2.1, 1)
|
|
||||||
material = SubResource("StandardMaterial3D_s02au")
|
|
||||||
|
|
||||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.05, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.776539, 0.0332634)
|
||||||
shape = SubResource("BoxShape3D_0ebt5")
|
shape = SubResource("BoxShape3D_0ebt5")
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||||
@ -38,17 +30,18 @@ collision_layer = 16
|
|||||||
collision_mask = 0
|
collision_mask = 0
|
||||||
script = ExtResource("4_eavi1")
|
script = ExtResource("4_eavi1")
|
||||||
press_cost = 15
|
press_cost = 15
|
||||||
hover_text = "[center]#Interact# to spend $15 on random card"
|
hover_text = "[center]#Interact# draft a card for $15"
|
||||||
|
|
||||||
[node name="CollisionShape3D2" type="CollisionShape3D" parent="StaticBody3D"]
|
[node name="CollisionShape3D2" type="CollisionShape3D" parent="StaticBody3D"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 0.866025, -0.5, 0, 0.5, 0.866025, -6.55949e-05, 0.349496, -0.579584)
|
||||||
shape = SubResource("BoxShape3D_ikdwj")
|
shape = SubResource("BoxShape3D_ikdwj")
|
||||||
|
|
||||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D/CollisionShape3D2"]
|
|
||||||
size = Vector3(1.29447, 0.342125, 0.277604)
|
|
||||||
|
|
||||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="StaticBody3D"]
|
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="StaticBody3D"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.010989, -0.086501)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.578748, -0.587001)
|
||||||
stream = SubResource("AudioStreamRandomizer_73g2w")
|
stream = SubResource("AudioStreamRandomizer_73g2w")
|
||||||
bus = &"SFX"
|
bus = &"SFX"
|
||||||
|
|
||||||
|
[node name="drafting_table" parent="." instance=ExtResource("4_kpujb")]
|
||||||
|
transform = Transform3D(0.06, 0, 0, 0, 0.06, 0, 0, 0, 0.06, 0, 0.385809, 0)
|
||||||
|
|
||||||
[connection signal="button_interacted" from="StaticBody3D" to="." method="_on_static_body_3d_button_interacted"]
|
[connection signal="button_interacted" from="StaticBody3D" to="." method="_on_static_body_3d_button_interacted"]
|
||||||
|
@ -1,3 +1,7 @@
|
|||||||
class_name CharacterPodium extends Node3D
|
class_name CharacterPodium extends Node3D
|
||||||
|
|
||||||
@export var text: String = ""
|
@export var text: String = ""
|
||||||
|
|
||||||
|
|
||||||
|
func show_content() -> void:
|
||||||
|
$Base/Content.visible = true
|
||||||
|
@ -23,8 +23,9 @@ func _ready() -> void:
|
|||||||
pivot.add_child(podium)
|
pivot.add_child(podium)
|
||||||
pivot.rotate_y((TAU / heroes) * x)
|
pivot.rotate_y((TAU / heroes) * x)
|
||||||
x += 1
|
x += 1
|
||||||
#if Data.save_data.mage_unlocked:
|
podiums[0].show_content()
|
||||||
#podiums.visible = true
|
if Data.save_data.mage_unlocked:
|
||||||
|
podiums[1].show_content()
|
||||||
|
|
||||||
|
|
||||||
func reset_button() -> void:
|
func reset_button() -> void:
|
||||||
|
@ -21,11 +21,11 @@ func _ready() -> void:
|
|||||||
load_stats(Data.save_data)
|
load_stats(Data.save_data)
|
||||||
bg_level.a_star_graph_3d.make_grid()
|
bg_level.a_star_graph_3d.make_grid()
|
||||||
bg_level.a_star_graph_3d.find_path()
|
bg_level.a_star_graph_3d.find_path()
|
||||||
bg_level.a_star_graph_3d.build_random_maze(50)
|
bg_level.a_star_graph_3d.build_random_maze(70)
|
||||||
bg_level.a_star_graph_3d.place_random_towers(20)
|
bg_level.a_star_graph_3d.place_random_towers(30)
|
||||||
bg_level.a_star_graph_3d.disable_all_tower_frames()
|
bg_level.a_star_graph_3d.disable_all_tower_frames()
|
||||||
Game.level = bg_level
|
Game.level = bg_level
|
||||||
WaveManager.generate_wave(1000, bg_level.enemy_pool, bg_level.enemy_spawns)
|
WaveManager.generate_wave(WaveManager.calculate_spawn_power(50, 4), bg_level.enemy_pool, bg_level.enemy_spawns)
|
||||||
for spawn: EnemySpawner in bg_level.enemy_spawns:
|
for spawn: EnemySpawner in bg_level.enemy_spawns:
|
||||||
spawn.enemy_died_callback = enemy_died
|
spawn.enemy_died_callback = enemy_died
|
||||||
spawn.enemy_reached_goal_callback = damage_goal
|
spawn.enemy_reached_goal_callback = damage_goal
|
||||||
|
@ -23,19 +23,19 @@
|
|||||||
[sub_resource type="ViewportTexture" id="ViewportTexture_5u75i"]
|
[sub_resource type="ViewportTexture" id="ViewportTexture_5u75i"]
|
||||||
viewport_path = NodePath("SubViewport")
|
viewport_path = NodePath("SubViewport")
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_sv1gy"]
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6t4jd"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
atlas = ExtResource("8_1vnym")
|
atlas = ExtResource("8_1vnym")
|
||||||
region = Rect2(0, 0, 32, 32)
|
region = Rect2(0, 0, 32, 32)
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_6t4jd"]
|
[sub_resource type="Resource" id="Resource_y5bw6"]
|
||||||
resource_local_to_scene = true
|
resource_local_to_scene = true
|
||||||
script = ExtResource("5_u514r")
|
script = ExtResource("5_u514r")
|
||||||
title = "dog"
|
title = "dog"
|
||||||
target_type = 1
|
target_type = 1
|
||||||
icon = ExtResource("7_2sylv")
|
icon = ExtResource("7_2sylv")
|
||||||
death_sprite = ExtResource("6_rsxwm")
|
death_sprite = ExtResource("6_rsxwm")
|
||||||
sprite = SubResource("AtlasTexture_sv1gy")
|
sprite = SubResource("AtlasTexture_6t4jd")
|
||||||
spawn_power = 10
|
spawn_power = 10
|
||||||
health = 180
|
health = 180
|
||||||
penalty = 10
|
penalty = 10
|
||||||
@ -83,7 +83,7 @@ game_select_menu = NodePath("GameSelectMenu")
|
|||||||
main_controls = NodePath("MainControls")
|
main_controls = NodePath("MainControls")
|
||||||
seed_entry = NodePath("GameSelectMenu/VBoxContainer/HBoxContainer2/LineEdit")
|
seed_entry = NodePath("GameSelectMenu/VBoxContainer/HBoxContainer2/LineEdit")
|
||||||
profile_controls = NodePath("ProfileEditor")
|
profile_controls = NodePath("ProfileEditor")
|
||||||
mods_controls = NodePath("PanelContainer")
|
mods_controls = NodePath("ModsMenu")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="."]
|
[node name="TextureRect" type="TextureRect" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
@ -186,7 +186,7 @@ text = "View Profile"
|
|||||||
size = Vector2i(1920, 1080)
|
size = Vector2i(1920, 1080)
|
||||||
|
|
||||||
[node name="GridMap" parent="SubViewport" instance=ExtResource("3_l8r4a")]
|
[node name="GridMap" parent="SubViewport" instance=ExtResource("3_l8r4a")]
|
||||||
enemy_pool = Array[ExtResource("5_u514r")]([SubResource("Resource_6t4jd"), ExtResource("9_hdp0s"), ExtResource("10_day26"), ExtResource("11_1mes0"), ExtResource("12_5vny5"), ExtResource("13_xb7gj")])
|
enemy_pool = Array[ExtResource("5_u514r")]([SubResource("Resource_y5bw6"), ExtResource("9_hdp0s"), ExtResource("10_day26"), ExtResource("11_1mes0"), ExtResource("12_5vny5"), ExtResource("13_xb7gj")])
|
||||||
|
|
||||||
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
[node name="AudioStreamPlayer" type="AudioStreamPlayer" parent="."]
|
||||||
stream = SubResource("AudioStreamRandomizer_2jyua")
|
stream = SubResource("AudioStreamRandomizer_2jyua")
|
||||||
@ -559,7 +559,7 @@ icon = SubResource("AtlasTexture_3aj5m")
|
|||||||
icon_alignment = 1
|
icon_alignment = 1
|
||||||
expand_icon = true
|
expand_icon = true
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
[node name="ModsMenu" type="PanelContainer" parent="."]
|
||||||
visible = false
|
visible = false
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 8
|
anchors_preset = 8
|
||||||
@ -575,32 +575,32 @@ grow_horizontal = 2
|
|||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
script = ExtResource("19_6t4jd")
|
script = ExtResource("19_6t4jd")
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="ModsMenu"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer"]
|
[node name="Label" type="Label" parent="ModsMenu/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Mods"
|
text = "Mods"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 1
|
vertical_alignment = 1
|
||||||
|
|
||||||
[node name="ScrollContainer" type="ScrollContainer" parent="PanelContainer/VBoxContainer"]
|
[node name="ScrollContainer" type="ScrollContainer" parent="ModsMenu/VBoxContainer"]
|
||||||
custom_minimum_size = Vector2(800, 400)
|
custom_minimum_size = Vector2(800, 400)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/ScrollContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="ModsMenu/VBoxContainer/ScrollContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="ModsMenu/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 2
|
alignment = 2
|
||||||
|
|
||||||
[node name="CancelMods" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer"]
|
[node name="CancelMods" type="Button" parent="ModsMenu/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Confirm"
|
text = "Confirm"
|
||||||
|
|
||||||
[node name="ConfirmMods" type="Button" parent="PanelContainer/VBoxContainer/HBoxContainer"]
|
[node name="ConfirmMods" type="Button" parent="ModsMenu/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Confirm"
|
text = "Confirm"
|
||||||
|
|
||||||
@ -627,5 +627,5 @@ text = "Confirm"
|
|||||||
[connection signal="pressed" from="ProfileManager/VBoxContainer/Controls/Cancel" to="." method="_on_profile_manager_cancel_pressed"]
|
[connection signal="pressed" from="ProfileManager/VBoxContainer/Controls/Cancel" to="." method="_on_profile_manager_cancel_pressed"]
|
||||||
[connection signal="pressed" from="ProfileManager/VBoxContainer/Controls/Confirm" to="." method="_on_profile_manager_confirm_pressed"]
|
[connection signal="pressed" from="ProfileManager/VBoxContainer/Controls/Confirm" to="." method="_on_profile_manager_confirm_pressed"]
|
||||||
[connection signal="pressed" from="AchievementsMenu/VBoxContainer/HBoxContainer/Button" to="." method="_on_achievements_back_button_pressed"]
|
[connection signal="pressed" from="AchievementsMenu/VBoxContainer/HBoxContainer/Button" to="." method="_on_achievements_back_button_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer/CancelMods" to="." method="_on_cancel_mods_pressed"]
|
[connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/CancelMods" to="." method="_on_cancel_mods_pressed"]
|
||||||
[connection signal="pressed" from="PanelContainer/VBoxContainer/HBoxContainer/ConfirmMods" to="." method="_on_confirm_mods_pressed"]
|
[connection signal="pressed" from="ModsMenu/VBoxContainer/HBoxContainer/ConfirmMods" to="." method="_on_confirm_mods_pressed"]
|
||||||
|
@ -4,10 +4,16 @@ class_name AreaAffector extends Affector
|
|||||||
|
|
||||||
|
|
||||||
func apply_effect(effect: Effect, targets: Array[EnemyController]) -> void:
|
func apply_effect(effect: Effect, targets: Array[EnemyController]) -> void:
|
||||||
for i: int in shapecast.get_collision_count():
|
if shapecast:
|
||||||
var enemy: EnemyController = shapecast.get_collider(i) as EnemyController
|
for i: int in shapecast.get_collision_count():
|
||||||
#print(shapecast.get_collider(i))
|
var enemy: EnemyController = shapecast.get_collider(i) as EnemyController
|
||||||
if targets.has(enemy):
|
#print(shapecast.get_collider(i))
|
||||||
|
if targets.has(enemy):
|
||||||
|
enemy.apply_effect(effect)
|
||||||
|
if Data.preferences.display_tower_damage_indicators and effect.damage > 0:
|
||||||
|
spawn_damage_indicator(effect.damage, enemy.sprite.global_position)
|
||||||
|
else:
|
||||||
|
for enemy: EnemyController in targets:
|
||||||
enemy.apply_effect(effect)
|
enemy.apply_effect(effect)
|
||||||
if Data.preferences.display_tower_damage_indicators and effect.damage > 0:
|
if Data.preferences.display_tower_damage_indicators and effect.damage > 0:
|
||||||
spawn_damage_indicator(effect.damage, enemy.sprite.global_position)
|
spawn_damage_indicator(effect.damage, enemy.sprite.global_position)
|
||||||
|
48
Scripts/flow_node.gd
Normal file
48
Scripts/flow_node.gd
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
class_name FlowNode extends StaticBody3D
|
||||||
|
|
||||||
|
var connections: Array[FlowNode]
|
||||||
|
var visualisers: Array[CSGBox3D]
|
||||||
|
var traversable: bool = true
|
||||||
|
var best_path: FlowNode :
|
||||||
|
get():
|
||||||
|
return best_path
|
||||||
|
set(value):
|
||||||
|
set_connector_color(best_path, Color.DARK_GRAY)
|
||||||
|
best_path = value
|
||||||
|
set_connector_color(best_path, Color.DARK_GREEN)
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
for i: int in connections.size():
|
||||||
|
var distance: float = global_position.distance_to(connections[i].global_position)
|
||||||
|
visualisers[i].size = Vector3(0.3, 0.3, 1.0 * (distance / 2.0))
|
||||||
|
visualisers[i].position = to_local(connections[i].global_position) / 4.0
|
||||||
|
if distance >= 0.05:
|
||||||
|
visualisers[i].look_at(connections[i].global_position)
|
||||||
|
|
||||||
|
|
||||||
|
func set_color(new_color: Color) -> void:
|
||||||
|
$CSGSphere3D.material.albedo_color = new_color
|
||||||
|
|
||||||
|
|
||||||
|
func set_connector_color(node: FlowNode, new_color: Color) -> void:
|
||||||
|
var i: int = connections.find(node)
|
||||||
|
visualisers[i].material.albedo_color = new_color
|
||||||
|
|
||||||
|
|
||||||
|
func add_connection(node: FlowNode) -> void:
|
||||||
|
if !connections.has(node):
|
||||||
|
var visual: CSGBox3D = CSGBox3D.new()
|
||||||
|
visual.material = StandardMaterial3D.new()
|
||||||
|
visual.material.resource_local_to_scene = true
|
||||||
|
visual.material.albedo_color = Color.DARK_GRAY
|
||||||
|
add_child(visual)
|
||||||
|
connections.append(node)
|
||||||
|
visualisers.append(visual)
|
||||||
|
|
||||||
|
|
||||||
|
func remove_connection(node: FlowNode) -> void:
|
||||||
|
if connections.has(node):
|
||||||
|
var i: int = connections.find(node)
|
||||||
|
visualisers.pop_at(i).queue_free()
|
||||||
|
connections.remove_at(i)
|
1
Scripts/flow_node.gd.uid
Normal file
1
Scripts/flow_node.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://c86ygtor5tksd
|
@ -1,12 +1,12 @@
|
|||||||
class_name StatusEffector extends Node3D
|
class_name StatusEffector extends Node
|
||||||
|
|
||||||
@export var hbox: HBoxContainer
|
@export var sprite_container: Container ## Container that effect icons should be instantiated under
|
||||||
@export var enemy: EnemyController
|
|
||||||
|
|
||||||
|
var enemy: EnemyController ## Enemy Controller that this node should affect
|
||||||
var icon_scene: PackedScene = preload("res://Scenes/status_icon.tscn")
|
var icon_scene: PackedScene = preload("res://Scenes/status_icon.tscn")
|
||||||
var immune: Array[StatusEffect] = []
|
var immunities: Array[StatusEffect] = [] ## The set of status effects that this effector shouldn't apply
|
||||||
var effects: Dictionary = {}
|
var effects: Dictionary[StatusEffect, int] = {}
|
||||||
var icons: Dictionary = {}
|
var icons: Dictionary[StatusEffect, TextureRect] = {}
|
||||||
|
|
||||||
|
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
@ -20,7 +20,7 @@ func _process(delta: float) -> void:
|
|||||||
effects[effect] -= 1
|
effects[effect] -= 1
|
||||||
effect.on_removed(enemy, effects)
|
effect.on_removed(enemy, effects)
|
||||||
if effects[effect] == 0:
|
if effects[effect] == 0:
|
||||||
icons[effect].set_visible(false)
|
icons[effect].visible = false
|
||||||
if effect.time_since_proc >= effect.stats.proc_cd:
|
if effect.time_since_proc >= effect.stats.proc_cd:
|
||||||
effect.proc(enemy, effects[effect], effects)
|
effect.proc(enemy, effects[effect], effects)
|
||||||
effect.time_since_proc -= effect.stats.proc_cd
|
effect.time_since_proc -= effect.stats.proc_cd
|
||||||
@ -33,27 +33,25 @@ func force_proc(effect_to_proc: StatusEffect) -> void:
|
|||||||
|
|
||||||
|
|
||||||
func add_effect(new_effect: StatusEffect) -> void:
|
func add_effect(new_effect: StatusEffect) -> void:
|
||||||
for effect: StatusEffect in immune:
|
# Return early if this node immune to the new effect
|
||||||
|
for effect: StatusEffect in immunities:
|
||||||
if effect.stats == new_effect.stats:
|
if effect.stats == new_effect.stats:
|
||||||
return
|
return
|
||||||
|
|
||||||
var existing_effect: StatusEffect
|
var existing_effect: StatusEffect = null
|
||||||
for effect: StatusEffect in effects:
|
for effect: StatusEffect in effects:
|
||||||
if effect.stats == new_effect.stats:
|
if effect.stats == new_effect.stats:
|
||||||
existing_effect = effect
|
existing_effect = effect
|
||||||
if !existing_effect:
|
if !existing_effect:
|
||||||
existing_effect = new_effect
|
existing_effect = new_effect.duplicate()
|
||||||
effects[new_effect] = 0
|
effects[existing_effect] = 0
|
||||||
var icon: TextureRect = icon_scene.instantiate()
|
var icon: TextureRect = icon_scene.instantiate()
|
||||||
icon.texture = new_effect.stats.icon
|
icon.texture = existing_effect.stats.icon
|
||||||
icon.set_visible(false)
|
icons[existing_effect] = icon
|
||||||
icons[new_effect] = icon
|
sprite_container.add_child(icon)
|
||||||
hbox.add_child(icon)
|
|
||||||
|
|
||||||
if existing_effect.stats.max_stacks == 0 or effects[existing_effect] < existing_effect.stats.max_stacks:
|
if existing_effect.stats.max_stacks == 0 or effects[existing_effect] < existing_effect.stats.max_stacks:
|
||||||
existing_effect.on_attached(enemy, effects)
|
existing_effect.on_attached(enemy, effects)
|
||||||
icons[existing_effect].set_visible(true)
|
icons[existing_effect].visible = true
|
||||||
effects[existing_effect] += 1
|
effects[existing_effect] += 1
|
||||||
existing_effect.time_existed = 0.0
|
existing_effect.time_existed = 0.0
|
||||||
if existing_effect.stats.max_stacks != 0 and effects[existing_effect] > existing_effect.stats.max_stacks:
|
|
||||||
effects[existing_effect] = existing_effect.stats.max_stacks
|
|
||||||
|
@ -1,14 +1,29 @@
|
|||||||
extends Node
|
class_name WaveManager extends Object
|
||||||
|
## A collection of static functions related to enemy wave generation
|
||||||
|
##
|
||||||
|
## Contains the algorithm for generating a wave based on a given pool of enemies
|
||||||
|
## as well as the functions for determining how much powerful a given enemy wave
|
||||||
|
## should be based on the the number of players and what number wave it is.
|
||||||
|
##
|
||||||
|
## Also contains the function for determining how much money is earned after
|
||||||
|
## completing a wave
|
||||||
|
|
||||||
|
|
||||||
|
## Takes in wave number and number of players and returns a spawn power value
|
||||||
|
## intended for passing into the generate_wave method
|
||||||
static func calculate_spawn_power(wave_number: int, number_of_players: int) -> int:
|
static func calculate_spawn_power(wave_number: int, number_of_players: int) -> int:
|
||||||
return (20 * number_of_players) + (5 * wave_number)
|
return (20 * number_of_players) + (5 * wave_number)
|
||||||
|
|
||||||
|
|
||||||
|
## Takes in wave number and number of players and returns the amount of coins
|
||||||
|
## that should be divided between each player after completing the wave
|
||||||
static func calculate_pot(wave_number: int, number_of_players: int) -> int:
|
static func calculate_pot(wave_number: int, number_of_players: int) -> int:
|
||||||
return ceili((2.5 * number_of_players) + (0.5 * wave_number))
|
return ceili((2.5 * number_of_players) + (0.5 * wave_number))
|
||||||
|
|
||||||
|
|
||||||
|
## Uses a spawn power budget to "buy" cards of enemies at random selection from
|
||||||
|
## the given spawn pool, returns the resulting wave but also assigns the cards
|
||||||
|
## among the given set of enemy spawners
|
||||||
static func generate_wave(spawn_power: int, spawn_pool: Array[Enemy], spawners: Array[EnemySpawner]) -> Wave:
|
static func generate_wave(spawn_power: int, spawn_pool: Array[Enemy], spawners: Array[EnemySpawner]) -> Wave:
|
||||||
var wave: Wave = Wave.new()
|
var wave: Wave = Wave.new()
|
||||||
|
|
||||||
@ -18,7 +33,7 @@ static func generate_wave(spawn_power: int, spawn_pool: Array[Enemy], spawners:
|
|||||||
var new_card: EnemyCard = EnemyCard.new()
|
var new_card: EnemyCard = EnemyCard.new()
|
||||||
|
|
||||||
#First, choose an enemy at random
|
#First, choose an enemy at random
|
||||||
new_card.enemy = Data.enemies.pick_random()
|
new_card.enemy = spawn_pool.pick_random()
|
||||||
|
|
||||||
#Next, we have to figure out if we can actually buy that enemy
|
#Next, we have to figure out if we can actually buy that enemy
|
||||||
#and, if not, then we have to pick a different enemy, repeat until
|
#and, if not, then we have to pick a different enemy, repeat until
|
||||||
@ -45,11 +60,11 @@ static func generate_wave(spawn_power: int, spawn_pool: Array[Enemy], spawners:
|
|||||||
else:
|
else:
|
||||||
#Even the common rarity was too expensive, so we have to choose
|
#Even the common rarity was too expensive, so we have to choose
|
||||||
#a different enemy and try this process again
|
#a different enemy and try this process again
|
||||||
var enemy_id: int = Data.enemies.find(new_card.enemy)
|
var enemy_id: int = spawn_pool.find(new_card.enemy)
|
||||||
if enemy_id <= 0:
|
if enemy_id <= 0:
|
||||||
new_card.enemy = Data.enemies[Data.enemies.size() - 1]
|
new_card.enemy = spawn_pool[spawn_pool.size() - 1]
|
||||||
else:
|
else:
|
||||||
new_card.enemy = Data.enemies[enemy_id - 1]
|
new_card.enemy = spawn_pool[enemy_id - 1]
|
||||||
|
|
||||||
#Now that we know which rarities we could afford, lets just choose a
|
#Now that we know which rarities we could afford, lets just choose a
|
||||||
#random one
|
#random one
|
||||||
|
@ -18,7 +18,7 @@ damage = 0
|
|||||||
status_effects = Array[ExtResource("3_4h7vt")]([SubResource("Resource_f5usv")])
|
status_effects = Array[ExtResource("3_4h7vt")]([SubResource("Resource_f5usv")])
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_tyf6m"]
|
[sub_resource type="SphereShape3D" id="SphereShape3D_tyf6m"]
|
||||||
radius = 3.0
|
radius = 3.5
|
||||||
|
|
||||||
[node name="FlamethrowerTower" instance=ExtResource("1_m6l05")]
|
[node name="FlamethrowerTower" instance=ExtResource("1_m6l05")]
|
||||||
stats = ExtResource("4_by7c8")
|
stats = ExtResource("4_by7c8")
|
||||||
@ -29,10 +29,13 @@ transform = Transform3D(0.42, 0, 0, 0, 0.42, 0, 0, 0, 0.42, 0, 0.389397, 0)
|
|||||||
mesh = ExtResource("5_tc7nr")
|
mesh = ExtResource("5_tc7nr")
|
||||||
|
|
||||||
[node name="ShapeCast3D" type="ShapeCast3D" parent="Pitch" index="0"]
|
[node name="ShapeCast3D" type="ShapeCast3D" parent="Pitch" index="0"]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.896251, 0)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.896251, -0.56516)
|
||||||
shape = SubResource("SphereShape3D_tyf6m")
|
shape = SubResource("SphereShape3D_tyf6m")
|
||||||
target_position = Vector3(0, 0, -3)
|
target_position = Vector3(0, 0, -3)
|
||||||
collision_mask = 4
|
collision_mask = 4
|
||||||
|
|
||||||
|
[node name="CSGSphere3D" parent="." index="4"]
|
||||||
|
radius = 3.0
|
||||||
|
|
||||||
[node name="AreaAffector" parent="." index="6" node_paths=PackedStringArray("shapecast")]
|
[node name="AreaAffector" parent="." index="6" node_paths=PackedStringArray("shapecast")]
|
||||||
shapecast = NodePath("../Pitch/ShapeCast3D")
|
shapecast = NodePath("../Pitch/ShapeCast3D")
|
||||||
|
@ -21,5 +21,6 @@ value = 3.0
|
|||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_wptab")
|
script = ExtResource("2_wptab")
|
||||||
target_type = 1
|
target_type = 1
|
||||||
|
energy_type = 0
|
||||||
attributes = Array[ExtResource("1_ikp33")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
|
attributes = Array[ExtResource("1_ikp33")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
|
||||||
text = "Applies burning to enemies in front of it"
|
text = "Applies burning to enemies in front of it"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
[gd_scene load_steps=10 format=3 uid="uid://b7idyi1c67ou4"]
|
[gd_scene load_steps=10 format=3 uid="uid://b7idyi1c67ou4"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://kioik38usbqj" path="res://Scenes/Towers/area_tower.tscn" id="1_0qp3f"]
|
[ext_resource type="PackedScene" uid="uid://kioik38usbqj" path="res://Scenes/Towers/area_tower.tscn" id="1_0qp3f"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cssdyxk8oefsd" path="res://Towers/Reactor/tower_stats.tres" id="2_gthqr"]
|
||||||
[ext_resource type="Script" uid="uid://djp7tepdsda8w" path="res://Scripts/effect.gd" id="2_v1m7x"]
|
[ext_resource type="Script" uid="uid://djp7tepdsda8w" path="res://Scripts/effect.gd" id="2_v1m7x"]
|
||||||
[ext_resource type="Script" uid="uid://chy7bx8dlwgs0" path="res://Scripts/StatusEffects/status_effect.gd" id="3_amg2o"]
|
[ext_resource type="Script" uid="uid://chy7bx8dlwgs0" path="res://Scripts/StatusEffects/status_effect.gd" id="3_amg2o"]
|
||||||
[ext_resource type="Script" uid="uid://c6eghujlaqhwi" path="res://Scripts/StatusEffects/status_dot.gd" id="4_dcmuu"]
|
[ext_resource type="Script" uid="uid://c6eghujlaqhwi" path="res://Scripts/StatusEffects/status_dot.gd" id="4_dcmuu"]
|
||||||
@ -18,20 +19,13 @@ damage = 0
|
|||||||
status_effects = Array[ExtResource("3_amg2o")]([SubResource("Resource_ltmnh")])
|
status_effects = Array[ExtResource("3_amg2o")]([SubResource("Resource_ltmnh")])
|
||||||
metadata/_custom_type_script = "uid://djp7tepdsda8w"
|
metadata/_custom_type_script = "uid://djp7tepdsda8w"
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_v6dih"]
|
|
||||||
radius = 30.0
|
|
||||||
|
|
||||||
[node name="Tower" instance=ExtResource("1_0qp3f")]
|
[node name="Tower" instance=ExtResource("1_0qp3f")]
|
||||||
turns_to_aim = false
|
turns_to_aim = false
|
||||||
|
stats = ExtResource("2_gthqr")
|
||||||
effect = SubResource("Resource_joohe")
|
effect = SubResource("Resource_joohe")
|
||||||
|
|
||||||
[node name="ShapeCast3D" type="ShapeCast3D" parent="Pitch" index="0"]
|
|
||||||
shape = SubResource("SphereShape3D_v6dih")
|
|
||||||
target_position = Vector3(0, 0, 0)
|
|
||||||
collision_mask = 4
|
|
||||||
|
|
||||||
[node name="Yaw" parent="." index="2"]
|
[node name="Yaw" parent="." index="2"]
|
||||||
mesh = ExtResource("6_7kedu")
|
mesh = ExtResource("6_7kedu")
|
||||||
|
|
||||||
[node name="AreaAffector" parent="." index="6" node_paths=PackedStringArray("shapecast")]
|
[node name="CSGSphere3D" parent="." index="4"]
|
||||||
shapecast = NodePath("../Pitch/ShapeCast3D")
|
radius = 5.0
|
||||||
|
@ -21,5 +21,6 @@ value = 30.0
|
|||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_8w61k")
|
script = ExtResource("2_8w61k")
|
||||||
target_type = 3
|
target_type = 3
|
||||||
|
energy_type = 0
|
||||||
attributes = Array[ExtResource("1_peekg")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
|
attributes = Array[ExtResource("1_peekg")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
|
||||||
text = "Slowly applies Radioactive to enemies around itself at a range of /Range\\m"
|
text = "Slowly applies Radioactive to enemies around itself at a range of /Range\\m"
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
[gd_scene load_steps=10 format=3 uid="uid://dfgxf88kk2nhn"]
|
[gd_scene load_steps=10 format=3 uid="uid://dfgxf88kk2nhn"]
|
||||||
|
|
||||||
[ext_resource type="PackedScene" uid="uid://kioik38usbqj" path="res://Scenes/Towers/area_tower.tscn" id="1_3igso"]
|
[ext_resource type="PackedScene" uid="uid://kioik38usbqj" path="res://Scenes/Towers/area_tower.tscn" id="1_3igso"]
|
||||||
|
[ext_resource type="Resource" uid="uid://st0qrut5nxrm" path="res://Towers/Refrigerator/tower_stats.tres" id="2_4wo3i"]
|
||||||
[ext_resource type="Script" uid="uid://djp7tepdsda8w" path="res://Scripts/effect.gd" id="2_npue5"]
|
[ext_resource type="Script" uid="uid://djp7tepdsda8w" path="res://Scripts/effect.gd" id="2_npue5"]
|
||||||
[ext_resource type="Script" uid="uid://chy7bx8dlwgs0" path="res://Scripts/StatusEffects/status_effect.gd" id="3_frvi8"]
|
[ext_resource type="Script" uid="uid://chy7bx8dlwgs0" path="res://Scripts/StatusEffects/status_effect.gd" id="3_frvi8"]
|
||||||
[ext_resource type="Script" uid="uid://bh74uangqekuk" path="res://Scripts/StatusEffects/status_slow.gd" id="4_cirat"]
|
[ext_resource type="Script" uid="uid://bh74uangqekuk" path="res://Scripts/StatusEffects/status_slow.gd" id="4_cirat"]
|
||||||
@ -18,19 +19,13 @@ damage = 0
|
|||||||
status_effects = Array[ExtResource("3_frvi8")]([SubResource("Resource_d3abg")])
|
status_effects = Array[ExtResource("3_frvi8")]([SubResource("Resource_d3abg")])
|
||||||
metadata/_custom_type_script = "uid://djp7tepdsda8w"
|
metadata/_custom_type_script = "uid://djp7tepdsda8w"
|
||||||
|
|
||||||
[sub_resource type="SphereShape3D" id="SphereShape3D_jc2g4"]
|
|
||||||
radius = 3.0
|
|
||||||
|
|
||||||
[node name="Tower" instance=ExtResource("1_3igso")]
|
[node name="Tower" instance=ExtResource("1_3igso")]
|
||||||
turns_to_aim = false
|
turns_to_aim = false
|
||||||
|
stats = ExtResource("2_4wo3i")
|
||||||
effect = SubResource("Resource_yoqmb")
|
effect = SubResource("Resource_yoqmb")
|
||||||
|
|
||||||
[node name="ShapeCast3D" type="ShapeCast3D" parent="Pitch" index="0"]
|
|
||||||
shape = SubResource("SphereShape3D_jc2g4")
|
|
||||||
collision_mask = 4
|
|
||||||
|
|
||||||
[node name="Yaw" parent="." index="2"]
|
[node name="Yaw" parent="." index="2"]
|
||||||
mesh = ExtResource("6_bb4hb")
|
mesh = ExtResource("6_bb4hb")
|
||||||
|
|
||||||
[node name="AreaAffector" parent="." index="6" node_paths=PackedStringArray("shapecast")]
|
[node name="CSGSphere3D" parent="." index="4"]
|
||||||
shapecast = NodePath("../Pitch/ShapeCast3D")
|
radius = 3.0
|
||||||
|
@ -21,5 +21,6 @@ value = 3.0
|
|||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_w4q6a")
|
script = ExtResource("2_w4q6a")
|
||||||
target_type = 1
|
target_type = 1
|
||||||
|
energy_type = 0
|
||||||
attributes = Array[ExtResource("1_wa26m")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
|
attributes = Array[ExtResource("1_wa26m")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
|
||||||
text = "Applies Cold to enemies around itself"
|
text = "Applies Cold to enemies around itself"
|
||||||
|
@ -56,12 +56,6 @@ layers = 4
|
|||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
texture = ExtResource("9_7yfyh")
|
texture = ExtResource("9_7yfyh")
|
||||||
|
|
||||||
[node name="StatusEffector" type="Node3D" parent="." node_paths=PackedStringArray("hbox", "enemy")]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.521307, 0)
|
|
||||||
script = ExtResource("9_7hati")
|
|
||||||
hbox = NodePath("../SubViewport/HBoxContainer")
|
|
||||||
enemy = NodePath("..")
|
|
||||||
|
|
||||||
[node name="SubViewport" type="SubViewport" parent="."]
|
[node name="SubViewport" type="SubViewport" parent="."]
|
||||||
transparent_bg = true
|
transparent_bg = true
|
||||||
size = Vector2i(200, 55)
|
size = Vector2i(200, 55)
|
||||||
@ -83,6 +77,11 @@ offset_bottom = 236.0
|
|||||||
script = ExtResource("9_cx8mv")
|
script = ExtResource("9_cx8mv")
|
||||||
character = NodePath("..")
|
character = NodePath("..")
|
||||||
|
|
||||||
|
[node name="StatusEffector" type="Node" parent="." node_paths=PackedStringArray("sprite_container")]
|
||||||
|
script = ExtResource("9_7hati")
|
||||||
|
sprite_container = NodePath("../SubViewport/HBoxContainer")
|
||||||
|
metadata/_custom_type_script = "uid://cojjgevmbhwal"
|
||||||
|
|
||||||
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
||||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||||
|
@ -22,6 +22,7 @@ func _ready() -> void:
|
|||||||
$SubViewport/HealthBar.setup(stats.health)
|
$SubViewport/HealthBar.setup(stats.health)
|
||||||
sprite.texture = stats.sprite.duplicate()
|
sprite.texture = stats.sprite.duplicate()
|
||||||
movement_speed = stats.movement_speed
|
movement_speed = stats.movement_speed
|
||||||
|
status_manager.enemy = self
|
||||||
|
|
||||||
|
|
||||||
func apply_effect(effect: Effect) -> void:
|
func apply_effect(effect: Effect) -> void:
|
||||||
|
@ -62,12 +62,6 @@ layers = 4
|
|||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
texture = ExtResource("9_f8btv")
|
texture = ExtResource("9_f8btv")
|
||||||
|
|
||||||
[node name="StatusEffector" type="Node3D" parent="." node_paths=PackedStringArray("hbox", "enemy")]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.18114, 0)
|
|
||||||
script = ExtResource("10_txouh")
|
|
||||||
hbox = NodePath("../SubViewport/HBoxContainer")
|
|
||||||
enemy = NodePath("..")
|
|
||||||
|
|
||||||
[node name="SubViewport" type="SubViewport" parent="."]
|
[node name="SubViewport" type="SubViewport" parent="."]
|
||||||
transparent_bg = true
|
transparent_bg = true
|
||||||
size = Vector2i(200, 55)
|
size = Vector2i(200, 55)
|
||||||
@ -94,6 +88,11 @@ script = ExtResource("12_2nmk0")
|
|||||||
character = NodePath("..")
|
character = NodePath("..")
|
||||||
sprite = NodePath("../DirectionSprite")
|
sprite = NodePath("../DirectionSprite")
|
||||||
|
|
||||||
|
[node name="StatusEffector" type="Node" parent="." node_paths=PackedStringArray("sprite_container")]
|
||||||
|
script = ExtResource("10_txouh")
|
||||||
|
sprite_container = NodePath("../SubViewport/HBoxContainer")
|
||||||
|
metadata/_custom_type_script = "uid://cojjgevmbhwal"
|
||||||
|
|
||||||
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
||||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||||
|
@ -77,12 +77,6 @@ layers = 4
|
|||||||
texture_filter = 0
|
texture_filter = 0
|
||||||
texture = ExtResource("8_egpbw")
|
texture = ExtResource("8_egpbw")
|
||||||
|
|
||||||
[node name="StatusEffector" type="Node3D" parent="." node_paths=PackedStringArray("hbox", "enemy")]
|
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.18114, 0)
|
|
||||||
script = ExtResource("9_47ywr")
|
|
||||||
hbox = NodePath("../SubViewport/HBoxContainer")
|
|
||||||
enemy = NodePath("..")
|
|
||||||
|
|
||||||
[node name="SubViewport" type="SubViewport" parent="."]
|
[node name="SubViewport" type="SubViewport" parent="."]
|
||||||
transparent_bg = true
|
transparent_bg = true
|
||||||
size = Vector2i(200, 55)
|
size = Vector2i(200, 55)
|
||||||
@ -225,6 +219,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.141846, 0)
|
|||||||
visible = false
|
visible = false
|
||||||
size = Vector3(0.5, 0.783691, 0.5)
|
size = Vector3(0.5, 0.783691, 0.5)
|
||||||
|
|
||||||
|
[node name="StatusEffector" type="Node" parent="." node_paths=PackedStringArray("sprite_container")]
|
||||||
|
script = ExtResource("9_47ywr")
|
||||||
|
sprite_container = NodePath("../SubViewport/HBoxContainer")
|
||||||
|
metadata/_custom_type_script = "uid://cojjgevmbhwal"
|
||||||
|
|
||||||
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
||||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||||
|
File diff suppressed because one or more lines are too long
5
Worlds/TestingRange/Levels/training_arena.gd
Normal file
5
Worlds/TestingRange/Levels/training_arena.gd
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
extends Node3D
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
pass
|
1
Worlds/TestingRange/Levels/training_arena.gd.uid
Normal file
1
Worlds/TestingRange/Levels/training_arena.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://cjensbjuji22t
|
@ -1,12 +1,12 @@
|
|||||||
[gd_scene load_steps=16 format=3 uid="uid://uv7hjsgisy31"]
|
[gd_scene load_steps=12 format=3 uid="uid://uv7hjsgisy31"]
|
||||||
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dgwsvkmnesjjm" path="res://Assets/Textures/stone.png" id="1_45ikc"]
|
[ext_resource type="Texture2D" uid="uid://dgwsvkmnesjjm" path="res://Assets/Textures/stone.png" id="1_45ikc"]
|
||||||
|
[ext_resource type="Script" uid="uid://cjensbjuji22t" path="res://Worlds/TestingRange/Levels/training_arena.gd" id="1_dgqrn"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dxgxbtf68lcv5" path="res://PCs/hero.tscn" id="2_w387b"]
|
[ext_resource type="PackedScene" uid="uid://dxgxbtf68lcv5" path="res://PCs/hero.tscn" id="2_w387b"]
|
||||||
[ext_resource type="PackedScene" uid="uid://b0nady5xm88bo" path="res://Worlds/GreenPlanet/Enemies/land_enemy.tscn" id="3_y4upj"]
|
[ext_resource type="PackedScene" uid="uid://b0nady5xm88bo" path="res://Worlds/GreenPlanet/Enemies/land_enemy.tscn" id="3_y4upj"]
|
||||||
[ext_resource type="PackedScene" uid="uid://dsasunnk47n8o" path="res://Scenes/item_card.tscn" id="4_i7krx"]
|
[ext_resource type="PackedScene" uid="uid://dsasunnk47n8o" path="res://Scenes/item_card.tscn" id="4_i7krx"]
|
||||||
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="4_ucmnf"]
|
|
||||||
[ext_resource type="Texture2D" uid="uid://dj13g1w14mekw" path="res://Assets/Textures/eye_dog.png" id="5_15cd7"]
|
|
||||||
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://Cards/assault.tres" id="5_806m0"]
|
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://Cards/assault.tres" id="5_806m0"]
|
||||||
|
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Resources/Enemies/dog.tres" id="5_tv1bi"]
|
||||||
[ext_resource type="PackedScene" uid="uid://ddbbwx0yy16lh" path="res://Scenes/TowerBase/tower_base.tscn" id="9_imodf"]
|
[ext_resource type="PackedScene" uid="uid://ddbbwx0yy16lh" path="res://Scenes/TowerBase/tower_base.tscn" id="9_imodf"]
|
||||||
|
|
||||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_mqtlc"]
|
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_mqtlc"]
|
||||||
@ -19,41 +19,8 @@ texture_filter = 0
|
|||||||
[sub_resource type="BoxShape3D" id="BoxShape3D_3mcyj"]
|
[sub_resource type="BoxShape3D" id="BoxShape3D_3mcyj"]
|
||||||
size = Vector3(15, 1, 30)
|
size = Vector3(15, 1, 30)
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dpehd"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
atlas = ExtResource("5_15cd7")
|
|
||||||
region = Rect2(0, 0, 32, 32)
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_mmghc"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
script = ExtResource("4_ucmnf")
|
|
||||||
title = "dog"
|
|
||||||
target_type = 0
|
|
||||||
sprite = SubResource("AtlasTexture_dpehd")
|
|
||||||
spawn_power = 10
|
|
||||||
health = 100
|
|
||||||
penalty = 10
|
|
||||||
movement_speed = 1.0
|
|
||||||
spawn_cooldown = 1.0
|
|
||||||
|
|
||||||
[sub_resource type="AtlasTexture" id="AtlasTexture_u1euk"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
atlas = ExtResource("5_15cd7")
|
|
||||||
region = Rect2(0, 0, 32, 32)
|
|
||||||
|
|
||||||
[sub_resource type="Resource" id="Resource_1m7kn"]
|
|
||||||
resource_local_to_scene = true
|
|
||||||
script = ExtResource("4_ucmnf")
|
|
||||||
title = "dog"
|
|
||||||
target_type = 0
|
|
||||||
sprite = SubResource("AtlasTexture_u1euk")
|
|
||||||
spawn_power = 10
|
|
||||||
health = 100
|
|
||||||
penalty = 10
|
|
||||||
movement_speed = 1.0
|
|
||||||
spawn_cooldown = 1.0
|
|
||||||
|
|
||||||
[node name="Node3D" type="Node3D"]
|
[node name="Node3D" type="Node3D"]
|
||||||
|
script = ExtResource("1_dgqrn")
|
||||||
|
|
||||||
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
[node name="StaticBody3D" type="StaticBody3D" parent="."]
|
||||||
physics_material_override = SubResource("PhysicsMaterial_mqtlc")
|
physics_material_override = SubResource("PhysicsMaterial_mqtlc")
|
||||||
@ -74,11 +41,19 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.805513, 0.5, 2.30163)
|
|||||||
|
|
||||||
[node name="Enemy" parent="." instance=ExtResource("3_y4upj")]
|
[node name="Enemy" parent="." instance=ExtResource("3_y4upj")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.28337, 0.601179, -1.23188)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.28337, 0.601179, -1.23188)
|
||||||
stats = SubResource("Resource_mmghc")
|
stats = ExtResource("5_tv1bi")
|
||||||
|
|
||||||
[node name="Enemy2" parent="." instance=ExtResource("3_y4upj")]
|
[node name="Enemy2" parent="." instance=ExtResource("3_y4upj")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 2.26298, 0.601179, -3.22988)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.59318, 0.601179, -2.16648)
|
||||||
stats = SubResource("Resource_1m7kn")
|
stats = ExtResource("5_tv1bi")
|
||||||
|
|
||||||
|
[node name="Enemy3" parent="." instance=ExtResource("3_y4upj")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.38431, 0.601179, -2.44026)
|
||||||
|
stats = ExtResource("5_tv1bi")
|
||||||
|
|
||||||
|
[node name="Enemy4" parent="." instance=ExtResource("3_y4upj")]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.49476, 0.601179, -2.4969)
|
||||||
|
stats = ExtResource("5_tv1bi")
|
||||||
|
|
||||||
[node name="assaultcard" parent="." instance=ExtResource("4_i7krx")]
|
[node name="assaultcard" parent="." instance=ExtResource("4_i7krx")]
|
||||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.7802, 0.5, 3.16356)
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.7802, 0.5, 3.16356)
|
||||||
|
BIN
drafting_table.glb
Normal file
BIN
drafting_table.glb
Normal file
Binary file not shown.
37
drafting_table.glb.import
Normal file
37
drafting_table.glb.import
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="scene"
|
||||||
|
importer_version=1
|
||||||
|
type="PackedScene"
|
||||||
|
uid="uid://b6i5w3mowcfcs"
|
||||||
|
path="res://.godot/imported/drafting_table.glb-6807c68da9d7f556812db63743d38b57.scn"
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://drafting_table.glb"
|
||||||
|
dest_files=["res://.godot/imported/drafting_table.glb-6807c68da9d7f556812db63743d38b57.scn"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
nodes/root_type=""
|
||||||
|
nodes/root_name=""
|
||||||
|
nodes/apply_root_scale=true
|
||||||
|
nodes/root_scale=1.0
|
||||||
|
nodes/import_as_skeleton_bones=false
|
||||||
|
nodes/use_node_type_suffixes=true
|
||||||
|
meshes/ensure_tangents=true
|
||||||
|
meshes/generate_lods=true
|
||||||
|
meshes/create_shadow_meshes=true
|
||||||
|
meshes/light_baking=1
|
||||||
|
meshes/lightmap_texel_size=0.2
|
||||||
|
meshes/force_disable_compression=false
|
||||||
|
skins/use_named_skins=true
|
||||||
|
animation/import=true
|
||||||
|
animation/fps=30
|
||||||
|
animation/trimming=false
|
||||||
|
animation/remove_immutable_tracks=true
|
||||||
|
animation/import_rest_as_RESET=false
|
||||||
|
import_script/path=""
|
||||||
|
_subresources={}
|
||||||
|
gltf/naming_version=1
|
||||||
|
gltf/embedded_image_handling=1
|
BIN
drafting_table_plan_tex.png
Normal file
BIN
drafting_table_plan_tex.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 80 KiB |
38
drafting_table_plan_tex.png.import
Normal file
38
drafting_table_plan_tex.png.import
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://cx3u2fj5cniac"
|
||||||
|
path.s3tc="res://.godot/imported/drafting_table_plan_tex.png-1699462a730246cc6031e19c5449ed7d.s3tc.ctex"
|
||||||
|
metadata={
|
||||||
|
"imported_formats": ["s3tc_bptc"],
|
||||||
|
"vram_texture": true
|
||||||
|
}
|
||||||
|
generator_parameters={
|
||||||
|
"md5": "f6894ba0243c1df76fb5fa0fd58f104b"
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://drafting_table_plan_tex.png"
|
||||||
|
dest_files=["res://.godot/imported/drafting_table_plan_tex.png-1699462a730246cc6031e19c5449ed7d.s3tc.ctex"]
|
||||||
|
|
||||||
|
[params]
|
||||||
|
|
||||||
|
compress/mode=2
|
||||||
|
compress/high_quality=false
|
||||||
|
compress/lossy_quality=0.7
|
||||||
|
compress/hdr_compression=1
|
||||||
|
compress/normal_map=0
|
||||||
|
compress/channel_pack=0
|
||||||
|
mipmaps/generate=true
|
||||||
|
mipmaps/limit=-1
|
||||||
|
roughness/mode=0
|
||||||
|
roughness/src_normal=""
|
||||||
|
process/fix_alpha_border=true
|
||||||
|
process/premult_alpha=false
|
||||||
|
process/normal_map_invert_y=false
|
||||||
|
process/hdr_as_srgb=false
|
||||||
|
process/hdr_clamp_exposure=false
|
||||||
|
process/size_limit=0
|
||||||
|
detect_3d/compress_to=0
|
165
flow_field.gd
Normal file
165
flow_field.gd
Normal file
@ -0,0 +1,165 @@
|
|||||||
|
class_name FlowField extends Node3D
|
||||||
|
|
||||||
|
@export var flow_node_scene: PackedScene
|
||||||
|
var nodes: Array[FlowNode] = []
|
||||||
|
var hover: FlowNode = null
|
||||||
|
var selected: Array[FlowNode] = []
|
||||||
|
var vector_dirty: bool = false
|
||||||
|
var goals: Array[FlowNode] = []
|
||||||
|
var reached: Array[FlowNode] = []
|
||||||
|
var search_frontier: Array[FlowNode] = []
|
||||||
|
|
||||||
|
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
if $CameraFocus/Camera3D/RayCast3D.is_colliding() and !hover:
|
||||||
|
hover = $CameraFocus/Camera3D/RayCast3D.get_collider()
|
||||||
|
hover.set_color(Color.RED)
|
||||||
|
if hover and !$CameraFocus/Camera3D/RayCast3D.is_colliding():
|
||||||
|
hover.set_color(Color.WEB_GRAY)
|
||||||
|
hover = null
|
||||||
|
if selected.size() > 0:
|
||||||
|
for node: FlowNode in selected:
|
||||||
|
node.set_color(Color.GREEN)
|
||||||
|
if goals.size() > 0:
|
||||||
|
for node: FlowNode in goals:
|
||||||
|
node.set_color(Color.BLUE)
|
||||||
|
if selected.size() == 1 and vector_dirty:
|
||||||
|
$HBoxContainer.visible = true
|
||||||
|
$HBoxContainer/x.text = str(selected[0].global_position.x)
|
||||||
|
$HBoxContainer/y.text = str(selected[0].global_position.y)
|
||||||
|
$HBoxContainer/z.text = str(selected[0].global_position.z)
|
||||||
|
vector_dirty = false
|
||||||
|
elif selected.size() != 1:
|
||||||
|
$HBoxContainer.visible = false
|
||||||
|
|
||||||
|
var y: float = Input.get_axis("Move Forward", "Move Backward")
|
||||||
|
var x: float = Input.get_axis("Move Left", "Move Right")
|
||||||
|
$CameraFocus.position += Vector3(x, 0, y) * delta * 10
|
||||||
|
|
||||||
|
|
||||||
|
func _unhandled_input(event: InputEvent) -> void:
|
||||||
|
if event is InputEventMouseMotion:
|
||||||
|
var from: Vector3 = $CameraFocus/Camera3D.project_ray_origin(event.position)
|
||||||
|
var to: Vector3 = $CameraFocus/Camera3D.project_local_ray_normal(event.position)
|
||||||
|
$CameraFocus/Camera3D/RayCast3D.global_position = from
|
||||||
|
$CameraFocus/Camera3D/RayCast3D.target_position = to * 1000.0
|
||||||
|
if event is InputEventMouseButton and event.button_index == 1 and hover:
|
||||||
|
if !selected.has(hover):
|
||||||
|
selected.append(hover)
|
||||||
|
vector_dirty = true
|
||||||
|
if event is InputEventMouseButton and event.button_index == 2 and selected.size() > 0:
|
||||||
|
for node: FlowNode in selected:
|
||||||
|
node.set_color(Color.WEB_GRAY)
|
||||||
|
selected = []
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_pressed() -> void:
|
||||||
|
create_node()
|
||||||
|
|
||||||
|
|
||||||
|
func iterate_search() -> void:
|
||||||
|
var current: FlowNode = search_frontier.pop_front()
|
||||||
|
for node: FlowNode in current.connections:
|
||||||
|
if !reached.has(node):
|
||||||
|
reached.append(node)
|
||||||
|
if node.traversable:
|
||||||
|
search_frontier.append(node)
|
||||||
|
node.best_path = current
|
||||||
|
#current.set_connector_color(node, Color.DARK_GREEN)
|
||||||
|
|
||||||
|
|
||||||
|
func calculate() -> void:
|
||||||
|
#if search_frontier.size() > 0:
|
||||||
|
# iterate_search()
|
||||||
|
#else:
|
||||||
|
reached = []
|
||||||
|
search_frontier = []
|
||||||
|
for node: FlowNode in goals:
|
||||||
|
search_frontier.append(node)
|
||||||
|
reached.append(node)
|
||||||
|
while search_frontier.size() > 0:
|
||||||
|
iterate_search()
|
||||||
|
|
||||||
|
|
||||||
|
func _on_x_text_changed() -> void:
|
||||||
|
selected[0].global_position.x = float($HBoxContainer/x.text)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_y_text_changed() -> void:
|
||||||
|
selected[0].global_position.y = float($HBoxContainer/y.text)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_z_text_changed() -> void:
|
||||||
|
selected[0].global_position.z = float($HBoxContainer/z.text)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_3_pressed() -> void:
|
||||||
|
if selected.size() == 2:
|
||||||
|
if selected[0].connections.has(selected[1]):
|
||||||
|
disconnect_nodes(selected[0], selected[1])
|
||||||
|
else:
|
||||||
|
connect_nodes(selected[0], selected[1])
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_4_pressed() -> void:
|
||||||
|
for node: FlowNode in selected:
|
||||||
|
if goals.has(node):
|
||||||
|
goals.erase(node)
|
||||||
|
node.set_color(Color.GREEN)
|
||||||
|
else:
|
||||||
|
goals.append(node)
|
||||||
|
node.set_color(Color.BLUE)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_5_pressed() -> void:
|
||||||
|
if selected.size() == 1:
|
||||||
|
var node: FlowNode = create_node(selected[0].position)
|
||||||
|
node.add_connection(selected[0])
|
||||||
|
selected[0].add_connection(node)
|
||||||
|
selected[0].set_color(Color.WEB_GRAY)
|
||||||
|
selected[0] = node
|
||||||
|
|
||||||
|
|
||||||
|
func create_node(pos: Vector3 = Vector3.ZERO) -> FlowNode:
|
||||||
|
var node: FlowNode = flow_node_scene.instantiate()
|
||||||
|
node.position = pos
|
||||||
|
nodes.append(node)
|
||||||
|
add_child(node)
|
||||||
|
return node
|
||||||
|
|
||||||
|
|
||||||
|
func connect_nodes(node1: FlowNode, node2: FlowNode) -> void:
|
||||||
|
if node1 != node2:
|
||||||
|
node1.add_connection(node2)
|
||||||
|
node2.add_connection(node1)
|
||||||
|
|
||||||
|
|
||||||
|
func disconnect_nodes(node1: FlowNode, node2: FlowNode) -> void:
|
||||||
|
if node1 != node2:
|
||||||
|
node1.remove_connection(node2)
|
||||||
|
node2.remove_connection(node1)
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_2_pressed(x_size: int = 9, y_size: int = 9) -> void:
|
||||||
|
var grid: Array[Array] = []
|
||||||
|
for x: int in x_size:
|
||||||
|
var row: Array[FlowNode] = []
|
||||||
|
for y: int in y_size:
|
||||||
|
var start_pos: Vector3 = Vector3.ZERO - (Vector3(1.5 * x_size, 0, 1.5 * y_size) / 2.0)
|
||||||
|
row.append(create_node(start_pos + Vector3(1.5 * x, 0, 1.5 * y)))
|
||||||
|
grid.append(row)
|
||||||
|
for x: int in grid.size():
|
||||||
|
for y: int in grid[x].size():
|
||||||
|
if y > 0:
|
||||||
|
connect_nodes(grid[x][y], grid[x][y - 1])
|
||||||
|
if x > 0:
|
||||||
|
connect_nodes(grid[x][y], grid[x - 1][y])
|
||||||
|
if y < grid[x].size() - 1:
|
||||||
|
connect_nodes(grid[x][y], grid[x][y + 1])
|
||||||
|
if x < grid.size() - 1:
|
||||||
|
connect_nodes(grid[x][y], grid[x + 1][y])
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_6_pressed() -> void:
|
||||||
|
for node: FlowNode in selected:
|
||||||
|
node.traversable = !node.traversable
|
1
flow_field.gd.uid
Normal file
1
flow_field.gd.uid
Normal file
@ -0,0 +1 @@
|
|||||||
|
uid://r4nmfr8jfcjx
|
99
flow_field.tscn
Normal file
99
flow_field.tscn
Normal file
@ -0,0 +1,99 @@
|
|||||||
|
[gd_scene load_steps=6 format=3 uid="uid://b7dwsqfmdqr8"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://r4nmfr8jfcjx" path="res://flow_field.gd" id="1_l46ob"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://bssfvyxv5uo1f" path="res://flow_node.tscn" id="2_d6vkn"]
|
||||||
|
|
||||||
|
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_l46ob"]
|
||||||
|
sky_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
|
||||||
|
ground_horizon_color = Color(0.662243, 0.671743, 0.686743, 1)
|
||||||
|
|
||||||
|
[sub_resource type="Sky" id="Sky_d6vkn"]
|
||||||
|
sky_material = SubResource("ProceduralSkyMaterial_l46ob")
|
||||||
|
|
||||||
|
[sub_resource type="Environment" id="Environment_apokv"]
|
||||||
|
background_mode = 2
|
||||||
|
sky = SubResource("Sky_d6vkn")
|
||||||
|
tonemap_mode = 2
|
||||||
|
glow_enabled = true
|
||||||
|
|
||||||
|
[node name="FlowField" type="Node3D"]
|
||||||
|
script = ExtResource("1_l46ob")
|
||||||
|
flow_node_scene = ExtResource("2_d6vkn")
|
||||||
|
|
||||||
|
[node name="CameraFocus" type="Node3D" parent="."]
|
||||||
|
|
||||||
|
[node name="Camera3D" type="Camera3D" parent="CameraFocus"]
|
||||||
|
transform = Transform3D(1, 0, 0, 0, 0.34202, 0.939693, 0, -0.939693, 0.34202, 0, 8.50452, 3.40739)
|
||||||
|
|
||||||
|
[node name="RayCast3D" type="RayCast3D" parent="CameraFocus/Camera3D"]
|
||||||
|
|
||||||
|
[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
|
||||||
|
environment = SubResource("Environment_apokv")
|
||||||
|
|
||||||
|
[node name="DirectionalLight3D" type="DirectionalLight3D" parent="."]
|
||||||
|
transform = Transform3D(-0.866023, -0.433016, 0.250001, 0, 0.499998, 0.866027, -0.500003, 0.749999, -0.43301, 0, 0, 0)
|
||||||
|
shadow_enabled = true
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||||
|
offset_right = 40.0
|
||||||
|
offset_bottom = 40.0
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "generate"
|
||||||
|
|
||||||
|
[node name="Button2" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "generate grid"
|
||||||
|
|
||||||
|
[node name="CalculateButton" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "calculate"
|
||||||
|
|
||||||
|
[node name="Button3" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "connect"
|
||||||
|
|
||||||
|
[node name="Button4" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "mark goal"
|
||||||
|
|
||||||
|
[node name="Button5" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "extrude"
|
||||||
|
|
||||||
|
[node name="Button6" type="Button" parent="VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "toggle traversable"
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||||
|
visible = false
|
||||||
|
anchors_preset = 1
|
||||||
|
anchor_left = 1.0
|
||||||
|
anchor_right = 1.0
|
||||||
|
offset_left = -323.0
|
||||||
|
offset_bottom = 40.0
|
||||||
|
grow_horizontal = 0
|
||||||
|
|
||||||
|
[node name="x" type="TextEdit" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="y" type="TextEdit" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[node name="z" type="TextEdit" parent="HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
|
||||||
|
[connection signal="pressed" from="VBoxContainer/Button" to="." method="_on_button_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/Button2" to="." method="_on_button_2_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/CalculateButton" to="." method="calculate"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/Button3" to="." method="_on_button_3_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/Button4" to="." method="_on_button_4_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/Button5" to="." method="_on_button_5_pressed"]
|
||||||
|
[connection signal="pressed" from="VBoxContainer/Button6" to="." method="_on_button_6_pressed"]
|
||||||
|
[connection signal="text_changed" from="HBoxContainer/x" to="." method="_on_x_text_changed"]
|
||||||
|
[connection signal="text_changed" from="HBoxContainer/y" to="." method="_on_y_text_changed"]
|
||||||
|
[connection signal="text_changed" from="HBoxContainer/z" to="." method="_on_z_text_changed"]
|
18
flow_node.tscn
Normal file
18
flow_node.tscn
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
[gd_scene load_steps=4 format=3 uid="uid://bssfvyxv5uo1f"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://c86ygtor5tksd" path="res://Scripts/flow_node.gd" id="1_ng65h"]
|
||||||
|
|
||||||
|
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ng65h"]
|
||||||
|
resource_local_to_scene = true
|
||||||
|
|
||||||
|
[sub_resource type="SphereShape3D" id="SphereShape3D_bmgs5"]
|
||||||
|
|
||||||
|
[node name="FlowNode" type="StaticBody3D"]
|
||||||
|
script = ExtResource("1_ng65h")
|
||||||
|
metadata/_custom_type_script = "uid://c86ygtor5tksd"
|
||||||
|
|
||||||
|
[node name="CSGSphere3D" type="CSGSphere3D" parent="."]
|
||||||
|
material = SubResource("StandardMaterial3D_ng65h")
|
||||||
|
|
||||||
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||||
|
shape = SubResource("SphereShape3D_bmgs5")
|
@ -18,7 +18,6 @@ config/icon="res://Assets/Textures/icon.svg"
|
|||||||
[autoload]
|
[autoload]
|
||||||
|
|
||||||
Data="*res://Scripts/data.gd"
|
Data="*res://Scripts/data.gd"
|
||||||
WaveManager="*res://Scripts/wave_manager.gd"
|
|
||||||
Game="*res://Scripts/game.gd"
|
Game="*res://Scripts/game.gd"
|
||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user