multiplayer pretty much works now i think

This commit is contained in:
Lexi Quinn 2023-11-17 20:49:38 +11:00
parent 2d123bd731
commit 9cf6944ac8
87 changed files with 1476 additions and 1223 deletions

Binary file not shown.

View File

@ -0,0 +1,32 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dunbllusdlmcb"
path="res://.godot/imported/funbox.glb-41e82e7ba643b674dacd582affc5d422.scn"
[deps]
source_file="res://Assets/TextureAtlases/funbox.glb"
dest_files=["res://.godot/imported/funbox.glb-41e82e7ba643b674dacd582affc5d422.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={}
gltf/embedded_image_handling=1

View File

@ -6,12 +6,12 @@
[sub_resource type="Resource" id="Resource_bukji"] [sub_resource type="Resource" id="Resource_bukji"]
script = ExtResource("1_cwxf1") script = ExtResource("1_cwxf1")
key = "Fire Delay" key = "Fire Delay"
value = 1.0 value = 0.5
[sub_resource type="Resource" id="Resource_2e75s"] [sub_resource type="Resource" id="Resource_2e75s"]
script = ExtResource("1_cwxf1") script = ExtResource("1_cwxf1")
key = "Damage" key = "Damage"
value = 0.5 value = 1.0
[sub_resource type="Resource" id="Resource_1vpnf"] [sub_resource type="Resource" id="Resource_1vpnf"]
script = ExtResource("1_cwxf1") script = ExtResource("1_cwxf1")

View File

@ -14,7 +14,7 @@ region = Rect2(0, 0, 64, 64)
[resource] [resource]
script = ExtResource("1_nobd8") script = ExtResource("1_nobd8")
title = "Blowdart" title = "Blowdart"
rarity = 2 rarity = 1
faction = 0 faction = 0
sprite = SubResource("AtlasTexture_jl74p") sprite = SubResource("AtlasTexture_jl74p")
turret_scene = ExtResource("4_wvh75") turret_scene = ExtResource("4_wvh75")

View File

@ -7,6 +7,8 @@ var bounces := 0
func _ready() -> void: func _ready() -> void:
apply_central_impulse(direction * force) apply_central_impulse(direction * force)
if owner_id == 0:
max_bounces = 0
func _on_body_entered(_body: Node) -> void: func _on_body_entered(_body: Node) -> void:

View File

@ -1,11 +0,0 @@
[gd_resource type="Resource" script_class="Card" load_steps=3 format=3 uid="uid://0p0i7m5ciwtq"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_hj6hq"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_irvam"]
[resource]
script = ExtResource("1_hj6hq")
title = "Damage Enhancer"
rarity = 2
faction = 0
sprite = ExtResource("2_irvam")

View File

@ -1,19 +1,23 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://1xke2uy2vfuf"] [gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://dg4pjt47q8xpw"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_xmwih"] [ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_xmwih"]
[ext_resource type="Resource" uid="uid://5ywipj3632u8" path="res://Resources/TurretStats/flametower.tres" id="2_80w0f"] [ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="2_ocjdv"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="2_ukaax"] [ext_resource type="Resource" uid="uid://cdtjbxs21peqg" path="res://PCs/Universal/ClassCards/Flamethrower/tower_stats.tres" id="3_sjxkl"]
[ext_resource type="PackedScene" uid="uid://dvqk2lysu02gf" path="res://PCs/Universal/ClassCards/Flamethrower/tower_flamethrower.tscn" id="3_yfmjg"] [ext_resource type="PackedScene" uid="uid://dhv7m4lky7bd8" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.tscn" id="4_800j1"]
[ext_resource type="Resource" uid="uid://c4ihsd13o1esd" path="res://Resources/WeaponStats/flamethrower.tres" id="4_rdoaa"] [ext_resource type="PackedScene" uid="uid://dkoj1766ygo3f" path="res://PCs/Universal/ClassCards/Flamethrower/tower_flamethrower.tscn" id="4_rgkdc"]
[ext_resource type="PackedScene" uid="uid://cprppqfd2wf6s" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.tscn" id="5_6v5br"] [ext_resource type="Resource" uid="uid://yjknwdimtm8g" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_stats.tres" id="5_qi4e4"]
[sub_resource type="AtlasTexture" id="AtlasTexture_bcolm"]
atlas = ExtResource("2_ocjdv")
region = Rect2(0, 0, 64, 64)
[resource] [resource]
script = ExtResource("1_xmwih") script = ExtResource("1_xmwih")
title = "Flamethrower" title = "Flamethrower"
rarity = 2 rarity = 2
faction = 0 faction = 0
sprite = ExtResource("2_ukaax") sprite = SubResource("AtlasTexture_bcolm")
turret = ExtResource("3_yfmjg") turret_scene = ExtResource("4_rgkdc")
weapon = ExtResource("5_6v5br") weapon_scene = ExtResource("4_800j1")
weapon_stats = ExtResource("4_rdoaa") weapon_stats = ExtResource("5_qi4e4")
tower_stats = ExtResource("2_80w0f") tower_stats = ExtResource("3_sjxkl")

View File

@ -0,0 +1,19 @@
[gd_resource type="ParticleProcessMaterial" load_steps=3 format=3 uid="uid://gyeamtekshor"]
[sub_resource type="Gradient" id="Gradient_eiw3y"]
interpolation_color_space = 2
offsets = PackedFloat32Array(0, 0.178862, 0.455285, 1)
colors = PackedColorArray(0.94, 0.830333, 0, 1, 1, 0.222923, 0.00252032, 1, 0.517571, 0.0343237, 0.0001635, 1, 0.0352941, 0, 0, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_arw7j"]
gradient = SubResource("Gradient_eiw3y")
[resource]
direction = Vector3(0, 0, -1)
spread = 15.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 3.0
initial_velocity_max = 3.0
scale_min = 0.3
scale_max = 0.3
color_ramp = SubResource("GradientTexture1D_arw7j")

View File

@ -1,27 +1,8 @@
extends Tower extends ShapecastTower
class_name FlameyTower class_name FlamethrowerTower
@export var shapecast : ShapeCast3D
@export var particlesystem : GPUParticles3D
@export var status_stats : StatusStats
func _process(delta: float) -> void: func build_status_object() -> StatusEffect:
super._process(delta) var status = StatusDoT.new()
if targeted_enemy:
particlesystem.emitting = true
else:
particlesystem.emitting = false
func shoot():
for index in shapecast.get_collision_count():
var target = shapecast.get_collider(index) as CharacterBody3D
var status = StatusOnFire.new()
status.stats = status_stats status.stats = status_stats
target.status_manager.add_effect(status) return status
func aim():
model.look_at(targeted_enemy.global_position)
model.rotation.x = 0.0

View File

@ -1,83 +1,47 @@
[gd_scene load_steps=10 format=3 uid="uid://dvqk2lysu02gf"] [gd_scene load_steps=11 format=3 uid="uid://dkoj1766ygo3f"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Flamethrower/tower_flamethrower.gd" id="1_6dcsj"] [ext_resource type="PackedScene" uid="uid://8uxu72vjo0cv" path="res://Scenes/Towers/shapecast_tower.tscn" id="1_jagpf"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="2_yo2b7"] [ext_resource type="Script" path="res://PCs/Universal/ClassCards/Flamethrower/tower_flamethrower.gd" id="2_7vewc"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_aop2h"]
[ext_resource type="Resource" uid="uid://cdtjbxs21peqg" path="res://PCs/Universal/ClassCards/Flamethrower/tower_stats.tres" id="4_by7c8"]
[sub_resource type="Gradient" id="Gradient_kkqms"] [sub_resource type="BoxShape3D" id="BoxShape3D_r367g"]
offsets = PackedFloat32Array(0.00591716, 1) size = Vector3(2, 2, 3)
colors = PackedColorArray(0.898039, 0.447059, 0, 1, 1, 0, 0, 0.34902)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_4cwgw"] [sub_resource type="Gradient" id="Gradient_ay233"]
gradient = SubResource("Gradient_kkqms") offsets = PackedFloat32Array(0, 0.178862, 0.455285, 1)
colors = PackedColorArray(0.94, 0.830333, 0, 1, 1, 0.222923, 0.00252032, 1, 0.517571, 0.0343237, 0.0001635, 1, 0.0352941, 0, 0, 1)
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2nhns"] [sub_resource type="GradientTexture1D" id="GradientTexture1D_7rrxx"]
direction = Vector3(0, 1, 0) gradient = SubResource("Gradient_ay233")
spread = 20.0
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_r7587"]
direction = Vector3(0, 0, -1)
spread = 15.0
gravity = Vector3(0, 0, 0) gravity = Vector3(0, 0, 0)
initial_velocity_min = 5.0 initial_velocity_min = 3.0
initial_velocity_max = 5.0 initial_velocity_max = 3.0
damping_min = 4.464 color_ramp = SubResource("GradientTexture1D_7rrxx")
damping_max = 4.464
color_ramp = SubResource("GradientTexture1D_4cwgw")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ycjd1"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p8aw8"]
transparency = 1
vertex_color_use_as_albedo = true vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_q83y7"] [sub_resource type="BoxMesh" id="BoxMesh_h4c6o"]
material = SubResource("StandardMaterial3D_ycjd1") material = SubResource("StandardMaterial3D_p8aw8")
size = Vector3(0.3, 0.3, 0.3) size = Vector3(0.3, 0.3, 0.3)
[sub_resource type="BoxShape3D" id="BoxShape3D_vck5q"] [node name="ShapecastTower" instance=ExtResource("1_jagpf")]
size = Vector3(2.145, 3.125, 2.415) script = ExtResource("2_7vewc")
status_stats = ExtResource("3_aop2h")
stats = ExtResource("4_by7c8")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_imgrm"] [node name="ShapeCast3D" parent="Yaw" index="0"]
transparency = 1 shape = SubResource("BoxShape3D_r367g")
cull_mode = 2 target_position = Vector3(0, 0, -2)
shading_mode = 0
albedo_color = Color(0.686275, 0, 0, 0.278431)
[node name="Node3D" type="Node3D" node_paths=PackedStringArray("shapecast", "particlesystem", "model", "range_sphere", "minimap_range_sphere")]
script = ExtResource("1_6dcsj")
shapecast = NodePath("Model/Node3D/ShapeCast3D")
particlesystem = NodePath("Model/Node3D/GPUParticles3D")
status_stats = ExtResource("2_yo2b7")
model = NodePath("Model")
range_sphere = NodePath("Model/CSGSphere3D")
minimap_range_sphere = NodePath("Model/CSGSphere3D2")
[node name="Model" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.968366, 0)
size = Vector3(1, 1.25244, 1)
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.00567371, -0.780982, -0.514041)
size = Vector3(0.481654, 0.427749, 1.38438)
[node name="Node3D" type="Node3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, -4.37114e-08, 1, 0, -1, -4.37114e-08, 0, -0.807848, -1.2154)
[node name="GPUParticles3D" type="GPUParticles3D" parent="Model/Node3D"]
amount = 48
visibility_aabb = AABB(-2.2922, -3.14731, -1.92995, 4.5844, 6.29461, 3.85991)
process_material = SubResource("ParticleProcessMaterial_2nhns")
draw_pass_1 = SubResource("BoxMesh_q83y7")
[node name="ShapeCast3D" type="ShapeCast3D" parent="Model/Node3D"]
shape = SubResource("BoxShape3D_vck5q")
target_position = Vector3(0, 1.51, 0)
collision_mask = 4 collision_mask = 4
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"] [node name="GPUParticles3D" parent="Yaw/ShapeCast3D" index="0"]
visible = false transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.534666)
radius = 7.5 amount = 16
material = SubResource("StandardMaterial3D_imgrm") process_material = SubResource("ParticleProcessMaterial_r7587")
draw_pass_1 = SubResource("BoxMesh_h4c6o")
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
visible = false
layers = 4
radius = 7.5
material = SubResource("StandardMaterial3D_imgrm")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://cdtjbxs21peqg"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_jc00v"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_mmknc"]
[sub_resource type="Resource" id="Resource_j28f4"]
script = ExtResource("1_jc00v")
key = "Fire Delay"
value = 0.5
[sub_resource type="Resource" id="Resource_likes"]
script = ExtResource("1_jc00v")
key = "Damage"
value = 0.0
[sub_resource type="Resource" id="Resource_b65mk"]
script = ExtResource("1_jc00v")
key = "Range"
value = 3.0
[resource]
script = ExtResource("2_mmknc")
target_type = 1
attributes = Array[ExtResource("1_jc00v")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
text = "Hold to apply Burning to enemies in front of you"

View File

@ -1,30 +1,7 @@
extends Weapon extends ShapecastWeapon
class_name FlamethrowerWeapon
@export var shapecast : ShapeCast3D func build_status_object() -> StatusEffect:
@export var particlesystem : GPUParticles3D var status = StatusDoT.new()
@export var status_stats : StatusStats
func _ready() -> void:
cooldown = 1.0 / stats.fire_rate
func set_raycast_origin(_node):
pass
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
particlesystem.emitting = true
$AnimationPlayer.play("shoot")
for index in shapecast.get_collision_count():
var target = shapecast.get_collider(index) as CharacterBody3D
var status = StatusOnFire.new()
status.stats = status_stats status.stats = status_stats
target.status_manager.add_effect(status) return status
func release_trigger():
trigger_held = false
particlesystem.emitting = false

View File

@ -1,100 +1,23 @@
[gd_scene load_steps=14 format=3 uid="uid://cprppqfd2wf6s"] [gd_scene load_steps=8 format=3 uid="uid://dhv7m4lky7bd8"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_kpb2q"] [ext_resource type="PackedScene" uid="uid://dp4gfr5h0tbcd" path="res://Scenes/Weapons/shapecast_weapon.tscn" id="1_ovmdp"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.gd" id="2_18t5l"] [ext_resource type="Script" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.gd" id="2_227rf"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_2sa8l"] [ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_fqch8"]
[ext_resource type="Resource" uid="uid://c4ihsd13o1esd" path="res://Resources/WeaponStats/flamethrower.tres" id="4_ih15j"] [ext_resource type="Resource" uid="uid://yjknwdimtm8g" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_stats.tres" id="4_oafdt"]
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="5_wdw3e"]
[ext_resource type="Material" uid="uid://gyeamtekshor" path="res://PCs/Universal/ClassCards/Flamethrower/flame_particles.tres" id="6_idhp2"]
[sub_resource type="Animation" id="Animation_n8b32"] [sub_resource type="AtlasTexture" id="AtlasTexture_3hank"]
length = 0.001 atlas = ExtResource("5_wdw3e")
tracks/0/type = "value" region = Rect2(0, 0, 64, 64)
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="Animation" id="Animation_g0h8q"] [node name="FlamethrowerWeapon" instance=ExtResource("1_ovmdp")]
resource_name = "shoot" script = ExtResource("2_227rf")
length = 0.15 status_stats = ExtResource("3_fqch8")
tracks/0/type = "value" stats = ExtResource("4_oafdt")
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"] [node name="Sprite3D" parent="." index="0"]
_data = { texture = SubResource("AtlasTexture_3hank")
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[sub_resource type="BoxShape3D" id="BoxShape3D_q7gll"] [node name="GPUParticles3D" parent="ShapeCast3D" index="0"]
size = Vector3(3, 3, 4) process_material = ExtResource("6_idhp2")
[sub_resource type="Gradient" id="Gradient_nneoo"]
offsets = PackedFloat32Array(0.00591716, 1)
colors = PackedColorArray(0.898039, 0.447059, 0, 1, 1, 0, 0, 0.34902)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_gpquw"]
gradient = SubResource("Gradient_nneoo")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_cp5dw"]
direction = Vector3(0, 1, 0)
spread = 20.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 5.0
initial_velocity_max = 5.0
damping_min = 1.9
damping_max = 1.9
color_ramp = SubResource("GradientTexture1D_gpquw")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2yd7w"]
transparency = 1
vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_ggcx2"]
material = SubResource("StandardMaterial3D_2yd7w")
size = Vector3(0.3, 0.3, 0.3)
[node name="Weapon" type="Sprite3D" node_paths=PackedStringArray("shapecast", "particlesystem")]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_kpb2q")
script = ExtResource("2_18t5l")
shapecast = NodePath("ShapeCast3D")
particlesystem = NodePath("GPUParticles3D")
status_stats = ExtResource("3_2sa8l")
stats = ExtResource("4_ih15j")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="ShapeCast3D" type="ShapeCast3D" parent="."]
transform = Transform3D(0.975695, 0, 0.219131, 0, 1, 0, -0.219131, 0, 0.975695, 0, 0, 0)
shape = SubResource("BoxShape3D_q7gll")
target_position = Vector3(0, 0, -2)
collision_mask = 4
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(0.975695, -0.219131, -9.57852e-09, 0, -4.37114e-08, 1, -0.219131, -0.975695, -4.2649e-08, 0, 0, 0)
amount = 32
visibility_aabb = AABB(-2.2922, -3.14731, -1.92995, 4.5844, 6.29461, 3.85991)
process_material = SubResource("ParticleProcessMaterial_cp5dw")
draw_pass_1 = SubResource("BoxMesh_ggcx2")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://yjknwdimtm8g"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_7qcx8"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_g5aby"]
[sub_resource type="Resource" id="Resource_j28f4"]
script = ExtResource("1_g5aby")
key = "Fire Delay"
value = 0.4
[sub_resource type="Resource" id="Resource_likes"]
script = ExtResource("1_g5aby")
key = "Damage"
value = 1.0
[sub_resource type="Resource" id="Resource_b65mk"]
script = ExtResource("1_g5aby")
key = "Range"
value = 3.0
[resource]
script = ExtResource("1_7qcx8")
target_type = 0
attributes = Array[ExtResource("1_g5aby")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
text = "Hold to apply Burning to enemies in front of you"

View File

@ -1,11 +0,0 @@
[gd_resource type="Resource" script_class="Card" load_steps=3 format=3 uid="uid://qyhlpglghda3"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_goeex"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_a7b2p"]
[resource]
script = ExtResource("1_goeex")
title = "Gamma Laser"
rarity = 3
faction = 0
sprite = ExtResource("2_a7b2p")

View File

@ -1,11 +0,0 @@
[gd_resource type="Resource" script_class="Card" load_steps=3 format=3 uid="uid://biy2kw34h5t8n"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_oj1u6"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_eyg7w"]
[resource]
script = ExtResource("1_oj1u6")
title = "Lightning"
rarity = 4
faction = 0
sprite = ExtResource("2_eyg7w")

View File

@ -1,19 +1,23 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dra640am6ykri"] [gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://b3o112jw3loiu"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_7065k"] [ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_0ciid"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_8hvde"] [ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="2_as4jg"]
[ext_resource type="Resource" uid="uid://baa8sauri4218" path="res://Resources/TurretStats/reactor.tres" id="3_ikj6b"] [ext_resource type="Resource" uid="uid://cssdyxk8oefsd" path="res://PCs/Universal/ClassCards/Reactor/tower_stats.tres" id="3_7vuex"]
[ext_resource type="PackedScene" uid="uid://byglhh0etuy6" path="res://PCs/Universal/ClassCards/Reactor/tower_reactor.tscn" id="4_y3lkh"] [ext_resource type="PackedScene" uid="uid://yymj42pp6v1t" path="res://PCs/Universal/ClassCards/Reactor/weapon_reactor.tscn" id="3_de72q"]
[ext_resource type="PackedScene" uid="uid://cpe3b700kwj48" path="res://PCs/Universal/ClassCards/Reactor/weapon_reactor.tscn" id="5_atmmn"] [ext_resource type="PackedScene" uid="uid://dqrkn0vp2tmrh" path="res://PCs/Universal/ClassCards/Reactor/tower_reactor.tscn" id="4_1krig"]
[ext_resource type="Resource" uid="uid://b5eakeawu3gle" path="res://Resources/WeaponStats/reactor.tres" id="5_erecn"] [ext_resource type="Resource" uid="uid://ipfr7emuarbj" path="res://PCs/Universal/ClassCards/Reactor/weapon_stats.tres" id="4_wilo7"]
[sub_resource type="AtlasTexture" id="AtlasTexture_7aw4q"]
atlas = ExtResource("2_as4jg")
region = Rect2(0, 0, 64, 64)
[resource] [resource]
script = ExtResource("1_7065k") script = ExtResource("1_0ciid")
title = "Reactor" title = "Reactor"
rarity = 4 rarity = 4
faction = 0 faction = 0
sprite = ExtResource("2_8hvde") sprite = SubResource("AtlasTexture_7aw4q")
turret = ExtResource("4_y3lkh") turret_scene = ExtResource("4_1krig")
weapon = ExtResource("5_atmmn") weapon_scene = ExtResource("3_de72q")
weapon_stats = ExtResource("5_erecn") weapon_stats = ExtResource("4_wilo7")
tower_stats = ExtResource("3_ikj6b") tower_stats = ExtResource("3_7vuex")

View File

@ -0,0 +1,19 @@
[gd_resource type="ParticleProcessMaterial" load_steps=3 format=3 uid="uid://bjab6t4n0s5ac"]
[sub_resource type="Gradient" id="Gradient_eiw3y"]
interpolation_color_space = 2
offsets = PackedFloat32Array(0, 0.0894309, 1)
colors = PackedColorArray(0, 0.831373, 0, 1, 4.21144e-08, 0.320987, -4.81308e-08, 0.721201, 0, 0.254902, 0, 0)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_arw7j"]
gradient = SubResource("Gradient_eiw3y")
[resource]
direction = Vector3(0, 0, -1)
spread = 15.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 3.0
initial_velocity_max = 3.0
scale_min = 0.3
scale_max = 0.3
color_ramp = SubResource("GradientTexture1D_arw7j")

View File

@ -1,17 +0,0 @@
extends Tower
class_name ReactorTower
@export var status_stats : StatusStats
@export var particlesystem : GPUParticles3D
func aim():
pass
func shoot():
for enemy in get_tree().get_nodes_in_group("Enemies"):
if global_position.distance_to(enemy.global_position) <= stats.fire_range:
var status = StatusRadioactive.new()
status.stats = status_stats
enemy.status_manager.add_effect(status)

View File

@ -1,30 +0,0 @@
extends Weapon
@export var shapecast : ShapeCast3D
@export var particlesystem : GPUParticles3D
@export var status_stats : StatusStats
func _ready() -> void:
cooldown = 1.0 / stats.fire_rate
func set_raycast_origin(_node):
pass
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
particlesystem.emitting = true
$AnimationPlayer.play("shoot")
for index in shapecast.get_collision_count():
var target = shapecast.get_collider(index) as CharacterBody3D
var status = StatusRadioactive.new()
status.stats = status_stats
target.status_manager.add_effect(status)
func release_trigger():
trigger_held = false
particlesystem.emitting = false

View File

@ -0,0 +1,15 @@
extends RangeAffectingTower
class_name ReactorTower
@export var particles : GPUParticles3D
func _ready() -> void:
super._ready()
particles.process_material.emission_ring_radius = target_range
func build_status_object() -> StatusEffect:
var status = StatusDoT.new()
status.stats = status_stats
return status

View File

@ -1,72 +1,43 @@
[gd_scene load_steps=10 format=3 uid="uid://byglhh0etuy6"] [gd_scene load_steps=10 format=3 uid="uid://dqrkn0vp2tmrh"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Reactor/reactortower.gd" id="1_rb733"] [ext_resource type="PackedScene" uid="uid://bi6b2r6wek7he" path="res://Scenes/Towers/range_affecting_tower.tscn" id="1_afsqn"]
[ext_resource type="Resource" uid="uid://dxlisoas4xlmo" path="res://Resources/StatusEffects/radioactive.tres" id="2_vyodb"] [ext_resource type="Script" path="res://PCs/Universal/ClassCards/Reactor/tower_reactor.gd" id="2_6w83m"]
[ext_resource type="Resource" uid="uid://baa8sauri4218" path="res://Resources/TurretStats/reactor.tres" id="3_a6b2i"] [ext_resource type="Resource" uid="uid://dxlisoas4xlmo" path="res://Resources/StatusEffects/radioactive.tres" id="3_xhrj0"]
[ext_resource type="Resource" uid="uid://cssdyxk8oefsd" path="res://PCs/Universal/ClassCards/Reactor/tower_stats.tres" id="4_rkhup"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_imgrm"] [sub_resource type="Gradient" id="Gradient_ranod"]
transparency = 1 interpolation_color_space = 2
cull_mode = 2 offsets = PackedFloat32Array(0.252033, 1)
shading_mode = 0 colors = PackedColorArray(0, 0.533333, 0, 1, 0, 1, 0, 0.34902)
albedo_color = Color(0.686275, 0, 0, 0.278431)
[sub_resource type="Gradient" id="Gradient_kkqms"] [sub_resource type="GradientTexture1D" id="GradientTexture1D_iinp2"]
colors = PackedColorArray(0.376471, 0.976471, 0, 0.435294, 0.127613, 0.391512, 0, 0.870588) gradient = SubResource("Gradient_ranod")
[sub_resource type="GradientTexture1D" id="GradientTexture1D_4cwgw"] [sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_q1hpa"]
gradient = SubResource("Gradient_kkqms")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2nhns"]
emission_shape = 6 emission_shape = 6
emission_ring_axis = Vector3(0, 1, 0) emission_ring_axis = Vector3(0, 1, 0)
emission_ring_height = 0.5 emission_ring_height = 0.1
emission_ring_radius = 20.0 emission_ring_radius = 30.0
emission_ring_inner_radius = 0.0 emission_ring_inner_radius = 0.0
gravity = Vector3(0, 1, 0) gravity = Vector3(0, 3, 0)
color_ramp = SubResource("GradientTexture1D_4cwgw") color_ramp = SubResource("GradientTexture1D_iinp2")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ycjd1"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_rl0f7"]
transparency = 1 transparency = 1
vertex_color_use_as_albedo = true vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_q83y7"] [sub_resource type="BoxMesh" id="BoxMesh_fr4f1"]
material = SubResource("StandardMaterial3D_ycjd1") material = SubResource("StandardMaterial3D_rl0f7")
size = Vector3(0.3, 0.3, 0.3) size = Vector3(0.3, 0.3, 0.3)
[node name="Node3D" type="Node3D" node_paths=PackedStringArray("particlesystem", "model", "range_sphere", "minimap_range_sphere")] [node name="ReactorTower" node_paths=PackedStringArray("particles") instance=ExtResource("1_afsqn")]
script = ExtResource("1_rb733") script = ExtResource("2_6w83m")
status_stats = ExtResource("2_vyodb") particles = NodePath("GPUParticles3D")
particlesystem = NodePath("Model/GPUParticles3D") status_stats = ExtResource("3_xhrj0")
stats = ExtResource("3_a6b2i") stats = ExtResource("4_rkhup")
model = NodePath("Model")
range_sphere = NodePath("Model/CSGSphere3D")
minimap_range_sphere = NodePath("Model/CSGSphere3D2")
[node name="Model" type="Node3D" parent="."] [node name="GPUParticles3D" type="GPUParticles3D" parent="." index="5"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.968366, 0)
size = Vector3(1, 1.25244, 1)
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.426601, 0)
size = Vector3(0.661144, 1.25244, 0.721315)
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
visible = false
radius = 7.5
material = SubResource("StandardMaterial3D_imgrm")
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
visible = false
layers = 4
radius = 7.5
material = SubResource("StandardMaterial3D_imgrm")
[node name="GPUParticles3D" type="GPUParticles3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0)
amount = 12 amount = 12
visibility_aabb = AABB(-110.773, -4, -105.31, 221.547, 8, 210.62) lifetime = 0.6
process_material = SubResource("ParticleProcessMaterial_2nhns") process_material = SubResource("ParticleProcessMaterial_q1hpa")
draw_pass_1 = SubResource("BoxMesh_q83y7") draw_pass_1 = SubResource("BoxMesh_fr4f1")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://cssdyxk8oefsd"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_ppnfm"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_5jdx5"]
[sub_resource type="Resource" id="Resource_j28f4"]
script = ExtResource("1_ppnfm")
key = "Fire Delay"
value = 2.0
[sub_resource type="Resource" id="Resource_likes"]
script = ExtResource("1_ppnfm")
key = "Damage"
value = 0.0
[sub_resource type="Resource" id="Resource_b65mk"]
script = ExtResource("1_ppnfm")
key = "Range"
value = 30.0
[resource]
script = ExtResource("2_5jdx5")
target_type = 1
attributes = Array[ExtResource("1_ppnfm")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
text = "Slowly applies Radioactive to enemies around itself at a range of /Range\\m"

View File

@ -0,0 +1,7 @@
extends ShapecastWeapon
class_name ReactorWeapon
func build_status_object() -> StatusEffect:
var status = StatusDoT.new()
status.stats = status_stats
return status

View File

@ -1,99 +1,31 @@
[gd_scene load_steps=14 format=3 uid="uid://cpe3b700kwj48"] [gd_scene load_steps=10 format=3 uid="uid://yymj42pp6v1t"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_lmai4"] [ext_resource type="PackedScene" uid="uid://dp4gfr5h0tbcd" path="res://Scenes/Weapons/shapecast_weapon.tscn" id="1_du35a"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Reactor/reactorweapon.gd" id="2_mpd2q"] [ext_resource type="Script" path="res://PCs/Universal/ClassCards/Reactor/weapon_reactor.gd" id="2_oe7hd"]
[ext_resource type="Resource" uid="uid://dxlisoas4xlmo" path="res://Resources/StatusEffects/radioactive.tres" id="3_x464r"] [ext_resource type="Resource" uid="uid://dxlisoas4xlmo" path="res://Resources/StatusEffects/radioactive.tres" id="3_hsfwd"]
[ext_resource type="Resource" uid="uid://b5eakeawu3gle" path="res://Resources/WeaponStats/reactor.tres" id="4_lclha"] [ext_resource type="Resource" uid="uid://ipfr7emuarbj" path="res://PCs/Universal/ClassCards/Reactor/weapon_stats.tres" id="4_83mkk"]
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="5_bawfy"]
[ext_resource type="Material" uid="uid://bjab6t4n0s5ac" path="res://PCs/Universal/ClassCards/Reactor/radiation_particles.tres" id="6_0sgt1"]
[sub_resource type="Animation" id="Animation_n8b32"] [sub_resource type="AtlasTexture" id="AtlasTexture_0dpt5"]
length = 0.001 atlas = ExtResource("5_bawfy")
tracks/0/type = "value" region = Rect2(0, 0, 64, 64)
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="Animation" id="Animation_g0h8q"] [sub_resource type="StandardMaterial3D" id="StandardMaterial3D_l4nsh"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[sub_resource type="BoxShape3D" id="BoxShape3D_q7gll"]
size = Vector3(3, 3, 4)
[sub_resource type="Gradient" id="Gradient_kkqms"]
colors = PackedColorArray(0.376471, 0.976471, 0, 0.435294, 0.127613, 0.391512, 0, 0.870588)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_gpquw"]
gradient = SubResource("Gradient_kkqms")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_cp5dw"]
direction = Vector3(0, 1, 0)
spread = 20.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 5.0
initial_velocity_max = 5.0
damping_min = 1.9
damping_max = 1.9
color_ramp = SubResource("GradientTexture1D_gpquw")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2yd7w"]
transparency = 1 transparency = 1
vertex_color_use_as_albedo = true vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_ggcx2"] [sub_resource type="BoxMesh" id="BoxMesh_5o1ws"]
material = SubResource("StandardMaterial3D_2yd7w") material = SubResource("StandardMaterial3D_l4nsh")
size = Vector3(0.3, 0.3, 0.3)
[node name="Weapon" type="Sprite3D" node_paths=PackedStringArray("shapecast", "particlesystem")] [node name="ReactorWeapon" instance=ExtResource("1_du35a")]
layers = 2 script = ExtResource("2_oe7hd")
billboard = 1 status_stats = ExtResource("3_hsfwd")
texture_filter = 0 stats = ExtResource("4_83mkk")
texture = ExtResource("1_lmai4")
script = ExtResource("2_mpd2q")
shapecast = NodePath("ShapeCast3D")
particlesystem = NodePath("GPUParticles3D")
status_stats = ExtResource("3_x464r")
stats = ExtResource("4_lclha")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."] [node name="Sprite3D" parent="." index="0"]
libraries = { texture = SubResource("AtlasTexture_0dpt5")
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="ShapeCast3D" type="ShapeCast3D" parent="."] [node name="GPUParticles3D" parent="ShapeCast3D" index="0"]
transform = Transform3D(0.975695, 0, 0.219131, 0, 1, 0, -0.219131, 0, 0.975695, 0, 0, 0) process_material = ExtResource("6_0sgt1")
shape = SubResource("BoxShape3D_q7gll") draw_pass_1 = SubResource("BoxMesh_5o1ws")
target_position = Vector3(0, 0, -2)
collision_mask = 4
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(0.975695, -0.219131, -9.57852e-09, 0, -4.37114e-08, 1, -0.219131, -0.975695, -4.2649e-08, 0, 0, 0)
amount = 32
visibility_aabb = AABB(-2.2922, -3.14731, -1.92995, 4.5844, 6.29461, 3.85991)
process_material = SubResource("ParticleProcessMaterial_cp5dw")
draw_pass_1 = SubResource("BoxMesh_ggcx2")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://ipfr7emuarbj"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_biwk3"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_62mnm"]
[sub_resource type="Resource" id="Resource_j28f4"]
script = ExtResource("1_biwk3")
key = "Fire Delay"
value = 0.5
[sub_resource type="Resource" id="Resource_likes"]
script = ExtResource("1_biwk3")
key = "Damage"
value = 1.0
[sub_resource type="Resource" id="Resource_b65mk"]
script = ExtResource("1_biwk3")
key = "Range"
value = 3.0
[resource]
script = ExtResource("2_62mnm")
target_type = 0
attributes = Array[ExtResource("1_biwk3")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
text = "Hold to apply Radioactive to enemies in front of you"

View File

@ -1,19 +0,0 @@
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dmd5730tvyp6a"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_yreyk"]
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://PCs/Universal/ClassCards/Assault/g_assault.tres" id="2_fgsd3"]
[ext_resource type="Resource" uid="uid://ugpxwdjfvssu" path="res://Resources/TurretStats/refridgerator.tres" id="3_b48s2"]
[ext_resource type="PackedScene" uid="uid://bxjyrqs8bvi41" path="res://PCs/Universal/ClassCards/Refridgerator/tower_refridgerator.tscn" id="4_t5vm7"]
[ext_resource type="PackedScene" uid="uid://b1457hrmd4xm7" path="res://PCs/Universal/ClassCards/Refridgerator/weapon_refridgerator.tscn" id="5_axlkp"]
[ext_resource type="Resource" uid="uid://cpyrdja71sboe" path="res://Resources/WeaponStats/refridgerator.tres" id="5_xe410"]
[resource]
script = ExtResource("1_yreyk")
title = "Refridgerator"
rarity = 1
faction = 0
sprite = ExtResource("2_fgsd3")
turret = ExtResource("4_t5vm7")
weapon = ExtResource("5_axlkp")
weapon_stats = ExtResource("5_xe410")
tower_stats = ExtResource("3_b48s2")

View File

@ -1,17 +0,0 @@
extends Tower
class_name RefridgeratorTower
@export var status_stats : StatusStats
@export var particlesystem : GPUParticles3D
func aim():
pass
func shoot():
for enemy in get_tree().get_nodes_in_group("Enemies"):
if global_position.distance_to(enemy.global_position) <= stats.fire_range:
var status = StatusCold.new()
status.stats = status_stats
enemy.status_manager.add_effect(status)

View File

@ -1,30 +0,0 @@
extends Weapon
@export var shapecast : ShapeCast3D
@export var particlesystem : GPUParticles3D
@export var status_stats : StatusStats
func _ready() -> void:
cooldown = 1.0 / stats.fire_rate
func set_raycast_origin(_node):
pass
func shoot():
if other_cooldown <= 0 and stats != null:
other_cooldown = cooldown
particlesystem.emitting = true
$AnimationPlayer.play("shoot")
for index in shapecast.get_collision_count():
var target = shapecast.get_collider(index) as CharacterBody3D
var status = StatusCold.new()
status.stats = status_stats
target.status_manager.add_effect(status)
func release_trigger():
trigger_held = false
particlesystem.emitting = false

View File

@ -1,76 +0,0 @@
[gd_scene load_steps=10 format=3 uid="uid://bxjyrqs8bvi41"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Refridgerator/fridgetower.gd" id="1_wo1ar"]
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="2_ccxwb"]
[ext_resource type="Resource" uid="uid://ugpxwdjfvssu" path="res://Resources/TurretStats/refridgerator.tres" id="3_hmanw"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_imgrm"]
transparency = 1
cull_mode = 2
shading_mode = 0
albedo_color = Color(0.686275, 0, 0, 0.278431)
[sub_resource type="Gradient" id="Gradient_kkqms"]
offsets = PackedFloat32Array(0, 0.512195, 1)
colors = PackedColorArray(1, 1, 1, 1, 0.189479, 0.632903, 0.66198, 0.818269, 0.12549, 0.603922, 0.635294, 0.803922)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_4cwgw"]
gradient = SubResource("Gradient_kkqms")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2nhns"]
spread = 180.0
flatness = 1.0
gravity = Vector3(0, -3, 0)
initial_velocity_min = 7.0
initial_velocity_max = 7.0
tangential_accel_min = 5.0
tangential_accel_max = 13.48
damping_min = 8.0
damping_max = 8.0
color_ramp = SubResource("GradientTexture1D_4cwgw")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ycjd1"]
transparency = 1
vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_q83y7"]
material = SubResource("StandardMaterial3D_ycjd1")
size = Vector3(0.3, 0.3, 0.3)
[node name="Node3D" type="Node3D" node_paths=PackedStringArray("particlesystem", "model", "range_sphere", "minimap_range_sphere")]
script = ExtResource("1_wo1ar")
status_stats = ExtResource("2_ccxwb")
particlesystem = NodePath("Model/GPUParticles3D")
stats = ExtResource("3_hmanw")
model = NodePath("Model")
range_sphere = NodePath("Model/CSGSphere3D")
minimap_range_sphere = NodePath("Model/CSGSphere3D2")
[node name="Model" type="Node3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.968366, 0)
size = Vector3(1, 1.25244, 1)
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.991506, 0)
size = Vector3(1.25687, 0.204013, 1.29481)
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
visible = false
radius = 7.5
material = SubResource("StandardMaterial3D_imgrm")
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
visible = false
layers = 4
radius = 7.5
material = SubResource("StandardMaterial3D_imgrm")
[node name="GPUParticles3D" type="GPUParticles3D" parent="Model"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.984682, 0)
amount = 48
visibility_aabb = AABB(-7.20412, -4, -6.98341, 14.4082, 8, 13.9668)
process_material = SubResource("ParticleProcessMaterial_2nhns")
draw_pass_1 = SubResource("BoxMesh_q83y7")

View File

@ -1,100 +0,0 @@
[gd_scene load_steps=14 format=3 uid="uid://b1457hrmd4xm7"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_edx8q"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Refridgerator/refridgeratorweapon.gd" id="2_uadfd"]
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="3_saiop"]
[ext_resource type="Resource" uid="uid://cpyrdja71sboe" path="res://Resources/WeaponStats/refridgerator.tres" id="4_f60ka"]
[sub_resource type="Animation" id="Animation_n8b32"]
length = 0.001
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0),
"transitions": PackedFloat32Array(1),
"update": 0,
"values": [Rect2(0, 0, 64, 64)]
}
[sub_resource type="Animation" id="Animation_g0h8q"]
resource_name = "shoot"
length = 0.15
tracks/0/type = "value"
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/path = NodePath(".:texture:region")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/keys = {
"times": PackedFloat32Array(0, 0.15),
"transitions": PackedFloat32Array(0, 0),
"update": 0,
"values": [Rect2(64, 0, 64, 64), Rect2(0, 0, 64, 64)]
}
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[sub_resource type="BoxShape3D" id="BoxShape3D_q7gll"]
size = Vector3(3, 3, 4)
[sub_resource type="Gradient" id="Gradient_kkqms"]
offsets = PackedFloat32Array(0, 0.512195, 1)
colors = PackedColorArray(1, 1, 1, 1, 0.189479, 0.632903, 0.66198, 0.818269, 0.12549, 0.603922, 0.635294, 0.803922)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_gpquw"]
gradient = SubResource("Gradient_kkqms")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_cp5dw"]
direction = Vector3(0, 1, 0)
spread = 20.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 5.0
initial_velocity_max = 5.0
damping_min = 1.9
damping_max = 1.9
color_ramp = SubResource("GradientTexture1D_gpquw")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2yd7w"]
transparency = 1
vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_ggcx2"]
material = SubResource("StandardMaterial3D_2yd7w")
size = Vector3(0.3, 0.3, 0.3)
[node name="Weapon" type="Sprite3D" node_paths=PackedStringArray("shapecast", "particlesystem")]
layers = 2
billboard = 1
texture_filter = 0
texture = ExtResource("1_edx8q")
script = ExtResource("2_uadfd")
shapecast = NodePath("ShapeCast3D")
particlesystem = NodePath("GPUParticles3D")
status_stats = ExtResource("3_saiop")
stats = ExtResource("4_f60ka")
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
libraries = {
"": SubResource("AnimationLibrary_ntl6p")
}
[node name="ShapeCast3D" type="ShapeCast3D" parent="."]
transform = Transform3D(0.975695, 0, 0.219131, 0, 1, 0, -0.219131, 0, 0.975695, 0, 0, 0)
shape = SubResource("BoxShape3D_q7gll")
target_position = Vector3(0, 0, -2)
collision_mask = 4
[node name="GPUParticles3D" type="GPUParticles3D" parent="."]
transform = Transform3D(0.975695, -0.219131, -9.57852e-09, 0, -4.37114e-08, 1, -0.219131, -0.975695, -4.2649e-08, 0, 0, 0)
amount = 32
visibility_aabb = AABB(-2.2922, -3.14731, -1.92995, 4.5844, 6.29461, 3.85991)
process_material = SubResource("ParticleProcessMaterial_cp5dw")
draw_pass_1 = SubResource("BoxMesh_ggcx2")

View File

@ -0,0 +1,23 @@
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://ds8qx4ggmqetk"]
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_84afc"]
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="2_kdslp"]
[ext_resource type="Resource" uid="uid://st0qrut5nxrm" path="res://PCs/Universal/ClassCards/Refrigerator/tower_stats.tres" id="3_bihii"]
[ext_resource type="PackedScene" uid="uid://b0vi11kj3lxng" path="res://PCs/Universal/ClassCards/Refrigerator/weapon_refrigerator.tscn" id="4_0oufq"]
[ext_resource type="PackedScene" uid="uid://bqaynyhxdr4to" path="res://PCs/Universal/ClassCards/Refrigerator/tower_refrigerator.tscn" id="4_7x6qx"]
[ext_resource type="Resource" uid="uid://5l758yxfpi1e" path="res://PCs/Universal/ClassCards/Refrigerator/weapon_stats.tres" id="5_dqmyh"]
[sub_resource type="AtlasTexture" id="AtlasTexture_fuxlt"]
atlas = ExtResource("2_kdslp")
region = Rect2(0, 0, 64, 64)
[resource]
script = ExtResource("1_84afc")
title = "Refrigerator"
rarity = 1
faction = 0
sprite = SubResource("AtlasTexture_fuxlt")
turret_scene = ExtResource("4_7x6qx")
weapon_scene = ExtResource("4_0oufq")
weapon_stats = ExtResource("5_dqmyh")
tower_stats = ExtResource("3_bihii")

View File

@ -0,0 +1,19 @@
[gd_resource type="ParticleProcessMaterial" load_steps=3 format=3 uid="uid://ckung57mij7ue"]
[sub_resource type="Gradient" id="Gradient_eiw3y"]
interpolation_color_space = 2
offsets = PackedFloat32Array(0, 0.325203, 1)
colors = PackedColorArray(0.827004, 0.826193, 0.823983, 1, 0.338333, 0.810555, 0.85349, 1, 0.0352941, 0.803922, 0.858824, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_arw7j"]
gradient = SubResource("Gradient_eiw3y")
[resource]
direction = Vector3(0, 0, -1)
spread = 15.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 3.0
initial_velocity_max = 3.0
scale_min = 0.3
scale_max = 0.3
color_ramp = SubResource("GradientTexture1D_arw7j")

View File

@ -0,0 +1,15 @@
extends RangeAffectingTower
class_name RefrigeratorTower
@export var particles : GPUParticles3D
func _ready() -> void:
super._ready()
particles.process_material.emission_ring_radius = target_range
func build_status_object() -> StatusEffect:
var status = StatusSlow.new()
status.stats = status_stats
return status

View File

@ -0,0 +1,43 @@
[gd_scene load_steps=10 format=3 uid="uid://bqaynyhxdr4to"]
[ext_resource type="PackedScene" uid="uid://bi6b2r6wek7he" path="res://Scenes/Towers/range_affecting_tower.tscn" id="1_4hvoi"]
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="2_u4dux"]
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Refrigerator/tower_refrigerator.gd" id="2_yhcmv"]
[ext_resource type="Resource" uid="uid://st0qrut5nxrm" path="res://PCs/Universal/ClassCards/Refrigerator/tower_stats.tres" id="3_jjh3a"]
[sub_resource type="Gradient" id="Gradient_lm6vx"]
offsets = PackedFloat32Array(0, 0.682927, 1)
colors = PackedColorArray(0, 1, 1, 1, 0.430894, 1, 1, 1, 1, 1, 1, 1)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_wv576"]
gradient = SubResource("Gradient_lm6vx")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_ijefe"]
spread = 180.0
flatness = 1.0
gravity = Vector3(0, -8, 0)
initial_velocity_min = 7.0
initial_velocity_max = 7.0
tangential_accel_min = 6.0
tangential_accel_max = 6.0
damping_min = 10.0
damping_max = 10.0
color_ramp = SubResource("GradientTexture1D_wv576")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_niq28"]
vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_btdsr"]
material = SubResource("StandardMaterial3D_niq28")
size = Vector3(0.3, 0.3, 0.3)
[node name="RefrigeratorTower" node_paths=PackedStringArray("particles") instance=ExtResource("1_4hvoi")]
script = ExtResource("2_yhcmv")
particles = NodePath("GPUParticles3D")
status_stats = ExtResource("2_u4dux")
stats = ExtResource("3_jjh3a")
[node name="GPUParticles3D" type="GPUParticles3D" parent="." index="5"]
amount = 32
process_material = SubResource("ParticleProcessMaterial_ijefe")
draw_pass_1 = SubResource("BoxMesh_btdsr")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://st0qrut5nxrm"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_ti2i3"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_e8yt2"]
[sub_resource type="Resource" id="Resource_j28f4"]
script = ExtResource("1_ti2i3")
key = "Fire Delay"
value = 1.0
[sub_resource type="Resource" id="Resource_likes"]
script = ExtResource("1_ti2i3")
key = "Damage"
value = 0.0
[sub_resource type="Resource" id="Resource_b65mk"]
script = ExtResource("1_ti2i3")
key = "Range"
value = 3.0
[resource]
script = ExtResource("2_e8yt2")
target_type = 1
attributes = Array[ExtResource("1_ti2i3")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
text = "Applies Cold to enemies around itself"

View File

@ -0,0 +1,21 @@
[gd_scene load_steps=7 format=3 uid="uid://b0vi11kj3lxng"]
[ext_resource type="PackedScene" uid="uid://dp4gfr5h0tbcd" path="res://Scenes/Weapons/shapecast_weapon.tscn" id="1_g3e4a"]
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="2_pranv"]
[ext_resource type="Resource" uid="uid://5l758yxfpi1e" path="res://PCs/Universal/ClassCards/Refrigerator/weapon_stats.tres" id="3_ihljm"]
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="4_y5ps0"]
[ext_resource type="Material" uid="uid://ckung57mij7ue" path="res://PCs/Universal/ClassCards/Refrigerator/cold_particles.tres" id="5_8q1lc"]
[sub_resource type="AtlasTexture" id="AtlasTexture_0yua2"]
atlas = ExtResource("4_y5ps0")
region = Rect2(0, 0, 64, 64)
[node name="RefrigeratorWeapon" instance=ExtResource("1_g3e4a")]
status_stats = ExtResource("2_pranv")
stats = ExtResource("3_ihljm")
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_0yua2")
[node name="GPUParticles3D" parent="ShapeCast3D" index="0"]
process_material = ExtResource("5_8q1lc")

View File

@ -0,0 +1,25 @@
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://5l758yxfpi1e"]
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_v7ces"]
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_1d5nm"]
[sub_resource type="Resource" id="Resource_j28f4"]
script = ExtResource("1_v7ces")
key = "Fire Delay"
value = 0.5
[sub_resource type="Resource" id="Resource_likes"]
script = ExtResource("1_v7ces")
key = "Damage"
value = 1.0
[sub_resource type="Resource" id="Resource_b65mk"]
script = ExtResource("1_v7ces")
key = "Range"
value = 3.0
[resource]
script = ExtResource("2_1d5nm")
target_type = 0
attributes = Array[ExtResource("1_v7ces")]([SubResource("Resource_j28f4"), SubResource("Resource_likes"), SubResource("Resource_b65mk")])
text = "Hold to apply Cold to enemies in front of you"

View File

@ -6,8 +6,6 @@
[node name="Rocket" instance=ExtResource("1_fnn4i")] [node name="Rocket" instance=ExtResource("1_fnn4i")]
script = ExtResource("2_86up0") script = ExtResource("2_86up0")
acceleration = 40.0
max_speed = 14.0
[node name="Sprite3D" parent="." index="1"] [node name="Sprite3D" parent="." index="1"]
pixel_size = 0.013 pixel_size = 0.013

View File

@ -66,6 +66,7 @@ func networked_spawn_rocket(target_node_path, peer_id):
projectile.position = global_position projectile.position = global_position
projectile.damage = damage projectile.damage = damage
projectile.target = target projectile.target = target
projectile.owner_id = peer_id
projectile.name = str(peer_id) + str(projectile_id) projectile.name = str(peer_id) + str(projectile_id)
get_tree().root.add_child(projectile) get_tree().root.add_child(projectile)
projectile.apply_central_impulse(Vector3.UP * 3.0) projectile.apply_central_impulse(Vector3.UP * 3.0)

View File

@ -6,7 +6,7 @@
[sub_resource type="Resource" id="Resource_58kde"] [sub_resource type="Resource" id="Resource_58kde"]
script = ExtResource("1_7xbx2") script = ExtResource("1_7xbx2")
key = "Fire Delay" key = "Fire Delay"
value = 1.2 value = 0.9
[sub_resource type="Resource" id="Resource_jl4jv"] [sub_resource type="Resource" id="Resource_jl4jv"]
script = ExtResource("1_7xbx2") script = ExtResource("1_7xbx2")

View File

@ -133,7 +133,7 @@ func _process(delta: float) -> void:
movement.zoom_factor -= sprint_zoom_speed * delta movement.zoom_factor -= sprint_zoom_speed * delta
if movement.zoom_factor <= 1.0 - movement.sprint_zoom_factor: if movement.zoom_factor <= 1.0 - movement.sprint_zoom_factor:
movement.zoom_factor = 1.0 - movement.sprint_zoom_factor movement.zoom_factor = 1.0 - movement.sprint_zoom_factor
camera.fov = Data.preferences.hfov * (1.0 / movement.zoom_factor) camera.fov = Data.graphics.hfov * (1.0 / movement.zoom_factor)
if Input.is_action_just_pressed("View Map"): if Input.is_action_just_pressed("View Map"):
hud.maximise_minimap(Game.level) hud.maximise_minimap(Game.level)

View File

@ -22,7 +22,7 @@
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jbu13"] [sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jbu13"]
[sub_resource type="AtlasTexture" id="AtlasTexture_oyv4e"] [sub_resource type="AtlasTexture" id="AtlasTexture_kr8sn"]
resource_local_to_scene = true resource_local_to_scene = true
atlas = ExtResource("6_yyp8i") atlas = ExtResource("6_yyp8i")
region = Rect2(0, 0, 96, 96) region = Rect2(0, 0, 96, 96)
@ -103,7 +103,7 @@ collision_mask = 24
[node name="EightDirectionSprite" parent="." instance=ExtResource("2_ib0t5")] [node name="EightDirectionSprite" parent="." instance=ExtResource("2_ib0t5")]
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0.915529, 0) transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0.915529, 0)
texture = SubResource("AtlasTexture_oyv4e") texture = SubResource("AtlasTexture_kr8sn")
[node name="Inventory" type="Node" parent="."] [node name="Inventory" type="Node" parent="."]
script = ExtResource("6_cf5ap") script = ExtResource("6_cf5ap")

View File

@ -0,0 +1,4 @@
[gd_scene format=3 uid="uid://bwc45ogto8thn"]
[node name="Audio" type="VBoxContainer"]
visible = false

View File

@ -0,0 +1,167 @@
[gd_scene load_steps=3 format=3 uid="uid://bjk7jf0bau5lv"]
[ext_resource type="Script" path="res://Scripts/gameplay_options.gd" id="1_sy26f"]
[sub_resource type="ImageTexture" id="ImageTexture_03x6q"]
[node name="Gameplay" type="VBoxContainer" node_paths=PackedStringArray("look_sens_slider", "look_sens_input", "toggle_sprint_checkbox", "invert_lookY", "invert_lookX", "fixed_minimap", "tower_damage", "self_damage", "party_damage", "status_damage")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_sy26f")
look_sens_slider = NodePath("MouseSens/HBoxContainer/HSlider")
look_sens_input = NodePath("MouseSens/HBoxContainer/SpinBox")
toggle_sprint_checkbox = NodePath("ToggleSprint/CenterContainer/CheckButton")
invert_lookY = NodePath("InvertMouseY/CenterContainer/CheckButton")
invert_lookX = NodePath("InvertMouseX/CenterContainer/CheckButton")
fixed_minimap = NodePath("FixedMinimap/CenterContainer/CheckButton")
tower_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/TowerDamage")
self_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/SelfDamage")
party_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/PartyDamage")
status_damage = NodePath("FloatingDamageIndicators/CenterContainer/HBoxContainer/StatusDamage")
[node name="MouseSens" type="HBoxContainer" parent="."]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="MouseSens"]
layout_mode = 2
size_flags_horizontal = 3
text = "Look Sensitivity"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="MouseSens"]
layout_mode = 2
size_flags_horizontal = 3
[node name="SpinBox" type="SpinBox" parent="MouseSens/HBoxContainer"]
layout_mode = 2
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
step = 0.01
alignment = 1
update_on_text_changed = true
[node name="HSlider" type="HSlider" parent="MouseSens/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
step = 0.01
scrollable = false
[node name="ToggleSprint" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="ToggleSprint"]
layout_mode = 2
size_flags_horizontal = 3
text = "Toggle Sprint"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="ToggleSprint"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="ToggleSprint/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="InvertMouseY" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="InvertMouseY"]
layout_mode = 2
size_flags_horizontal = 3
text = "Invert Look Y"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="InvertMouseY"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="InvertMouseY/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="InvertMouseX" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="InvertMouseX"]
layout_mode = 2
size_flags_horizontal = 3
text = "Invert Look X"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="InvertMouseX"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="InvertMouseX/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="FixedMinimap" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="FixedMinimap"]
layout_mode = 2
size_flags_horizontal = 3
text = "Fixed Minimap"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="FixedMinimap"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="FixedMinimap/CenterContainer"]
layout_mode = 2
[node name="FloatingDamageIndicators" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="FloatingDamageIndicators"]
layout_mode = 2
size_flags_horizontal = 3
text = "Floating Damage Indicators"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="FloatingDamageIndicators"]
layout_mode = 2
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="FloatingDamageIndicators/CenterContainer"]
layout_mode = 2
[node name="TowerDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Tower Damage"
[node name="SelfDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Self Damage"
[node name="PartyDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Party Damage"
[node name="StatusDamage" type="Button" parent="FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Status Effect Damage"
[connection signal="value_changed" from="MouseSens/HBoxContainer/SpinBox" to="." method="_on_mouse_sens_spin_box_value_changed"]
[connection signal="value_changed" from="MouseSens/HBoxContainer/HSlider" to="." method="_on_mouse_sens_h_slider_value_changed"]

View File

@ -0,0 +1,125 @@
[gd_scene load_steps=3 format=3 uid="uid://bmd4mawasoc11"]
[ext_resource type="Script" path="res://Scripts/graphics_options.gd" id="1_85rh6"]
[sub_resource type="ImageTexture" id="ImageTexture_03x6q"]
[node name="Graphics" type="VBoxContainer" node_paths=PackedStringArray("fov_input", "fov_slider", "vsync_dropdown", "aa_dropdown", "window_dropdown")]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_85rh6")
fov_input = NodePath("FOV/HBoxContainer/SpinBox")
fov_slider = NodePath("FOV/HBoxContainer/HSlider")
vsync_dropdown = NodePath("VSync/OptionButton")
aa_dropdown = NodePath("AntiAliasing/OptionButton")
window_dropdown = NodePath("Windowed/OptionButton")
[node name="FOV" type="HBoxContainer" parent="."]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="FOV"]
layout_mode = 2
size_flags_horizontal = 3
text = "Field Of View"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="FOV"]
layout_mode = 2
size_flags_horizontal = 3
[node name="SpinBox" type="SpinBox" parent="FOV/HBoxContainer"]
layout_mode = 2
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
min_value = 40.0
max_value = 160.0
value = 100.0
allow_greater = true
allow_lesser = true
alignment = 1
update_on_text_changed = true
[node name="HSlider" type="HSlider" parent="FOV/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
min_value = 40.0
max_value = 160.0
value = 100.0
scrollable = false
[node name="VSync" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="VSync"]
layout_mode = 2
size_flags_horizontal = 3
text = "V-Sync"
horizontal_alignment = 1
vertical_alignment = 1
[node name="OptionButton" type="OptionButton" parent="VSync"]
layout_mode = 2
size_flags_horizontal = 3
item_count = 4
selected = 1
popup/item_0/text = "Off"
popup/item_0/id = 0
popup/item_1/text = "On"
popup/item_1/id = 1
popup/item_2/text = "Adaptive"
popup/item_2/id = 2
popup/item_3/text = "Triple Buffered"
popup/item_3/id = 3
[node name="AntiAliasing" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="AntiAliasing"]
layout_mode = 2
size_flags_horizontal = 3
text = "Anti-Aliasing
"
horizontal_alignment = 1
vertical_alignment = 1
[node name="OptionButton" type="OptionButton" parent="AntiAliasing"]
layout_mode = 2
size_flags_horizontal = 3
item_count = 3
selected = 0
popup/item_0/text = "Off"
popup/item_0/id = 0
popup/item_1/text = "FXAA"
popup/item_1/id = 1
popup/item_2/text = "TAA"
popup/item_2/id = 2
[node name="Windowed" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="Label" type="Label" parent="Windowed"]
layout_mode = 2
size_flags_horizontal = 3
text = "Window Mode"
horizontal_alignment = 1
vertical_alignment = 1
[node name="OptionButton" type="OptionButton" parent="Windowed"]
layout_mode = 2
size_flags_horizontal = 3
item_count = 3
selected = 0
popup/item_0/text = "Windowed"
popup/item_0/id = 0
popup/item_1/text = "Borderless Windowed"
popup/item_1/id = 1
popup/item_2/text = "Fullscreen"
popup/item_2/id = 2
[connection signal="value_changed" from="FOV/HBoxContainer/SpinBox" to="." method="_on_fov_spin_box_value_changed"]
[connection signal="value_changed" from="FOV/HBoxContainer/HSlider" to="." method="_on_fov_h_slider_value_changed"]

View File

@ -0,0 +1,22 @@
[gd_scene load_steps=2 format=3 uid="uid://bf2nosqt5f82e"]
[ext_resource type="Script" path="res://Scripts/keybind_options.gd" id="1_oxg0p"]
[node name="Keybinds" type="VBoxContainer"]
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_oxg0p")
[node name="HBoxContainer" type="HBoxContainer" parent="."]
layout_mode = 2
[node name="ScrollContainer" type="ScrollContainer" parent="."]
layout_mode = 2
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3

View File

@ -64,7 +64,6 @@ text = "Ready"
[node name="Chatbox" parent="." instance=ExtResource("6_wtqwd")] [node name="Chatbox" parent="." instance=ExtResource("6_wtqwd")]
layout_mode = 1 layout_mode = 1
offset_bottom = -507.0
[connection signal="player_connected" from="." to="Scoreboard" method="add_player"] [connection signal="player_connected" from="." to="Scoreboard" method="add_player"]
[connection signal="player_disconnected" from="." to="Scoreboard" method="remove_player"] [connection signal="player_disconnected" from="." to="Scoreboard" method="remove_player"]

View File

@ -1,11 +1,12 @@
[gd_scene load_steps=4 format=3 uid="uid://clulh7v8c7h85"] [gd_scene load_steps=6 format=3 uid="uid://clulh7v8c7h85"]
[ext_resource type="Script" path="res://Scripts/options_menu.gd" id="1_bievw"] [ext_resource type="Script" path="res://Scripts/options_menu.gd" id="1_bievw"]
[ext_resource type="PackedScene" uid="uid://clsdko6ttudu8" path="res://Scenes/UI/keybind_popup.tscn" id="2_bq25i"] [ext_resource type="PackedScene" uid="uid://bjk7jf0bau5lv" path="res://Scenes/Menus/gameplay_options.tscn" id="3_25wuw"]
[ext_resource type="PackedScene" uid="uid://bmd4mawasoc11" path="res://Scenes/Menus/graphics_options.tscn" id="4_ckcvq"]
[ext_resource type="PackedScene" uid="uid://bf2nosqt5f82e" path="res://Scenes/Menus/keybind_options.tscn" id="5_4k33c"]
[ext_resource type="PackedScene" uid="uid://bwc45ogto8thn" path="res://Scenes/Menus/audio_options.tscn" id="6_4vs8p"]
[sub_resource type="ImageTexture" id="ImageTexture_03x6q"] [node name="OptionsMenu" type="PanelContainer"]
[node name="OptionsMenu" type="PanelContainer" node_paths=PackedStringArray("look_sens_slider", "look_sens_input", "toggle_sprint_checkbox", "vsync_dropdown", "aa_dropdown", "window_dropdown", "invert_lookY", "invert_lookX", "fov_input", "fov_slider", "fixed_minimap", "tower_damage", "self_damage", "party_damage")]
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
anchor_bottom = 1.0 anchor_bottom = 1.0
@ -16,21 +17,6 @@ offset_bottom = -30.0
grow_horizontal = 2 grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
script = ExtResource("1_bievw") script = ExtResource("1_bievw")
keybind_popup = ExtResource("2_bq25i")
look_sens_slider = NodePath("VBoxContainer/TabContainer/Gameplay/MouseSens/HBoxContainer/HSlider")
look_sens_input = NodePath("VBoxContainer/TabContainer/Gameplay/MouseSens/HBoxContainer/SpinBox")
toggle_sprint_checkbox = NodePath("VBoxContainer/TabContainer/Gameplay/ToggleSprint/CenterContainer/CheckButton")
vsync_dropdown = NodePath("VBoxContainer/TabContainer/Graphics/VSync/OptionButton")
aa_dropdown = NodePath("VBoxContainer/TabContainer/Graphics/AntiAliasing/OptionButton")
window_dropdown = NodePath("VBoxContainer/TabContainer/Graphics/Windowed/OptionButton")
invert_lookY = NodePath("VBoxContainer/TabContainer/Gameplay/InvertMouseY/CenterContainer/CheckButton")
invert_lookX = NodePath("VBoxContainer/TabContainer/Gameplay/InvertMouseX/CenterContainer/CheckButton")
fov_input = NodePath("VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer/SpinBox")
fov_slider = NodePath("VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer/HSlider")
fixed_minimap = NodePath("VBoxContainer/TabContainer/Gameplay/FixedMinimap/CenterContainer/CheckButton")
tower_damage = NodePath("VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer/Button")
self_damage = NodePath("VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer/Button2")
party_damage = NodePath("VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer/Button3")
[node name="VBoxContainer" type="VBoxContainer" parent="."] [node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 2 layout_mode = 2
@ -39,275 +25,18 @@ layout_mode = 2
layout_mode = 2 layout_mode = 2
size_flags_vertical = 3 size_flags_vertical = 3
[node name="Gameplay" type="VBoxContainer" parent="VBoxContainer/TabContainer"] [node name="Gameplay" parent="VBoxContainer/TabContainer" instance=ExtResource("3_25wuw")]
layout_mode = 2 layout_mode = 2
[node name="MouseSens" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay"] [node name="Graphics" parent="VBoxContainer/TabContainer" instance=ExtResource("4_ckcvq")]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Gameplay/MouseSens"]
layout_mode = 2
size_flags_horizontal = 3
text = "Look Sensitivity"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay/MouseSens"]
layout_mode = 2
size_flags_horizontal = 3
[node name="SpinBox" type="SpinBox" parent="VBoxContainer/TabContainer/Gameplay/MouseSens/HBoxContainer"]
layout_mode = 2
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
step = 0.01
alignment = 1
update_on_text_changed = true
[node name="HSlider" type="HSlider" parent="VBoxContainer/TabContainer/Gameplay/MouseSens/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
step = 0.01
scrollable = false
[node name="ToggleSprint" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Gameplay/ToggleSprint"]
layout_mode = 2
size_flags_horizontal = 3
text = "Toggle Sprint"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/TabContainer/Gameplay/ToggleSprint"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/TabContainer/Gameplay/ToggleSprint/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="InvertMouseY" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Gameplay/InvertMouseY"]
layout_mode = 2
size_flags_horizontal = 3
text = "Invert Look Y"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/TabContainer/Gameplay/InvertMouseY"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/TabContainer/Gameplay/InvertMouseY/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="InvertMouseX" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Gameplay/InvertMouseX"]
layout_mode = 2
size_flags_horizontal = 3
text = "Invert Look X"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/TabContainer/Gameplay/InvertMouseX"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/TabContainer/Gameplay/InvertMouseX/CenterContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="FixedMinimap" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Gameplay/FixedMinimap"]
layout_mode = 2
size_flags_horizontal = 3
text = "Fixed Minimap"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/TabContainer/Gameplay/FixedMinimap"]
layout_mode = 2
size_flags_horizontal = 3
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/TabContainer/Gameplay/FixedMinimap/CenterContainer"]
layout_mode = 2
[node name="FloatingDamageIndicators" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators"]
layout_mode = 2
size_flags_horizontal = 3
text = "Floating Damage Indicators"
horizontal_alignment = 1
vertical_alignment = 1
[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators"]
layout_mode = 2
size_flags_horizontal = 3
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer"]
layout_mode = 2
[node name="Button" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Tower Damage"
[node name="Button2" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Self Damage"
[node name="Button3" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Party Damage"
[node name="Button4" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
layout_mode = 2
toggle_mode = true
button_pressed = true
text = "Status Effect Damage"
[node name="Graphics" type="VBoxContainer" parent="VBoxContainer/TabContainer"]
visible = false visible = false
layout_mode = 2 layout_mode = 2
[node name="FOV" type="HBoxContainer" parent="VBoxContainer/TabContainer/Graphics"] [node name="Keybinds" parent="VBoxContainer/TabContainer" instance=ExtResource("5_4k33c")]
layout_mode = 2
alignment = 1
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Graphics/FOV"]
layout_mode = 2
size_flags_horizontal = 3
text = "Field Of View"
horizontal_alignment = 1
vertical_alignment = 1
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TabContainer/Graphics/FOV"]
layout_mode = 2
size_flags_horizontal = 3
[node name="SpinBox" type="SpinBox" parent="VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer"]
layout_mode = 2
theme_override_icons/updown = SubResource("ImageTexture_03x6q")
min_value = 40.0
max_value = 160.0
value = 100.0
allow_greater = true
allow_lesser = true
alignment = 1
update_on_text_changed = true
[node name="HSlider" type="HSlider" parent="VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer"]
layout_mode = 2
size_flags_horizontal = 3
size_flags_vertical = 1
min_value = 40.0
max_value = 160.0
value = 100.0
scrollable = false
[node name="VSync" type="HBoxContainer" parent="VBoxContainer/TabContainer/Graphics"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Graphics/VSync"]
layout_mode = 2
size_flags_horizontal = 3
text = "V-Sync"
horizontal_alignment = 1
vertical_alignment = 1
[node name="OptionButton" type="OptionButton" parent="VBoxContainer/TabContainer/Graphics/VSync"]
layout_mode = 2
size_flags_horizontal = 3
item_count = 4
selected = 1
popup/item_0/text = "Off"
popup/item_0/id = 0
popup/item_1/text = "On"
popup/item_1/id = 1
popup/item_2/text = "Adaptive"
popup/item_2/id = 2
popup/item_3/text = "Triple Buffered"
popup/item_3/id = 3
[node name="AntiAliasing" type="HBoxContainer" parent="VBoxContainer/TabContainer/Graphics"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Graphics/AntiAliasing"]
layout_mode = 2
size_flags_horizontal = 3
text = "Anti-Aliasing
"
horizontal_alignment = 1
vertical_alignment = 1
[node name="OptionButton" type="OptionButton" parent="VBoxContainer/TabContainer/Graphics/AntiAliasing"]
layout_mode = 2
size_flags_horizontal = 3
item_count = 3
selected = 0
popup/item_0/text = "Off"
popup/item_0/id = 0
popup/item_1/text = "FXAA"
popup/item_1/id = 1
popup/item_2/text = "TAA"
popup/item_2/id = 2
[node name="Windowed" type="HBoxContainer" parent="VBoxContainer/TabContainer/Graphics"]
layout_mode = 2
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Graphics/Windowed"]
layout_mode = 2
size_flags_horizontal = 3
text = "Window Mode"
horizontal_alignment = 1
vertical_alignment = 1
[node name="OptionButton" type="OptionButton" parent="VBoxContainer/TabContainer/Graphics/Windowed"]
layout_mode = 2
size_flags_horizontal = 3
item_count = 3
selected = 0
popup/item_0/text = "Windowed"
popup/item_0/id = 0
popup/item_1/text = "Borderless Windowed"
popup/item_1/id = 1
popup/item_2/text = "Fullscreen"
popup/item_2/id = 2
[node name="Keybinds" type="VBoxContainer" parent="VBoxContainer/TabContainer"]
visible = false visible = false
layout_mode = 2 layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TabContainer/Keybinds"] [node name="Audio" parent="VBoxContainer/TabContainer" instance=ExtResource("6_4vs8p")]
layout_mode = 2
[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/TabContainer/Keybinds"]
layout_mode = 2
size_flags_vertical = 3
[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/TabContainer/Keybinds/ScrollContainer"]
layout_mode = 2
size_flags_horizontal = 3
[node name="Audio" type="VBoxContainer" parent="VBoxContainer/TabContainer"]
visible = false
layout_mode = 2 layout_mode = 2
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] [node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"]
@ -322,11 +51,5 @@ text = "Discard"
layout_mode = 2 layout_mode = 2
text = "Confirm" text = "Confirm"
[connection signal="value_changed" from="VBoxContainer/TabContainer/Gameplay/MouseSens/HBoxContainer/SpinBox" to="." method="_on_mouse_sens_spin_box_value_changed"]
[connection signal="value_changed" from="VBoxContainer/TabContainer/Gameplay/MouseSens/HBoxContainer/HSlider" to="." method="_on_mouse_sens_h_slider_value_changed"]
[connection signal="value_changed" from="VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer/SpinBox" to="." method="_on_fov_spin_box_value_changed"]
[connection signal="value_changed" from="VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer/HSlider" to="." method="_on_fov_h_slider_value_changed"]
[connection signal="item_selected" from="VBoxContainer/TabContainer/Graphics/VSync/OptionButton" to="." method="_on_vsync_option_button_item_selected"]
[connection signal="item_selected" from="VBoxContainer/TabContainer/Graphics/AntiAliasing/OptionButton" to="." method="_on_AA_option_button_item_selected"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_cancel_pressed"] [connection signal="pressed" from="VBoxContainer/HBoxContainer/Cancel" to="." method="_on_cancel_pressed"]
[connection signal="pressed" from="VBoxContainer/HBoxContainer/Confirm" to="." method="_on_confirm_pressed"] [connection signal="pressed" from="VBoxContainer/HBoxContainer/Confirm" to="." method="_on_confirm_pressed"]

View File

@ -54,9 +54,7 @@ grow_vertical = 2
text = "Ready" text = "Ready"
[node name="Chatbox" parent="." instance=ExtResource("3_l8xy3")] [node name="Chatbox" parent="." instance=ExtResource("3_l8xy3")]
visible = false
layout_mode = 1 layout_mode = 1
offset_bottom = -507.0
[connection signal="pressed" from="ReadyButton" to="Scoreboard" method="set_player_ready_state" binds= [1, true]] [connection signal="pressed" from="ReadyButton" to="Scoreboard" method="set_player_ready_state" binds= [1, true]]
[connection signal="pressed" from="ReadyButton" to="ReadyButton" method="set_visible" binds= [false]] [connection signal="pressed" from="ReadyButton" to="ReadyButton" method="set_visible" binds= [false]]

View File

@ -0,0 +1,7 @@
[gd_scene load_steps=3 format=3 uid="uid://bi6b2r6wek7he"]
[ext_resource type="PackedScene" uid="uid://dxwtlvv632ae8" path="res://Scenes/Towers/status_applying_tower.tscn" id="1_x852w"]
[ext_resource type="Script" path="res://Scripts/Towers/range_affecting_tower.gd" id="2_wc1xf"]
[node name="RangeAffectingTower" instance=ExtResource("1_x852w")]
script = ExtResource("2_wc1xf")

View File

@ -0,0 +1,14 @@
[gd_scene load_steps=3 format=3 uid="uid://8uxu72vjo0cv"]
[ext_resource type="PackedScene" uid="uid://bvqu1heobgboe" path="res://Scenes/Towers/tower.tscn" id="1_ljc02"]
[ext_resource type="Script" path="res://Scripts/Towers/shapecast_tower.gd" id="2_qh834"]
[node name="ShapecastTower" node_paths=PackedStringArray("shapecast", "particlesystem") instance=ExtResource("1_ljc02")]
script = ExtResource("2_qh834")
shapecast = NodePath("Yaw/ShapeCast3D")
particlesystem = NodePath("Yaw/ShapeCast3D/GPUParticles3D")
status_stats = null
[node name="ShapeCast3D" type="ShapeCast3D" parent="Yaw" index="0"]
[node name="GPUParticles3D" type="GPUParticles3D" parent="Yaw/ShapeCast3D" index="0"]

View File

@ -1,8 +1,11 @@
[gd_scene load_steps=2 format=3 uid="uid://ddmg342ff2qaq"] [gd_scene load_steps=3 format=3 uid="uid://ddmg342ff2qaq"]
[ext_resource type="Script" path="res://Scripts/chatbox.gd" id="1_k3g22"] [ext_resource type="Script" path="res://Scripts/chatbox.gd" id="1_k3g22"]
[node name="Chatbox" type="Control"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_c3kb6"]
bg_color = Color(0.223529, 0.211765, 0.184314, 0.462745)
[node name="Chatbox" type="Control" node_paths=PackedStringArray("input_line", "textbox", "text_panel", "fade_timer")]
layout_mode = 3 layout_mode = 3
anchors_preset = 15 anchors_preset = 15
anchor_right = 1.0 anchor_right = 1.0
@ -11,24 +14,32 @@ grow_horizontal = 2
grow_vertical = 2 grow_vertical = 2
mouse_filter = 2 mouse_filter = 2
script = ExtResource("1_k3g22") script = ExtResource("1_k3g22")
input_line = NodePath("VBoxContainer/LineEdit")
textbox = NodePath("VBoxContainer/PanelContainer/RichTextLabel")
text_panel = NodePath("VBoxContainer/PanelContainer")
fade_timer = NodePath("Timer")
[node name="VBoxContainer" type="VBoxContainer" parent="."] [node name="VBoxContainer" type="VBoxContainer" parent="."]
layout_mode = 1 layout_mode = 2
anchors_preset = -1 offset_left = 40.0
anchor_top = 1.0 offset_top = 100.0
anchor_bottom = 1.0 offset_right = 375.0
offset_left = 15.0 offset_bottom = 300.0
offset_top = -210.0
offset_right = 350.0
offset_bottom = -10.0
grow_vertical = 0
mouse_filter = 2 mouse_filter = 2
alignment = 2 alignment = 2
[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer"] [node name="PanelContainer" type="PanelContainer" parent="VBoxContainer"]
modulate = Color(1, 1, 1, 0)
layout_mode = 2
size_flags_vertical = 3
theme_override_styles/panel = SubResource("StyleBoxFlat_c3kb6")
[node name="RichTextLabel" type="RichTextLabel" parent="VBoxContainer/PanelContainer"]
modulate = Color(1, 1, 1, 0)
layout_mode = 2 layout_mode = 2
size_flags_vertical = 3 size_flags_vertical = 3
mouse_filter = 2 mouse_filter = 2
bbcode_enabled = true
scroll_following = true scroll_following = true
[node name="LineEdit" type="LineEdit" parent="VBoxContainer"] [node name="LineEdit" type="LineEdit" parent="VBoxContainer"]
@ -37,3 +48,8 @@ layout_mode = 2
mouse_filter = 2 mouse_filter = 2
context_menu_enabled = false context_menu_enabled = false
selecting_enabled = false selecting_enabled = false
[node name="Timer" type="Timer" parent="."]
wait_time = 3.5
[connection signal="timeout" from="Timer" to="." method="_on_timer_timeout"]

View File

@ -0,0 +1,44 @@
[gd_scene load_steps=7 format=3 uid="uid://dp4gfr5h0tbcd"]
[ext_resource type="PackedScene" uid="uid://b7nargdyg28fj" path="res://Scenes/Weapons/weapon.tscn" id="1_gfchc"]
[ext_resource type="Script" path="res://Scripts/Weapons/shapecast_weapon.gd" id="2_lg6v5"]
[sub_resource type="BoxShape3D" id="BoxShape3D_uk6ey"]
size = Vector3(2, 2, 3)
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_vi555"]
vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_o37rs"]
material = SubResource("StandardMaterial3D_vi555")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_sgbeo"]
transparency = 1
cull_mode = 1
shading_mode = 0
albedo_color = Color(1, 0, 0.415686, 0.223529)
[node name="ShapecastWeapon" node_paths=PackedStringArray("shapecast", "range_debug_indicator", "particles") instance=ExtResource("1_gfchc")]
script = ExtResource("2_lg6v5")
shapecast = NodePath("ShapeCast3D")
range_debug_indicator = NodePath("CSGSphere3D")
status_stats = null
particles = NodePath("ShapeCast3D/GPUParticles3D")
[node name="ShapeCast3D" type="ShapeCast3D" parent="." index="2"]
transform = Transform3D(0.984808, 0, 0.173648, 0, 1, 0, -0.173648, 0, 0.984808, 0, 0, 0)
shape = SubResource("BoxShape3D_uk6ey")
target_position = Vector3(0, 0, -1.5)
collision_mask = 4
[node name="GPUParticles3D" type="GPUParticles3D" parent="ShapeCast3D" index="0"]
amount = 36
visibility_aabb = AABB(-1.02851, -1.00566, -3.03983, 2.05703, 2.01132, 6.07966)
draw_pass_1 = SubResource("BoxMesh_o37rs")
[node name="CSGSphere3D" type="CSGSphere3D" parent="." index="3"]
visible = false
radius = 4.104
radial_segments = 16
rings = 16
material = SubResource("StandardMaterial3D_sgbeo")

View File

@ -1,28 +1,27 @@
[gd_scene load_steps=5 format=3 uid="uid://ddbbwx0yy16lh"] [gd_scene load_steps=6 format=3 uid="uid://ddbbwx0yy16lh"]
[ext_resource type="Script" path="res://Scripts/tower_base.gd" id="1_tghvd"] [ext_resource type="Script" path="res://Scripts/tower_base.gd" id="1_tghvd"]
[ext_resource type="Script" path="res://Scripts/inventory.gd" id="2_p5c7g"] [ext_resource type="Script" path="res://Scripts/inventory.gd" id="2_p5c7g"]
[ext_resource type="Texture2D" uid="uid://ba85u6i558x4w" path="res://Assets/Textures/minimap_node.png" id="3_01hk3"] [ext_resource type="Texture2D" uid="uid://ba85u6i558x4w" path="res://Assets/Textures/minimap_node.png" id="3_01hk3"]
[ext_resource type="ArrayMesh" uid="uid://cr83c74ys8rll" path="res://textmesh.res" id="4_hosgw"]
[sub_resource type="BoxShape3D" id="BoxShape3D_lc72v"] [sub_resource type="BoxShape3D" id="BoxShape3D_lc72v"]
size = Vector3(1.1, 1.1, 1.1)
[node name="Node3D" type="StaticBody3D" node_paths=PackedStringArray("inventory", "block", "collider", "minimap_icon")] [node name="Node3D" type="StaticBody3D" node_paths=PackedStringArray("inventory", "block", "collider", "minimap_icon")]
collision_layer = 17 collision_layer = 17
script = ExtResource("1_tghvd") script = ExtResource("1_tghvd")
inventory = NodePath("Inventory") inventory = NodePath("Inventory")
block = NodePath("CSGBox3D") block = NodePath("MeshInstance3D")
collider = NodePath("CollisionShape3D") collider = NodePath("CollisionShape3D")
minimap_icon = NodePath("Sprite3D") minimap_icon = NodePath("Sprite3D")
[node name="CSGBox3D" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
[node name="Inventory" type="Node" parent="."] [node name="Inventory" type="Node" parent="."]
script = ExtResource("2_p5c7g") script = ExtResource("2_p5c7g")
max_size = 1 max_size = 1
[node name="CollisionShape3D" type="CollisionShape3D" parent="."] [node name="CollisionShape3D" type="CollisionShape3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 0)
shape = SubResource("BoxShape3D_lc72v") shape = SubResource("BoxShape3D_lc72v")
[node name="Sprite3D" type="Sprite3D" parent="."] [node name="Sprite3D" type="Sprite3D" parent="."]
@ -31,3 +30,7 @@ layers = 4
modulate = Color(0, 1, 0, 1) modulate = Color(0, 1, 0, 1)
texture_filter = 0 texture_filter = 0
texture = ExtResource("3_01hk3") texture = ExtResource("3_01hk3")
[node name="MeshInstance3D" type="MeshInstance3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.55, 0)
mesh = ExtResource("4_hosgw")

View File

@ -17,23 +17,23 @@ albedo_color = Color(0.0980392, 0.309804, 0.180392, 1)
[node name="Node3D" type="Node3D"] [node name="Node3D" type="Node3D"]
[node name="CSGBox3D2" type="CSGBox3D" parent="."] [node name="CSGBox3D2" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, 0.525) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, 0.575)
size = Vector3(1, 0.04, 0.05) size = Vector3(0.525, 0.04, 0.05)
material = SubResource("StandardMaterial3D_xt3aj") material = SubResource("StandardMaterial3D_xt3aj")
[node name="CSGBox3D3" type="CSGBox3D" parent="."] [node name="CSGBox3D3" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, -0.525) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.02, -0.575)
size = Vector3(1, 0.04, 0.05) size = Vector3(0.525, 0.04, 0.05)
material = SubResource("StandardMaterial3D_gbm1j") material = SubResource("StandardMaterial3D_gbm1j")
[node name="CSGBox3D4" type="CSGBox3D" parent="."] [node name="CSGBox3D4" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.525, 0.02, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.575, 0.02, 0)
size = Vector3(0.05, 0.04, 1.1) size = Vector3(0.05, 0.04, 0.525)
material = SubResource("StandardMaterial3D_18qg8") material = SubResource("StandardMaterial3D_18qg8")
[node name="CSGBox3D5" type="CSGBox3D" parent="."] [node name="CSGBox3D5" type="CSGBox3D" parent="."]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.525, 0.02, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.575, 0.02, 0)
size = Vector3(0.05, 0.04, 1.1) size = Vector3(0.05, 0.04, 0.525)
material = SubResource("StandardMaterial3D_ip8b2") material = SubResource("StandardMaterial3D_ip8b2")
[node name="Sprite3D" type="Sprite3D" parent="."] [node name="Sprite3D" type="Sprite3D" parent="."]

View File

@ -26,6 +26,15 @@ func explode():
func hit(target): func hit(target):
target.damage(damage) target.damage(damage)
if owner_id == 0:
if Data.preferences.display_tower_damage_indicators:
spawn_damage_indicator(target.sprite.global_position)
if owner_id == multiplayer.get_unique_id():
if Data.preferences.display_self_damage_indicators:
spawn_damage_indicator(target.sprite.global_position)
if owner_id != 0 and owner_id != multiplayer.get_unique_id():
if Data.preferences.display_party_damage_indicators:
spawn_damage_indicator(target.sprite.global_position)
@rpc("reliable") @rpc("reliable")

View File

@ -2,16 +2,17 @@ extends ExplosiveProjectile
class_name HomingProjectile class_name HomingProjectile
var target : Node3D var target : Node3D
@export var acceleration := 40.0 var acceleration := 50.0
@export var max_speed := 14.0 var max_speed := 13.0
func _physics_process(_delta: float) -> void: func _physics_process(_delta: float) -> void:
if is_instance_valid(target): if is_instance_valid(target):
direction = global_position.direction_to(target.global_position) direction = global_position.direction_to(target.sprite.global_position)
#apply_central_force(direction * acceleration) #apply_central_force(direction * acceleration)
func _integrate_forces(state: PhysicsDirectBodyState3D) -> void: func _integrate_forces(state: PhysicsDirectBodyState3D) -> void:
state.linear_velocity = state.linear_velocity.limit_length(state.linear_velocity.length() * (1.0 - 0.08))
state.linear_velocity += direction * acceleration * state.step state.linear_velocity += direction * acceleration * state.step
state.linear_velocity = state.linear_velocity.limit_length(max_speed) state.linear_velocity = state.linear_velocity.limit_length(max_speed)

View File

@ -3,6 +3,8 @@ class_name Projectile
@export var collision_shape : CollisionShape3D @export var collision_shape : CollisionShape3D
var damage_particle_scene = preload("res://Scenes/damage_particle.tscn")
var owner_id = 0 #should be left unchanged by towers, 1 for host, peer_id on peers
var direction := Vector3.FORWARD var direction := Vector3.FORWARD
var force := 2.0 var force := 2.0
var damage := 0.0 var damage := 0.0
@ -18,6 +20,14 @@ func _process(delta: float) -> void:
time_alive += delta time_alive += delta
func spawn_damage_indicator(pos):
if damage > 0:
var marker = damage_particle_scene.instantiate()
get_tree().root.add_child(marker)
marker.set_number(damage)
marker.position = pos
func _on_body_entered(_body: Node) -> void: func _on_body_entered(_body: Node) -> void:
pass # Replace with function body. pass # Replace with function body.

View File

@ -0,0 +1,38 @@
extends Resource
class_name PlayerGraphicsSettings
const SAVE_PATH := "user://graphics_settings.tres"
@export var hfov := 100.0
@export var vsync_mode := 1
@export var aa_mode := 0
@export var windowed_mode := 0
func apply_graphical_settings(viewport):
DisplayServer.window_set_vsync_mode(vsync_mode)
match aa_mode:
0:
viewport.use_taa = false
viewport.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
1:
viewport.use_taa = false
viewport.screen_space_aa = Viewport.SCREEN_SPACE_AA_FXAA
2:
viewport.use_taa = true
viewport.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
match windowed_mode:
0:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
1:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
2:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_EXCLUSIVE_FULLSCREEN)
func save_profile_to_disk():
ResourceSaver.save(self, SAVE_PATH)
static func load_profile_from_disk() -> PlayerGraphicsSettings:
if ResourceLoader.exists(SAVE_PATH):
return ResourceLoader.load(SAVE_PATH)
return PlayerGraphicsSettings.new()

View File

@ -7,10 +7,6 @@ const SAVE_PATH := "user://preferences.tres"
@export var invert_lookY := false @export var invert_lookY := false
@export var invert_lookX := false @export var invert_lookX := false
@export var toggle_sprint := false @export var toggle_sprint := false
@export var vsync_mode := 1
@export var aa_mode := 0
@export var windowed_mode := 0
@export var hfov := 100.0
@export var fixed_minimap := false @export var fixed_minimap := false
@export var display_tower_damage_indicators := true @export var display_tower_damage_indicators := true
@export var display_self_damage_indicators := true @export var display_self_damage_indicators := true
@ -18,27 +14,6 @@ const SAVE_PATH := "user://preferences.tres"
@export var display_status_effect_damage_indicators := true @export var display_status_effect_damage_indicators := true
func apply_graphical_settings(viewport):
DisplayServer.window_set_vsync_mode(vsync_mode)
match aa_mode:
0:
viewport.use_taa = false
viewport.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
1:
viewport.use_taa = false
viewport.screen_space_aa = Viewport.SCREEN_SPACE_AA_FXAA
2:
viewport.use_taa = true
viewport.screen_space_aa = Viewport.SCREEN_SPACE_AA_DISABLED
match windowed_mode:
0:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_WINDOWED)
1:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_FULLSCREEN)
2:
DisplayServer.window_set_mode(DisplayServer.WINDOW_MODE_EXCLUSIVE_FULLSCREEN)
func save_profile_to_disk(): func save_profile_to_disk():
ResourceSaver.save(self, SAVE_PATH) ResourceSaver.save(self, SAVE_PATH)
static func load_profile_from_disk() -> PlayerPreferences: static func load_profile_from_disk() -> PlayerPreferences:

View File

@ -6,6 +6,8 @@ func shoot():
super.shoot() super.shoot()
if targeted_enemy and is_instance_valid(targeted_enemy) and targeted_enemy.alive: if targeted_enemy and is_instance_valid(targeted_enemy) and targeted_enemy.alive:
targeted_enemy.damage(damage) targeted_enemy.damage(damage)
if Data.preferences.display_tower_damage_indicators:
spawn_damage_indicator(targeted_enemy.sprite.global_position)
@rpc("reliable") @rpc("reliable")

View File

@ -28,3 +28,4 @@ func networked_spawn_projectile(peer_id):
projectile.name = base_name + str(peer_id) + str(projectile_id) projectile.name = base_name + str(peer_id) + str(projectile_id)
get_tree().root.add_child(projectile) get_tree().root.add_child(projectile)
projectile_id += 1 projectile_id += 1
return projectile

View File

@ -0,0 +1,32 @@
extends StatusApplyingTower
class_name RangeAffectingTower
func _physics_process(_delta: float) -> void:
if !is_multiplayer_authority():
return
var enemies_in_range = []
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:
continue
enemies_in_range.append(enemy)
if time_since_firing >= time_between_shots:
time_since_firing -= time_between_shots
for enemy in enemies_in_range:
fire(enemy)
func fire(target):
if is_instance_valid(target) and target.alive:
target.damage(damage)
target.status_manager.add_effect(build_status_object())
if Data.preferences.display_tower_damage_indicators:
spawn_damage_indicator(target.sprite.global_position)
if is_multiplayer_authority():
networked_fire.rpc(get_tree().root.get_path_to(target))
@rpc("reliable")
func networked_fire(target_node_path):
var target = get_tree().root.get_node(target_node_path)
fire(target)

View File

@ -0,0 +1,48 @@
extends Tower
class_name ShapecastTower
@export var shapecast : ShapeCast3D
@export var particlesystem : GPUParticles3D
@export var status_stats : StatusStats
func _process(delta: float) -> void:
super._process(delta)
if targeted_enemy:
particlesystem.emitting = true
else:
particlesystem.emitting = false
func shoot():
for index in shapecast.get_collision_count():
var target = shapecast.get_collider(index) as CharacterBody3D
hit(target)
func aim():
yaw_model.look_at(targeted_enemy.global_position)
pitch_model.look_at(targeted_enemy.global_position)
pitch_model.rotation.x = 0.0
func hit(target):
if is_instance_valid(target) and target.alive:
target.damage(damage)
if Data.preferences.display_tower_damage_indicators:
spawn_damage_indicator(target.sprite.global_position)
target.status_manager.add_effect(build_status_object())
if is_multiplayer_authority():
networked_hit.rpc(get_tree().root.get_path_to(target))
func build_status_object() -> StatusEffect:
var status = StatusEffect.new()
status.stats = status_stats
return status
@rpc("reliable")
func networked_hit(target_node_path):
var target = get_tree().root.get_node(target_node_path)
hit(target)

View File

@ -7,6 +7,7 @@ class_name Tower
@export var yaw_model : MeshInstance3D @export var yaw_model : MeshInstance3D
@export var range_indicator : CSGSphere3D @export var range_indicator : CSGSphere3D
var damage_particle_scene = preload("res://Scenes/damage_particle.tscn")
var base_name var base_name
var targeted_enemy var targeted_enemy
var time_since_firing := 0.0 var time_since_firing := 0.0
@ -82,6 +83,14 @@ func shoot():
networked_shoot.rpc() networked_shoot.rpc()
func spawn_damage_indicator(pos):
if damage > 0:
var marker = damage_particle_scene.instantiate()
get_tree().root.add_child(marker)
marker.set_number(damage)
marker.position = pos
@rpc("reliable") @rpc("reliable")
func networked_shoot(): func networked_shoot():
shoot() shoot()

View File

@ -24,6 +24,7 @@ func networked_spawn_projectile(peer_id, direction):
projectile.damage = damage projectile.damage = damage
projectile.direction = direction projectile.direction = direction
projectile.force = force projectile.force = force
projectile.owner_id = peer_id
projectile.name = str(peer_id) + str(projectile_id) projectile.name = str(peer_id) + str(projectile_id)
get_tree().root.add_child(projectile) get_tree().root.add_child(projectile)
projectile_id += 1 projectile_id += 1

View File

@ -0,0 +1,55 @@
extends Weapon
class_name ShapecastWeapon
@export var shapecast : ShapeCast3D
@export var range_debug_indicator : CSGSphere3D
@export var status_stats : StatusStats
@export var particles : GPUParticles3D
var attack_range := 0.0
func _ready() -> void:
super._ready()
attack_range = stats.get_attribute("Range")
range_debug_indicator.radius = attack_range
shapecast.shape.size.z = attack_range
shapecast.target_position = -hero.camera.basis.z * (attack_range / 2.0)
func _process(delta: float) -> void:
super._process(delta)
particles.emitting = trigger_held
func shoot():
super.shoot()
for index in shapecast.get_collision_count():
var target = shapecast.get_collider(index)
if target:
var target_hitbox = target.shape_owner_get_owner(shapecast.get_collider_shape(index))
if target_hitbox is Hitbox:
hit(target, target_hitbox)
if Data.preferences.display_self_damage_indicators:
spawn_damage_indicator(target.sprite.global_position)
networked_hit.rpc(get_tree().root.get_path_to(target), get_tree().root.get_path_to(target_hitbox))
func build_status_object() -> StatusEffect:
var status = StatusEffect.new()
status.stats = status_stats
return status
func hit(target, target_hitbox : Hitbox):
target_hitbox.damage(damage)
target.status_manager.add_effect(build_status_object())
@rpc("reliable")
func networked_hit(target_path : String, target_hitbox_path : String):
var target = get_tree().root.get_node(target_path)
var target_hitbox = get_tree().root.get_node(target_hitbox_path) as Hitbox
hit(target, target_hitbox)
if Data.preferences.display_party_damage_indicators:
spawn_damage_indicator(target.sprite.global_position)

View File

@ -30,4 +30,4 @@ func view_weapon():
func view_tower(): func view_tower():
description.text = process_card_text(stats.tower_stats) description.text = process_card_text(stats.tower_stats)
target_label.text = str(stats.tower_stats.target_type) target_label.text = str(Data.TargetType.keys()[stats.tower_stats.target_type])

View File

@ -4,42 +4,70 @@ class_name Chatbox
signal opened signal opened
signal closed signal closed
@export var input_line : LineEdit
@export var textbox : RichTextLabel
@export var text_panel : PanelContainer
@export var fade_timer : Timer
var text_selected := false var text_selected := false
var username := "default" var username := "default"
var color = Color.TOMATO
var fading = true
var time_to_fade = 2.0
var time_since_started_fading = 2.0
func _process(delta: float) -> void:
if fading:
time_since_started_fading += delta
else:
time_since_started_fading = 0.0
textbox.modulate.a = lerpf(1.0, 0.0, time_since_started_fading / time_to_fade)
text_panel.modulate.a = lerpf(1.0, 0.0, time_since_started_fading / time_to_fade)
func _input(event: InputEvent) -> void: func _input(event: InputEvent) -> void:
if !text_selected and event.is_action_pressed("Open Text Chat"): if !text_selected and event.is_action_pressed("Open Text Chat"):
get_viewport().set_input_as_handled() get_viewport().set_input_as_handled()
opened.emit() opened.emit()
$VBoxContainer/LineEdit.visible = true input_line.visible = true
$VBoxContainer/LineEdit.grab_focus() input_line.grab_focus()
text_selected = true text_selected = true
fading = false
return return
if text_selected and event is InputEventKey and event.pressed == true: if text_selected and event is InputEventKey and event.pressed == true:
if event.keycode == KEY_ENTER: if event.keycode == KEY_ENTER:
get_viewport().set_input_as_handled() get_viewport().set_input_as_handled()
closed.emit() closed.emit()
$VBoxContainer/LineEdit.deselect() input_line.deselect()
$VBoxContainer/LineEdit.visible = false input_line.visible = false
text_selected = false text_selected = false
if $VBoxContainer/LineEdit.text.length() != 0: if input_line.text.length() != 0:
if $VBoxContainer/LineEdit.text.begins_with("/"): if input_line.text.begins_with("/"):
Game.parse_command($VBoxContainer/LineEdit.text, multiplayer.get_unique_id()) Game.parse_command(input_line.text, multiplayer.get_unique_id())
fade_timer.start()
else: else:
rpc("append_message", username, $VBoxContainer/LineEdit.text) append_message.rpc(username, color, input_line.text)
$VBoxContainer/LineEdit.clear() input_line.clear()
if event.keycode == KEY_ESCAPE: if event.keycode == KEY_ESCAPE:
get_viewport().set_input_as_handled() get_viewport().set_input_as_handled()
closed.emit() closed.emit()
$VBoxContainer/LineEdit.deselect() input_line.deselect()
$VBoxContainer/LineEdit.visible = false input_line.visible = false
text_selected = false text_selected = false
fade_timer.start()
func change_username(old_name, new_name): func change_username(old_name, new_name):
append_message("server", old_name + " has changed their display name to " + new_name) append_message("SERVER", Color.TOMATO, old_name + " has changed their display name to " + new_name)
@rpc("reliable","call_local","any_peer") @rpc("reliable","call_local","any_peer")
func append_message(user, content): func append_message(user, user_color, content):
$VBoxContainer/RichTextLabel.append_text("[" + user + "] " + content + "\n") textbox.append_text("[[color=" + user_color.to_html() + "]" + user + "[color=white]] " + content + "\n")
fading = false
fade_timer.start()
func _on_timer_timeout() -> void:
fading = true

View File

@ -4,6 +4,7 @@ var characters : Array[HeroClass]
var cards : Array[Card] var cards : Array[Card]
var enemies : Array[Enemy] var enemies : Array[Enemy]
var keymaps : Array[PlayerKeymap] var keymaps : Array[PlayerKeymap]
var graphics : PlayerGraphicsSettings
var preferences : PlayerPreferences var preferences : PlayerPreferences
var player_profile : PlayerProfile var player_profile : PlayerProfile
var player_keymap : PlayerKeymap var player_keymap : PlayerKeymap
@ -22,10 +23,11 @@ var rarity_weights = {
} }
func _ready() -> void: func _ready() -> void:
graphics = PlayerGraphicsSettings.load_profile_from_disk()
graphics.apply_graphical_settings(get_viewport())
player_profile = PlayerProfile.load_profile_from_disk() player_profile = PlayerProfile.load_profile_from_disk()
preferences = PlayerPreferences.load_profile_from_disk() preferences = PlayerPreferences.load_profile_from_disk()
player_keymap = PlayerKeymap.load_profile_from_disk() player_keymap = PlayerKeymap.load_profile_from_disk()
preferences.apply_graphical_settings(get_viewport())
player_keymap.apply() player_keymap.apply()
characters.append(preload("res://PCs/Red/red.tres")) characters.append(preload("res://PCs/Red/red.tres"))
@ -39,10 +41,10 @@ func _ready() -> void:
cards.append(preload("res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres")) cards.append(preload("res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres"))
#Uncommon #Uncommon
cards.append(preload("res://PCs/Universal/ClassCards/Blowdart/card_blowdart.tres")) cards.append(preload("res://PCs/Universal/ClassCards/Blowdart/card_blowdart.tres"))
#cards.append(preload("res://PCs/Universal/ClassCards/Refridgerator/card_refridgerator.tres")) cards.append(preload("res://PCs/Universal/ClassCards/Refrigerator/card_refrigerator.tres"))
cards.append(preload("res://PCs/Universal/ClassCards/GlueLauncher/card_glue_launcher.tres")) cards.append(preload("res://PCs/Universal/ClassCards/GlueLauncher/card_glue_launcher.tres"))
#Rare #Rare
#cards.append(preload("res://PCs/Universal/ClassCards/Flamethrower/card_flamethrower.tres")) cards.append(preload("res://PCs/Universal/ClassCards/Flamethrower/card_flamethrower.tres"))
#cards.append(preload("res://PCs/Universal/ClassCards/DamageEnhancer/card_damage_enhancer.tres")) #cards.append(preload("res://PCs/Universal/ClassCards/DamageEnhancer/card_damage_enhancer.tres"))
#cards.append(preload("res://PCs/Universal/ClassCards/SpeedEnhancer/card_speed_enhancer.tres")) #cards.append(preload("res://PCs/Universal/ClassCards/SpeedEnhancer/card_speed_enhancer.tres"))
#Epic #Epic
@ -51,7 +53,7 @@ func _ready() -> void:
#cards.append(preload("res://PCs/Universal/ClassCards/GammaLaser/card_gamma_laser.tres")) #cards.append(preload("res://PCs/Universal/ClassCards/GammaLaser/card_gamma_laser.tres"))
#Legendary #Legendary
cards.append(preload("res://PCs/Universal/ClassCards/Sniper/card_sniper.tres")) cards.append(preload("res://PCs/Universal/ClassCards/Sniper/card_sniper.tres"))
#cards.append(preload("res://PCs/Universal/ClassCards/Reactor/card_reactor.tres")) cards.append(preload("res://PCs/Universal/ClassCards/Reactor/card_reactor.tres"))
#cards.append(preload("res://PCs/Universal/ClassCards/Lightning/card_lightning.tres")) #cards.append(preload("res://PCs/Universal/ClassCards/Lightning/card_lightning.tres"))
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog.tres")) enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog.tres"))

View File

@ -25,6 +25,7 @@ var wave := 0
var upcoming_wave var upcoming_wave
var pot : float var pot : float
var UILayer : CanvasLayer var UILayer : CanvasLayer
var chatbox : Chatbox
func _ready() -> void: func _ready() -> void:
@ -41,6 +42,12 @@ func parse_command(text : String, peer_id : int):
if x.title == gift_name: if x.title == gift_name:
gift = x gift = x
connected_players_nodes[peer_id].inventory.add(gift) connected_players_nodes[peer_id].inventory.add(gift)
if text.substr(1, 2) == "tr":
chatbox.append_message("SERVER", Color.TOMATO, "[color=#f7a8b8]t[color=#55cdfc]r[color=#ffffff]a[color=#55cdfc]n[color=#f7a8b8]s [color=#e50000]r[color=#ff8d00]i[color=#ffee00]g[color=#028121]h[color=#004cff]t[color=#760088]s[color=white]!!")
# if text.substr(1, 17) == "show tower ranges":
# pass
# if text.substr(1, 20) = "show gauntlet ranges":
# pass
func spawn_level(): func spawn_level():
@ -63,7 +70,6 @@ func spawn_players(player_array, player_profiles, chatbox_open_signal, chatbox_c
player.position = level.player_spawns[p_i].global_position player.position = level.player_spawns[p_i].global_position
player.profile = player_profiles[peer_id] player.profile = player_profiles[peer_id]
player.hero_class = Data.characters[player_profiles[peer_id].preferred_class] player.hero_class = Data.characters[player_profiles[peer_id].preferred_class]
print(player.hero_class.hero_name)
player.ready_state_changed.connect(ready_player) player.ready_state_changed.connect(ready_player)
if peer_id == multiplayer.get_unique_id(): if peer_id == multiplayer.get_unique_id():
chatbox_open_signal.connect(player.pause) chatbox_open_signal.connect(player.pause)
@ -99,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 / 100)) networked_set_upcoming_wave.rpc(new_wave, 6 + floori(spawn_power / 50))
@rpc("reliable", "call_local") @rpc("reliable", "call_local")

View File

@ -0,0 +1,46 @@
extends VBoxContainer
class_name GameplayOptionsMenu
@export var look_sens_slider : HSlider
@export var look_sens_input : SpinBox
@export var toggle_sprint_checkbox : CheckButton
@export var invert_lookY : CheckButton
@export var invert_lookX : CheckButton
@export var fixed_minimap : CheckButton
@export var tower_damage : Button
@export var self_damage : Button
@export var party_damage : Button
@export var status_damage : Button
func _ready() -> void:
look_sens_slider.value = Data.preferences.mouse_sens
look_sens_input.value = Data.preferences.mouse_sens
toggle_sprint_checkbox.button_pressed = Data.preferences.toggle_sprint
invert_lookY.button_pressed = Data.preferences.invert_lookY
invert_lookX.button_pressed = Data.preferences.invert_lookX
fixed_minimap.button_pressed = Data.preferences.fixed_minimap
tower_damage.button_pressed = Data.preferences.display_tower_damage_indicators
self_damage.button_pressed = Data.preferences.display_self_damage_indicators
party_damage.button_pressed = Data.preferences.display_party_damage_indicators
status_damage.button_pressed = Data.preferences.display_status_effect_damage_indicators
func save() -> void:
Data.preferences.mouse_sens = look_sens_slider.value
Data.preferences.toggle_sprint = toggle_sprint_checkbox.button_pressed
Data.preferences.invert_lookY = invert_lookY.button_pressed
Data.preferences.invert_lookX = invert_lookX.button_pressed
Data.preferences.fixed_minimap = fixed_minimap.button_pressed
Data.preferences.display_tower_damage_indicators = tower_damage.button_pressed
Data.preferences.display_self_damage_indicators = self_damage.button_pressed
Data.preferences.display_party_damage_indicators = party_damage.button_pressed
Data.preferences.display_status_effect_damage_indicators = status_damage.button_pressed
func _on_mouse_sens_spin_box_value_changed(value: float) -> void:
look_sens_slider.value = value
func _on_mouse_sens_h_slider_value_changed(value: float) -> void:
look_sens_input.value = value

View File

@ -0,0 +1,36 @@
extends VBoxContainer
class_name GraphicsOptionsMenu
@export var fov_input : SpinBox
@export var fov_slider : HSlider
@export var vsync_dropdown : OptionButton
@export var aa_dropdown : OptionButton
@export var window_dropdown : OptionButton
func _ready():
fov_input.value = Data.graphics.hfov
fov_slider.value = Data.graphics.hfov
vsync_dropdown.selected = Data.graphics.vsync_mode
aa_dropdown.selected = Data.graphics.aa_mode
func save():
Data.graphics.hfov = fov_slider.value
Data.graphics.vsync_mode = vsync_dropdown.selected
Data.graphics.aa_mode = aa_dropdown.selected
Data.graphics.windowed_mode = window_dropdown.selected
func _on_fov_spin_box_value_changed(value: float) -> void:
if value < 40.0:
value = 40.0
if value > 160.0:
value = 160.0
fov_slider.value = value
Data.graphics.hfov = value
func _on_fov_h_slider_value_changed(value: float) -> void:
fov_input.value = value
Data.graphics.hfov = value

View File

@ -0,0 +1,63 @@
extends VBoxContainer
var keybind_popup = load("res://Scenes/UI/keybind_popup.tscn")
var keybind_boxes = []
var keybind_buttons = {}
var key_event
var selected_button
var selected_button_button
var listening_for_key := false
func _ready() -> void:
for index in Data.keymaps.size():
var map = Data.keymaps[index]
var button = Button.new()
button.text = map.title
button.pressed.connect(set_keymap.bind(index))
$HBoxContainer.add_child(button)
load_keybind_labels()
func set_keymap(keymap_index):
Data.player_keymap = Data.keymaps[keymap_index]
Data.player_keymap.apply()
load_keybind_labels()
func load_keybind_labels():
for box in keybind_boxes:
box.queue_free()
keybind_boxes.clear()
for action in InputMap.get_actions():
if !action.begins_with("ui_"):
var box = HBoxContainer.new()
var alabel = Label.new()
var elabel = Button.new()
alabel.text = action
if InputMap.action_get_events(action).size() > 0:
elabel.text = InputMap.action_get_events(action)[0].as_text()
elabel.size_flags_horizontal += Control.SIZE_EXPAND
alabel.size_flags_horizontal += Control.SIZE_EXPAND
alabel.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
alabel.size_flags_stretch_ratio = 2.0
#elabel.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
box.add_child(alabel)
box.add_child(elabel)
elabel.pressed.connect(_on_keybind_button_pressed.bind(elabel))
keybind_buttons[elabel] = action
$ScrollContainer/VBoxContainer.add_child(box)
keybind_boxes.append(box)
func _on_keybind_button_pressed(value: Button) -> void:
selected_button = keybind_buttons[value]
selected_button_button = value
var popup = keybind_popup.instantiate()
popup.event_detected.connect(change_key)
Game.UILayer.add_child(popup)
func change_key(event: InputEvent):
Data.player_keymap.replace_action_event(selected_button, event)
selected_button_button.text = event.as_text()

View File

@ -32,7 +32,7 @@ func _on_player_connected(peer_id):
func _on_player_disconnected(peer_id): func _on_player_disconnected(peer_id):
if chatbox: if chatbox:
chatbox.append_message("SERVER", connected_players_profiles[peer_id].display_name + " has disconnected!") chatbox.append_message("SERVER", Color.TOMATO, connected_players_profiles[peer_id].display_name + " has disconnected!")
connected_players_profiles.erase(peer_id) connected_players_profiles.erase(peer_id)
player_disconnected.emit(peer_id) player_disconnected.emit(peer_id)
@ -64,6 +64,7 @@ func setup_game(peer_id):
Game.spawn_level() Game.spawn_level()
scoreboard.all_players_ready.connect(start_game) scoreboard.all_players_ready.connect(start_game)
Game.game_restarted.connect(setup_the_ui) Game.game_restarted.connect(setup_the_ui)
Game.chatbox = chatbox
setup_the_ui() setup_the_ui()
chatbox.username = Data.player_profile.display_name chatbox.username = Data.player_profile.display_name
Data.player_profile.display_name_changed.connect(chatbox.change_username) Data.player_profile.display_name_changed.connect(chatbox.change_username)
@ -116,7 +117,7 @@ func add_player(new_player_profile_dict):
var new_player_peer_id = multiplayer.get_remote_sender_id() var new_player_peer_id = multiplayer.get_remote_sender_id()
var new_player_profile = PlayerProfile.from_dict(new_player_profile_dict) var new_player_profile = PlayerProfile.from_dict(new_player_profile_dict)
if chatbox: if chatbox:
chatbox.append_message("SERVER", new_player_profile.display_name + " has connected!") chatbox.append_message("SERVER", Color.TOMATO, new_player_profile.display_name + " has connected!")
connected_players_profiles[new_player_peer_id] = new_player_profile connected_players_profiles[new_player_peer_id] = new_player_profile
player_connected.emit(new_player_peer_id, new_player_profile) player_connected.emit(new_player_peer_id, new_player_profile)

View File

@ -1,137 +1,14 @@
extends Control extends Control
class_name OptionsMenu class_name OptionsMenu
@export var keybind_popup : PackedScene
@export var look_sens_slider : HSlider
@export var look_sens_input : SpinBox
@export var toggle_sprint_checkbox : CheckButton
@export var vsync_dropdown : OptionButton
@export var aa_dropdown : OptionButton
@export var window_dropdown : OptionButton
@export var invert_lookY : CheckButton
@export var invert_lookX : CheckButton
@export var fov_input : SpinBox
@export var fov_slider : HSlider
@export var fixed_minimap : CheckButton
@export var tower_damage : Button
@export var self_damage : Button
@export var party_damage : Button
@export var status_damage : Button
var keybind_boxes = []
var keybind_buttons = {}
var key_event
var selected_button
var selected_button_button
var listening_for_key := false
func _ready():
look_sens_slider.value = Data.preferences.mouse_sens
look_sens_input.value = Data.preferences.mouse_sens
toggle_sprint_checkbox.button_pressed = Data.preferences.toggle_sprint
vsync_dropdown.selected = Data.preferences.vsync_mode
aa_dropdown.selected = Data.preferences.aa_mode
invert_lookY.button_pressed = Data.preferences.invert_lookY
invert_lookX.button_pressed = Data.preferences.invert_lookX
fov_input.value = Data.preferences.hfov
fov_slider.value = Data.preferences.hfov
fixed_minimap.button_pressed = Data.preferences.fixed_minimap
tower_damage.button_pressed = Data.preferences.display_tower_damage_indicators
self_damage.button_pressed = Data.preferences.display_self_damage_indicators
party_damage.button_pressed = Data.preferences.display_party_damage_indicators
status_damage.button_pressed = Data.preferences.display_status_effect_damage_indicators
for index in Data.keymaps.size():
var map = Data.keymaps[index]
var button = Button.new()
button.text = map.title
button.pressed.connect(set_keymap.bind(index))
$VBoxContainer/TabContainer/Keybinds/HBoxContainer.add_child(button)
load_keybind_labels()
func set_keymap(keymap_index):
Data.player_keymap = Data.keymaps[keymap_index]
Data.player_keymap.apply()
load_keybind_labels()
func load_keybind_labels():
for box in keybind_boxes:
box.queue_free()
keybind_boxes.clear()
for action in InputMap.get_actions():
if !action.begins_with("ui_"):
var box = HBoxContainer.new()
var alabel = Label.new()
var elabel = Button.new()
alabel.text = action
if InputMap.action_get_events(action).size() > 0:
elabel.text = InputMap.action_get_events(action)[0].as_text()
elabel.size_flags_horizontal += Control.SIZE_EXPAND
alabel.size_flags_horizontal += Control.SIZE_EXPAND
alabel.horizontal_alignment = HORIZONTAL_ALIGNMENT_CENTER
alabel.size_flags_stretch_ratio = 2.0
#elabel.horizontal_alignment = HORIZONTAL_ALIGNMENT_RIGHT
box.add_child(alabel)
box.add_child(elabel)
elabel.pressed.connect(_on_keybind_button_pressed.bind(elabel))
keybind_buttons[elabel] = action
$VBoxContainer/TabContainer/Keybinds/ScrollContainer/VBoxContainer.add_child(box)
keybind_boxes.append(box)
func _on_cancel_pressed() -> void: func _on_cancel_pressed() -> void:
queue_free() queue_free()
func _on_confirm_pressed() -> void: func _on_confirm_pressed() -> void:
Data.preferences.mouse_sens = look_sens_slider.value Data.graphics.apply_graphical_settings(get_viewport())
Data.preferences.toggle_sprint = toggle_sprint_checkbox.button_pressed Data.graphics.save_profile_to_disk()
Data.preferences.vsync_mode = vsync_dropdown.selected
Data.preferences.aa_mode = aa_dropdown.selected
Data.preferences.windowed_mode = window_dropdown.selected
Data.preferences.invert_lookY = invert_lookY.button_pressed
Data.preferences.invert_lookX = invert_lookX.button_pressed
Data.preferences.fixed_minimap = fixed_minimap.button_pressed
Data.preferences.display_tower_damage_indicators = tower_damage.button_pressed
Data.preferences.display_self_damage_indicators = self_damage.button_pressed
Data.preferences.display_party_damage_indicators = party_damage.button_pressed
Data.preferences.display_status_effect_damage_indicators = status_damage.button_pressed
Data.preferences.apply_graphical_settings(get_viewport())
Data.preferences.save_profile_to_disk() Data.preferences.save_profile_to_disk()
Data.player_keymap.save_profile_to_disk() Data.player_keymap.save_profile_to_disk()
queue_free() queue_free()
func _on_mouse_sens_spin_box_value_changed(value: float) -> void:
look_sens_slider.value = value
func _on_mouse_sens_h_slider_value_changed(value: float) -> void:
look_sens_input.value = value
func _on_fov_spin_box_value_changed(value: float) -> void:
if value < 40.0:
value = 40.0
if value > 160.0:
value = 160.0
fov_slider.value = value
Data.preferences.hfov = value
func _on_fov_h_slider_value_changed(value: float) -> void:
fov_input.value = value
Data.preferences.hfov = value
func _on_keybind_button_pressed(value: Button) -> void:
selected_button = keybind_buttons[value]
selected_button_button = value
var popup = keybind_popup.instantiate()
popup.event_detected.connect(change_key)
add_child(popup)
func change_key(event: InputEvent):
Data.player_keymap.replace_action_event(selected_button, event)
selected_button_button.text = event.as_text()

View File

@ -19,6 +19,7 @@ func setup_game():
scoreboard.add_player(1, Data.player_profile) scoreboard.add_player(1, Data.player_profile)
scoreboard.all_players_ready.connect(start_game) scoreboard.all_players_ready.connect(start_game)
Game.game_restarted.connect(setup_the_ui) Game.game_restarted.connect(setup_the_ui)
Game.chatbox = chatbox
setup_the_ui() setup_the_ui()
chatbox.username = Data.player_profile.display_name chatbox.username = Data.player_profile.display_name
Data.player_profile.display_name_changed.connect(chatbox.change_username) Data.player_profile.display_name_changed.connect(chatbox.change_username)

View File

@ -2,7 +2,7 @@ extends StaticBody3D
class_name TowerBase class_name TowerBase
@export var inventory : Inventory @export var inventory : Inventory
@export var block : CSGBox3D @export var block : Node3D
@export var collider : CollisionShape3D @export var collider : CollisionShape3D
@export var minimap_icon : Sprite3D @export var minimap_icon : Sprite3D
@ -27,7 +27,7 @@ func remove_card() -> Card:
func set_material(value: StandardMaterial3D): func set_material(value: StandardMaterial3D):
block.material = value block.material_override = value
func toggle_collision(): func toggle_collision():
@ -40,7 +40,7 @@ func networked_spawn_tower():
tower.stats = inventory.selected_item.tower_stats tower.stats = inventory.selected_item.tower_stats
tower.name = "tower" tower.name = "tower"
tower.base_name = name tower.base_name = name
tower.position = Vector3.UP tower.position = Vector3(0, 1.2, 0)
minimap_icon.modulate = Color.RED minimap_icon.modulate = Color.RED
add_child(tower) add_child(tower)

View File

@ -80,7 +80,7 @@ curve = SubResource("Curve3D_suxqu")
script = ExtResource("11_d7ofl") script = ExtResource("11_d7ofl")
[node name="GroundSpawn" parent="." node_paths=PackedStringArray("path", "dest", "enemy_path") instance=ExtResource("3_5imwp")] [node name="GroundSpawn" parent="." node_paths=PackedStringArray("path", "dest", "enemy_path") instance=ExtResource("3_5imwp")]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20, 0.5, 0) transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -29.9396, 0.5, 0)
path = NodePath("../VisualizedPath") path = NodePath("../VisualizedPath")
type = 1 type = 1
dest = NodePath("../EnemyGoal") dest = NodePath("../EnemyGoal")
@ -541,8 +541,8 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1)
[node name="AStarGraph3D" type="Node3D" parent="." node_paths=PackedStringArray("start", "end", "spawner", "visualized_path", "tower_path")] [node name="AStarGraph3D" type="Node3D" parent="." node_paths=PackedStringArray("start", "end", "spawner", "visualized_path", "tower_path")]
script = ExtResource("11_07ukk") script = ExtResource("11_07ukk")
grid_size = Vector2i(19, 9) grid_size = Vector2i(15, 7)
point_gap = 1.5 point_gap = 2.0
start = NodePath("../GroundSpawn") start = NodePath("../GroundSpawn")
end = NodePath("../EnemyGoal") end = NodePath("../EnemyGoal")
spawner = NodePath("../GroundSpawn") spawner = NodePath("../GroundSpawn")

File diff suppressed because one or more lines are too long

BIN
funbox.glb Normal file

Binary file not shown.

45
funbox.glb.import Normal file
View File

@ -0,0 +1,45 @@
[remap]
importer="scene"
importer_version=1
type="PackedScene"
uid="uid://dx0ixlcxcxpcg"
path="res://.godot/imported/funbox.glb-d1e31206a7865f3af16dc0128c2d024a.scn"
[deps]
source_file="res://funbox.glb"
dest_files=["res://.godot/imported/funbox.glb-d1e31206a7865f3af16dc0128c2d024a.scn"]
[params]
nodes/root_type="Node3D"
nodes/root_name="Scene Root"
nodes/apply_root_scale=true
nodes/root_scale=1.0
meshes/ensure_tangents=true
meshes/generate_lods=true
meshes/create_shadow_meshes=true
meshes/light_baking=1
meshes/lightmap_texel_size=0.2
skins/use_named_skins=true
animation/import=true
animation/fps=30
animation/trimming=false
animation/remove_immutable_tracks=true
import_script/path=""
_subresources={
"meshes": {
"funbox_Cube_001": {
"generate/lightmap_uv": 0,
"generate/lods": 0,
"generate/shadow_meshes": 0,
"lods/normal_merge_angle": 60.0,
"lods/normal_split_angle": 25.0,
"save_to_file/enabled": true,
"save_to_file/make_streamable": "",
"save_to_file/path": "res://textmesh.res"
}
}
}
gltf/embedded_image_handling=0

13
funbox.tscn Normal file
View File

@ -0,0 +1,13 @@
[gd_scene load_steps=4 format=3 uid="uid://cbspcgdno2u5g"]
[ext_resource type="PackedScene" uid="uid://dx0ixlcxcxpcg" path="res://funbox.glb" id="1_s5q5d"]
[ext_resource type="Texture2D" uid="uid://bmor4v4j7krgh" path="res://funboxtex.png" id="2_e8jej"]
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ppe8m"]
albedo_texture = ExtResource("2_e8jej")
texture_filter = 0
[node name="funbox" instance=ExtResource("1_s5q5d")]
[node name="Cube" parent="." index="0"]
surface_material_override/0 = SubResource("StandardMaterial3D_ppe8m")

BIN
funboxtex.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

34
funboxtex.png.import Normal file
View File

@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bmor4v4j7krgh"
path="res://.godot/imported/funboxtex.png-08d477b8edff9115126116319e7f210a.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://funboxtex.png"
dest_files=["res://.godot/imported/funboxtex.png-08d477b8edff9115126116319e7f210a.ctex"]
[params]
compress/mode=0
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

BIN
textmesh.res Normal file

Binary file not shown.