multiplayer pretty much works now i think

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

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="Resource" uid="uid://5ywipj3632u8" path="res://Resources/TurretStats/flametower.tres" id="2_80w0f"]
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="2_ukaax"]
[ext_resource type="PackedScene" uid="uid://dvqk2lysu02gf" path="res://PCs/Universal/ClassCards/Flamethrower/tower_flamethrower.tscn" id="3_yfmjg"]
[ext_resource type="Resource" uid="uid://c4ihsd13o1esd" path="res://Resources/WeaponStats/flamethrower.tres" id="4_rdoaa"]
[ext_resource type="PackedScene" uid="uid://cprppqfd2wf6s" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.tscn" id="5_6v5br"]
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="2_ocjdv"]
[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://dhv7m4lky7bd8" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.tscn" id="4_800j1"]
[ext_resource type="PackedScene" uid="uid://dkoj1766ygo3f" path="res://PCs/Universal/ClassCards/Flamethrower/tower_flamethrower.tscn" id="4_rgkdc"]
[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]
script = ExtResource("1_xmwih")
title = "Flamethrower"
rarity = 2
faction = 0
sprite = ExtResource("2_ukaax")
turret = ExtResource("3_yfmjg")
weapon = ExtResource("5_6v5br")
weapon_stats = ExtResource("4_rdoaa")
tower_stats = ExtResource("2_80w0f")
sprite = SubResource("AtlasTexture_bcolm")
turret_scene = ExtResource("4_rgkdc")
weapon_scene = ExtResource("4_800j1")
weapon_stats = ExtResource("5_qi4e4")
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
class_name FlameyTower
@export var shapecast : ShapeCast3D
@export var particlesystem : GPUParticles3D
@export var status_stats : StatusStats
extends ShapecastTower
class_name FlamethrowerTower
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
var status = StatusOnFire.new()
status.stats = status_stats
target.status_manager.add_effect(status)
func aim():
model.look_at(targeted_enemy.global_position)
model.rotation.x = 0.0
func build_status_object() -> StatusEffect:
var status = StatusDoT.new()
status.stats = status_stats
return status

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="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="2_yo2b7"]
[ext_resource type="PackedScene" uid="uid://8uxu72vjo0cv" path="res://Scenes/Towers/shapecast_tower.tscn" id="1_jagpf"]
[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"]
offsets = PackedFloat32Array(0.00591716, 1)
colors = PackedColorArray(0.898039, 0.447059, 0, 1, 1, 0, 0, 0.34902)
[sub_resource type="BoxShape3D" id="BoxShape3D_r367g"]
size = Vector3(2, 2, 3)
[sub_resource type="GradientTexture1D" id="GradientTexture1D_4cwgw"]
gradient = SubResource("Gradient_kkqms")
[sub_resource type="Gradient" id="Gradient_ay233"]
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"]
direction = Vector3(0, 1, 0)
spread = 20.0
[sub_resource type="GradientTexture1D" id="GradientTexture1D_7rrxx"]
gradient = SubResource("Gradient_ay233")
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_r7587"]
direction = Vector3(0, 0, -1)
spread = 15.0
gravity = Vector3(0, 0, 0)
initial_velocity_min = 5.0
initial_velocity_max = 5.0
damping_min = 4.464
damping_max = 4.464
color_ramp = SubResource("GradientTexture1D_4cwgw")
initial_velocity_min = 3.0
initial_velocity_max = 3.0
color_ramp = SubResource("GradientTexture1D_7rrxx")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_ycjd1"]
transparency = 1
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_p8aw8"]
vertex_color_use_as_albedo = true
[sub_resource type="BoxMesh" id="BoxMesh_q83y7"]
material = SubResource("StandardMaterial3D_ycjd1")
[sub_resource type="BoxMesh" id="BoxMesh_h4c6o"]
material = SubResource("StandardMaterial3D_p8aw8")
size = Vector3(0.3, 0.3, 0.3)
[sub_resource type="BoxShape3D" id="BoxShape3D_vck5q"]
size = Vector3(2.145, 3.125, 2.415)
[node name="ShapecastTower" instance=ExtResource("1_jagpf")]
script = ExtResource("2_7vewc")
status_stats = ExtResource("3_aop2h")
stats = ExtResource("4_by7c8")
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_imgrm"]
transparency = 1
cull_mode = 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)
[node name="ShapeCast3D" parent="Yaw" index="0"]
shape = SubResource("BoxShape3D_r367g")
target_position = Vector3(0, 0, -2)
collision_mask = 4
[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" parent="Yaw/ShapeCast3D" index="0"]
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.534666)
amount = 16
process_material = SubResource("ParticleProcessMaterial_r7587")
draw_pass_1 = SubResource("BoxMesh_h4c6o")

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
@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 = StatusOnFire.new()
status.stats = status_stats
target.status_manager.add_effect(status)
func release_trigger():
trigger_held = false
particlesystem.emitting = false
func build_status_object() -> StatusEffect:
var status = StatusDoT.new()
status.stats = status_stats
return status

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="Script" path="res://PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.gd" id="2_18t5l"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_2sa8l"]
[ext_resource type="Resource" uid="uid://c4ihsd13o1esd" path="res://Resources/WeaponStats/flamethrower.tres" id="4_ih15j"]
[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_227rf"]
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_fqch8"]
[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"]
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="AtlasTexture" id="AtlasTexture_3hank"]
atlas = ExtResource("5_wdw3e")
region = 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)]
}
[node name="FlamethrowerWeapon" instance=ExtResource("1_ovmdp")]
script = ExtResource("2_227rf")
status_stats = ExtResource("3_fqch8")
stats = ExtResource("4_oafdt")
[sub_resource type="AnimationLibrary" id="AnimationLibrary_ntl6p"]
_data = {
"RESET": SubResource("Animation_n8b32"),
"shoot": SubResource("Animation_g0h8q")
}
[node name="Sprite3D" parent="." index="0"]
texture = SubResource("AtlasTexture_3hank")
[sub_resource type="BoxShape3D" id="BoxShape3D_q7gll"]
size = Vector3(3, 3, 4)
[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")
[node name="GPUParticles3D" parent="ShapeCast3D" index="0"]
process_material = ExtResource("6_idhp2")

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"