fixed the parity between air and land enemies. +added a lot of new cards
This commit is contained in:
parent
afc0a19b36
commit
b0f8a37f60
BIN
Assets/Textures/cold.png
Normal file
BIN
Assets/Textures/cold.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 846 B |
34
Assets/Textures/cold.png.import
Normal file
34
Assets/Textures/cold.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://vmcidp1sk5ns"
|
||||
path="res://.godot/imported/cold.png-d6238512b5699a5e9b2af6bd906a6a39.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/cold.png"
|
||||
dest_files=["res://.godot/imported/cold.png-d6238512b5699a5e9b2af6bd906a6a39.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=false
|
||||
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=1
|
BIN
Assets/Textures/poison.png
Normal file
BIN
Assets/Textures/poison.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 736 B |
34
Assets/Textures/poison.png.import
Normal file
34
Assets/Textures/poison.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cqah4a2pp40jt"
|
||||
path="res://.godot/imported/poison.png-ea0dd637ef8659da8cf41325fad75868.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/poison.png"
|
||||
dest_files=["res://.godot/imported/poison.png-ea0dd637ef8659da8cf41325fad75868.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=false
|
||||
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=1
|
BIN
Assets/Textures/radioactive.png
Normal file
BIN
Assets/Textures/radioactive.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 812 B |
34
Assets/Textures/radioactive.png.import
Normal file
34
Assets/Textures/radioactive.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bvc4b3v0wke84"
|
||||
path="res://.godot/imported/radioactive.png-04cf838821e787124b1d001a6a3548d0.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/radioactive.png"
|
||||
dest_files=["res://.godot/imported/radioactive.png-04cf838821e787124b1d001a6a3548d0.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=false
|
||||
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=1
|
@ -14,11 +14,12 @@ func _ready() -> void:
|
||||
cooldown = 1.0 / stats.fire_rate
|
||||
range_sphere.radius = stats.fire_range
|
||||
minimap_range_sphere.radius = stats.fire_range
|
||||
minimap_range_sphere.set_visible(true)
|
||||
#minimap_range_sphere.set_visible(true)
|
||||
|
||||
|
||||
func preview_range(value):
|
||||
range_sphere.set_visible(value)
|
||||
minimap_range_sphere.set_visible(value)
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
@ -48,7 +49,11 @@ func acquire_target():
|
||||
for enemy in get_tree().get_nodes_in_group("Enemies"):
|
||||
if model.global_position.distance_to(enemy.global_position) > stats.fire_range:
|
||||
continue
|
||||
if (most_progressed_enemy == null or enemy.progress >= most_progressed_enemy.progress) and enemy.stats.target_type & stats.can_target:
|
||||
var em_1 = enemy.movement_controller as EnemyMovement
|
||||
var em_2 : EnemyMovement
|
||||
if most_progressed_enemy != null:
|
||||
em_2 = most_progressed_enemy.movement_controller as EnemyMovement
|
||||
if (most_progressed_enemy == null or em_1.distance_remaining < em_2.distance_remaining) and enemy.stats.target_type & stats.can_target:
|
||||
most_progressed_enemy = enemy
|
||||
if most_progressed_enemy != null:
|
||||
targeted_enemy = most_progressed_enemy
|
||||
|
10
PCs/Universal/ClassCards/Blowdart/blowdarttower.gd
Normal file
10
PCs/Universal/ClassCards/Blowdart/blowdarttower.gd
Normal file
@ -0,0 +1,10 @@
|
||||
extends Tower
|
||||
class_name BlowdartTower
|
||||
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
|
||||
func shoot():
|
||||
var status = StatusPoison.new()
|
||||
status.stats = status_stats
|
||||
targeted_enemy.status_manager.add_effect(status)
|
17
PCs/Universal/ClassCards/Blowdart/blowdartweapon.gd
Normal file
17
PCs/Universal/ClassCards/Blowdart/blowdartweapon.gd
Normal file
@ -0,0 +1,17 @@
|
||||
extends Weapon
|
||||
class_name BlowdartWeapon
|
||||
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
func shoot():
|
||||
if other_cooldown <= 0 and stats != null:
|
||||
other_cooldown = cooldown
|
||||
$AnimationPlayer.play("shoot")
|
||||
if $RayCast3D.is_colliding():
|
||||
var target = $RayCast3D.get_collider()
|
||||
if target != null:
|
||||
var target_hitbox = target.shape_owner_get_owner($RayCast3D.get_collider_shape())
|
||||
if target_hitbox is Hitbox:
|
||||
var status = StatusPoison.new()
|
||||
status.stats = status_stats
|
||||
target.status_manager.add_effect(status)
|
19
PCs/Universal/ClassCards/Blowdart/card_blowdart.tres
Normal file
19
PCs/Universal/ClassCards/Blowdart/card_blowdart.tres
Normal file
@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dnoi0fx0ppsrf"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_vm4gs"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_lyppa"]
|
||||
[ext_resource type="Resource" uid="uid://by1gyra5a4aks" path="res://Resources/TurretStats/blowdart.tres" id="3_ybbbf"]
|
||||
[ext_resource type="PackedScene" uid="uid://qkvo6ibgfrlb" path="res://PCs/Universal/ClassCards/Blowdart/tower_blowdart.tscn" id="4_55xb7"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqo6wwf5vbilg" path="res://PCs/Universal/ClassCards/Blowdart/weapon_blowdart.tscn" id="5_c4q5e"]
|
||||
[ext_resource type="Resource" uid="uid://dhegsd45xi7na" path="res://Resources/WeaponStats/blowdart.tres" id="6_ii6x2"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_vm4gs")
|
||||
title = "Blowdart"
|
||||
rarity = 1
|
||||
faction = 0
|
||||
sprite = ExtResource("2_lyppa")
|
||||
turret = ExtResource("4_55xb7")
|
||||
weapon = ExtResource("5_c4q5e")
|
||||
weapon_stats = ExtResource("6_ii6x2")
|
||||
tower_stats = ExtResource("3_ybbbf")
|
39
PCs/Universal/ClassCards/Blowdart/tower_blowdart.tscn
Normal file
39
PCs/Universal/ClassCards/Blowdart/tower_blowdart.tscn
Normal file
@ -0,0 +1,39 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://qkvo6ibgfrlb"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Blowdart/blowdarttower.gd" id="1_ah52c"]
|
||||
[ext_resource type="Resource" uid="uid://cbskijhnnj3kw" path="res://Resources/StatusEffects/poisoned.tres" id="2_vfr4o"]
|
||||
[ext_resource type="Resource" uid="uid://by1gyra5a4aks" path="res://Resources/TurretStats/blowdart.tres" id="3_m1c6u"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_mrhfj"]
|
||||
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("model", "range_sphere", "minimap_range_sphere")]
|
||||
script = ExtResource("1_ah52c")
|
||||
status_stats = ExtResource("2_vfr4o")
|
||||
stats = ExtResource("3_m1c6u")
|
||||
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="CSGBox3D2" type="CSGBox3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0158235, 0, -0.623444)
|
||||
size = Vector3(0.481654, 0.427749, 1.38438)
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0)
|
||||
visible = false
|
||||
radius = 7.5
|
||||
material = SubResource("StandardMaterial3D_mrhfj")
|
||||
|
||||
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -2, 0)
|
||||
visible = false
|
||||
layers = 4
|
||||
radius = 7.5
|
||||
material = SubResource("StandardMaterial3D_mrhfj")
|
60
PCs/Universal/ClassCards/Blowdart/weapon_blowdart.tscn
Normal file
60
PCs/Universal/ClassCards/Blowdart/weapon_blowdart.tscn
Normal file
@ -0,0 +1,60 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://cqo6wwf5vbilg"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_3t02x"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Blowdart/blowdartweapon.gd" id="2_ytopx"]
|
||||
[ext_resource type="Resource" uid="uid://cbskijhnnj3kw" path="res://Resources/StatusEffects/poisoned.tres" id="3_qabj4"]
|
||||
[ext_resource type="Resource" uid="uid://dhegsd45xi7na" path="res://Resources/WeaponStats/blowdart.tres" id="4_j03wq"]
|
||||
|
||||
[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")
|
||||
}
|
||||
|
||||
[node name="Weapon" type="Sprite3D"]
|
||||
layers = 2
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_3t02x")
|
||||
script = ExtResource("2_ytopx")
|
||||
status_stats = ExtResource("3_qabj4")
|
||||
stats = ExtResource("4_j03wq")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_ntl6p")
|
||||
}
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="."]
|
||||
collision_mask = 4
|
@ -9,8 +9,8 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_bscy2")
|
||||
title = "Grenade Launcher"
|
||||
rarity = 1
|
||||
title = "Bomb Launcher"
|
||||
rarity = 0
|
||||
faction = 0
|
||||
sprite = ExtResource("2_xtrq2")
|
||||
turret = ExtResource("4_ux0v3")
|
||||
|
@ -0,0 +1,11 @@
|
||||
[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://Assets/TextureAtlases/g_assault.tres" id="2_irvam"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_hj6hq")
|
||||
title = "Damage Enhancer"
|
||||
rarity = 2
|
||||
faction = 0
|
||||
sprite = ExtResource("2_irvam")
|
19
PCs/Universal/ClassCards/Fireball/card_fireball.tres
Normal file
19
PCs/Universal/ClassCards/Fireball/card_fireball.tres
Normal file
@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://b1gd7d12pr52k"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_opk1n"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_51tvo"]
|
||||
[ext_resource type="Resource" uid="uid://b8a635kajtq6" path="res://Resources/TurretStats/fireball.tres" id="3_8w2yo"]
|
||||
[ext_resource type="PackedScene" uid="uid://dr2bmfj8fquxr" path="res://PCs/Universal/ClassCards/Fireball/tower_fireball.tscn" id="4_cxojl"]
|
||||
[ext_resource type="PackedScene" uid="uid://cxlr31wydvroj" path="res://PCs/Universal/ClassCards/Fireball/weapon_fireball.tscn" id="5_47hbf"]
|
||||
[ext_resource type="Resource" uid="uid://c473xvhm2g6m0" path="res://Resources/WeaponStats/fireball.tres" id="6_05wvy"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_opk1n")
|
||||
title = "Fireball"
|
||||
rarity = 3
|
||||
faction = 0
|
||||
sprite = ExtResource("2_51tvo")
|
||||
turret = ExtResource("4_cxojl")
|
||||
weapon = ExtResource("5_47hbf")
|
||||
weapon_stats = ExtResource("6_05wvy")
|
||||
tower_stats = ExtResource("3_8w2yo")
|
32
PCs/Universal/ClassCards/Fireball/fireball.gd
Normal file
32
PCs/Universal/ClassCards/Fireball/fireball.gd
Normal file
@ -0,0 +1,32 @@
|
||||
extends RigidBody3D
|
||||
class_name Fireball
|
||||
|
||||
@export var explosion_range := 6.0
|
||||
var acceleration := 15.0
|
||||
var direction
|
||||
var status_stats : StatusStats
|
||||
var lifetime := 15.0
|
||||
var time_alive := 0.0
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
time_alive += delta
|
||||
if time_alive >= lifetime:
|
||||
explode()
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
apply_central_force(direction * acceleration)
|
||||
|
||||
|
||||
func _on_body_entered(_body: Node) -> void:
|
||||
explode()
|
||||
|
||||
|
||||
func explode():
|
||||
for enemy in get_tree().get_nodes_in_group("Enemies"):
|
||||
if global_position.distance_to(enemy.global_position) <= explosion_range:
|
||||
var status = StatusOnFire.new()
|
||||
status.stats = status_stats
|
||||
enemy.status_manager.add_effect(status)
|
||||
queue_free()
|
30
PCs/Universal/ClassCards/Fireball/fireball.tscn
Normal file
30
PCs/Universal/ClassCards/Fireball/fireball.tscn
Normal file
@ -0,0 +1,30 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dyglfv8lh2rbg"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/fireball.gd" id="1_a3evl"]
|
||||
[ext_resource type="Texture2D" uid="uid://b54d5dc4jmlau" path="res://Assets/Textures/bomb.png" id="2_h8lqn"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_whkhx"]
|
||||
bounce = 0.6
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_mi0in"]
|
||||
radius = 0.2
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D"]
|
||||
collision_layer = 0
|
||||
collision_mask = 5
|
||||
physics_material_override = SubResource("PhysicsMaterial_whkhx")
|
||||
gravity_scale = 0.0
|
||||
max_contacts_reported = 1
|
||||
contact_monitor = true
|
||||
script = ExtResource("1_a3evl")
|
||||
|
||||
[node name="Node3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, 0, 0, 0)
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("2_h8lqn")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_mi0in")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
13
PCs/Universal/ClassCards/Fireball/fireballtower.gd
Normal file
13
PCs/Universal/ClassCards/Fireball/fireballtower.gd
Normal file
@ -0,0 +1,13 @@
|
||||
extends Tower
|
||||
class_name FireballTower
|
||||
|
||||
@export var fireball_scene : PackedScene
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
|
||||
func shoot():
|
||||
var fireball = fireball_scene.instantiate() as Fireball
|
||||
fireball.position = model.global_position
|
||||
fireball.status_stats = status_stats
|
||||
get_tree().root.add_child(fireball)
|
||||
fireball.direction = -model.global_transform.basis.z
|
16
PCs/Universal/ClassCards/Fireball/fireballweapon.gd
Normal file
16
PCs/Universal/ClassCards/Fireball/fireballweapon.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends Weapon
|
||||
class_name FireballWeapon
|
||||
|
||||
@export var fireball_scene : PackedScene
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
|
||||
func shoot():
|
||||
if other_cooldown <= 0 and stats != null:
|
||||
other_cooldown = cooldown
|
||||
$AnimationPlayer.play("shoot")
|
||||
var fireball = fireball_scene.instantiate() as Fireball
|
||||
fireball.position = $RayCast3D.global_position
|
||||
fireball.status_stats = status_stats
|
||||
get_tree().root.add_child(fireball)
|
||||
fireball.direction = -global_transform.basis.z
|
41
PCs/Universal/ClassCards/Fireball/tower_fireball.tscn
Normal file
41
PCs/Universal/ClassCards/Fireball/tower_fireball.tscn
Normal file
@ -0,0 +1,41 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dr2bmfj8fquxr"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/fireballtower.gd" id="1_076bl"]
|
||||
[ext_resource type="PackedScene" uid="uid://dyglfv8lh2rbg" path="res://PCs/Universal/ClassCards/Fireball/fireball.tscn" id="2_0kqdt"]
|
||||
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="3_88y8d"]
|
||||
[ext_resource type="Resource" uid="uid://b8a635kajtq6" path="res://Resources/TurretStats/fireball.tres" id="4_cd3q3"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fouf8"]
|
||||
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("model", "range_sphere", "minimap_range_sphere")]
|
||||
script = ExtResource("1_076bl")
|
||||
fireball_scene = ExtResource("2_0kqdt")
|
||||
status_stats = ExtResource("3_88y8d")
|
||||
stats = ExtResource("4_cd3q3")
|
||||
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, 1.97939, 0)
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
|
||||
|
||||
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.486166)
|
||||
size = Vector3(1.10238, 1.08881, 1.04243)
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
|
||||
visible = false
|
||||
radius = 7.5
|
||||
material = SubResource("StandardMaterial3D_fouf8")
|
||||
|
||||
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
|
||||
visible = false
|
||||
layers = 4
|
||||
radius = 7.5
|
||||
material = SubResource("StandardMaterial3D_fouf8")
|
79
PCs/Universal/ClassCards/Fireball/weapon_fireball.tscn
Normal file
79
PCs/Universal/ClassCards/Fireball/weapon_fireball.tscn
Normal file
@ -0,0 +1,79 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://cxlr31wydvroj"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://clr6kfyci5jqb" path="res://Assets/TextureAtlases/g_rocket_launcher.tres" id="1_jmfbt"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/fireballweapon.gd" id="2_rmmdm"]
|
||||
[ext_resource type="PackedScene" uid="uid://dyglfv8lh2rbg" path="res://PCs/Universal/ClassCards/Fireball/fireball.tscn" id="3_xtqoc"]
|
||||
[ext_resource type="Resource" uid="uid://dbanx8taicddm" path="res://Resources/StatusEffects/on_fire.tres" id="4_a0kl2"]
|
||||
[ext_resource type="Resource" uid="uid://c473xvhm2g6m0" path="res://Resources/WeaponStats/fireball.tres" id="5_n36an"]
|
||||
[ext_resource type="Texture2D" uid="uid://bgeu8dnqaxq7v" path="res://Assets/TextureAtlases/target_list.tres" id="6_bpghv"]
|
||||
|
||||
[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")
|
||||
}
|
||||
|
||||
[node name="Weapon" type="Sprite3D"]
|
||||
layers = 2
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_jmfbt")
|
||||
script = ExtResource("2_rmmdm")
|
||||
fireball_scene = ExtResource("3_xtqoc")
|
||||
status_stats = ExtResource("4_a0kl2")
|
||||
stats = ExtResource("5_n36an")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_ntl6p")
|
||||
}
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="."]
|
||||
collision_mask = 4
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
texture_filter = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("6_bpghv")
|
@ -1,15 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=5 format=3 uid="uid://1xke2uy2vfuf"]
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://1xke2uy2vfuf"]
|
||||
|
||||
[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"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_xmwih")
|
||||
title = "Flamethrower"
|
||||
rarity = 3
|
||||
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")
|
||||
|
@ -17,12 +17,9 @@ func _process(delta: float) -> void:
|
||||
func shoot():
|
||||
for index in shapecast.get_collision_count():
|
||||
var target = shapecast.get_collider(index) as CharacterBody3D
|
||||
#TODO: its shit the way the enemy and status have to know about each other
|
||||
var status = StatusOnFire.new()
|
||||
status.affected = target.get_parent()
|
||||
status.stats = status_stats
|
||||
target.get_parent().status_manager.add_effect(status)
|
||||
target.get_parent().add_child(status)
|
||||
target.status_manager.add_effect(status)
|
||||
|
||||
|
||||
func aim():
|
||||
|
@ -5,9 +5,9 @@
|
||||
|
||||
[sub_resource type="Gradient" id="Gradient_kkqms"]
|
||||
offsets = PackedFloat32Array(0.00591716, 1)
|
||||
colors = PackedColorArray(0.898039, 0.447059, 0, 1, 1, 0, 0, 1)
|
||||
colors = PackedColorArray(0.898039, 0.447059, 0, 1, 1, 0, 0, 0.34902)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_gpquw"]
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_4cwgw"]
|
||||
gradient = SubResource("Gradient_kkqms")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2nhns"]
|
||||
@ -18,13 +18,14 @@ initial_velocity_min = 5.0
|
||||
initial_velocity_max = 5.0
|
||||
damping_min = 4.464
|
||||
damping_max = 4.464
|
||||
color_ramp = SubResource("GradientTexture1D_gpquw")
|
||||
color_ramp = SubResource("GradientTexture1D_4cwgw")
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_2yd7w"]
|
||||
[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_2yd7w")
|
||||
material = SubResource("StandardMaterial3D_ycjd1")
|
||||
size = Vector3(0.3, 0.3, 0.3)
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_vck5q"]
|
||||
@ -49,15 +50,15 @@ minimap_range_sphere = NodePath("Model/CSGSphere3D2")
|
||||
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.569646, 0)
|
||||
size = Vector3(1, 1.78698, 1)
|
||||
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.274218, -0.514041)
|
||||
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.301084, -1.2154)
|
||||
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
|
||||
|
30
PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.gd
Normal file
30
PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.gd
Normal file
@ -0,0 +1,30 @@
|
||||
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 = StatusOnFire.new()
|
||||
status.stats = status_stats
|
||||
target.status_manager.add_effect(status)
|
||||
|
||||
|
||||
func release_trigger():
|
||||
trigger_held = false
|
||||
particlesystem.emitting = false
|
100
PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.tscn
Normal file
100
PCs/Universal/ClassCards/Flamethrower/weapon_flamethrower.tscn
Normal file
@ -0,0 +1,100 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://cprppqfd2wf6s"]
|
||||
|
||||
[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"]
|
||||
|
||||
[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_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")
|
11
PCs/Universal/ClassCards/GammaLaser/card_gamma_laser.tres
Normal file
11
PCs/Universal/ClassCards/GammaLaser/card_gamma_laser.tres
Normal file
@ -0,0 +1,11 @@
|
||||
[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://Assets/TextureAtlases/g_assault.tres" id="2_a7b2p"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_goeex")
|
||||
title = "Gamma Laser"
|
||||
rarity = 3
|
||||
faction = 0
|
||||
sprite = ExtResource("2_a7b2p")
|
@ -9,7 +9,7 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_5html")
|
||||
title = "Accelerator"
|
||||
title = "Gatling"
|
||||
rarity = 0
|
||||
faction = 0
|
||||
sprite = ExtResource("2_a3hso")
|
||||
|
@ -10,7 +10,7 @@
|
||||
[resource]
|
||||
script = ExtResource("1_4m1rh")
|
||||
title = "Glue Gun"
|
||||
rarity = 3
|
||||
rarity = 1
|
||||
faction = 0
|
||||
sprite = ExtResource("2_xsq3l")
|
||||
turret = ExtResource("4_1nhoo")
|
||||
|
@ -7,6 +7,4 @@ class_name StickyTower
|
||||
func shoot():
|
||||
var status = StatusSticky.new()
|
||||
status.stats = status_stats
|
||||
status.affected = targeted_enemy
|
||||
status.affected.status_manager.add_effect(status)
|
||||
targeted_enemy.add_child(status)
|
||||
targeted_enemy.status_manager.add_effect(status)
|
||||
|
@ -14,6 +14,4 @@ func shoot():
|
||||
if target_hitbox is Hitbox:
|
||||
var status = StatusSticky.new()
|
||||
status.stats = status_stats
|
||||
status.affected = target.get_parent()
|
||||
status.affected.status_manager.add_effect(status)
|
||||
target.add_child(status)
|
||||
target.status_manager.add_effect(status)
|
||||
|
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://d24q8j53oiyd4"]
|
||||
[gd_scene load_steps=8 format=3 uid="uid://d24q8j53oiyd4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_pl6t8"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Sniper/scopedweapon.gd" id="2_8m6e6"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/GlueLauncher/stickyweapon.gd" id="2_dnhqb"]
|
||||
[ext_resource type="Resource" uid="uid://d0643gfp52x3s" path="res://Resources/StatusEffects/sticky.tres" id="3_4t7ku"]
|
||||
[ext_resource type="Resource" uid="uid://dnucn65m12dmq" path="res://Resources/WeaponStats/glue.tres" id="3_li2dn"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_n8b32"]
|
||||
@ -46,7 +47,8 @@ layers = 2
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_pl6t8")
|
||||
script = ExtResource("2_8m6e6")
|
||||
script = ExtResource("2_dnhqb")
|
||||
status_stats = ExtResource("3_4t7ku")
|
||||
stats = ExtResource("3_li2dn")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
|
19
PCs/Universal/ClassCards/Icicle/card_icicle.tres
Normal file
19
PCs/Universal/ClassCards/Icicle/card_icicle.tres
Normal file
@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://bceyh6nn6h15y"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_g0mbh"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_gnblw"]
|
||||
[ext_resource type="Resource" uid="uid://cdmkajdgfpk6h" path="res://Resources/TurretStats/icicle.tres" id="3_fgq80"]
|
||||
[ext_resource type="PackedScene" uid="uid://clabvrajn6k3r" path="res://PCs/Universal/ClassCards/Icicle/tower_icicle.tscn" id="4_jwh3d"]
|
||||
[ext_resource type="PackedScene" uid="uid://dvfpqrrmjfco4" path="res://PCs/Universal/ClassCards/Icicle/weapon_icicle.tscn" id="5_appk0"]
|
||||
[ext_resource type="Resource" uid="uid://dsmlqik586soo" path="res://Resources/WeaponStats/icicle.tres" id="6_mfnfc"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_g0mbh")
|
||||
title = "Icicle"
|
||||
rarity = 3
|
||||
faction = 0
|
||||
sprite = ExtResource("2_gnblw")
|
||||
turret = ExtResource("4_jwh3d")
|
||||
weapon = ExtResource("5_appk0")
|
||||
weapon_stats = ExtResource("6_mfnfc")
|
||||
tower_stats = ExtResource("3_fgq80")
|
32
PCs/Universal/ClassCards/Icicle/icicle.gd
Normal file
32
PCs/Universal/ClassCards/Icicle/icicle.gd
Normal file
@ -0,0 +1,32 @@
|
||||
extends RigidBody3D
|
||||
class_name Icicle
|
||||
|
||||
@export var explosion_range := 6.0
|
||||
var acceleration := 15.0
|
||||
var direction
|
||||
var status_stats : StatusStats
|
||||
var lifetime := 15.0
|
||||
var time_alive := 0.0
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
time_alive += delta
|
||||
if time_alive >= lifetime:
|
||||
explode()
|
||||
|
||||
|
||||
func _physics_process(_delta: float) -> void:
|
||||
apply_central_force(direction * acceleration)
|
||||
|
||||
|
||||
func _on_body_entered(_body: Node) -> void:
|
||||
explode()
|
||||
|
||||
|
||||
func explode():
|
||||
for enemy in get_tree().get_nodes_in_group("Enemies"):
|
||||
if global_position.distance_to(enemy.global_position) <= explosion_range:
|
||||
var status = StatusCold.new()
|
||||
status.stats = status_stats
|
||||
enemy.status_manager.add_effect(status)
|
||||
queue_free()
|
30
PCs/Universal/ClassCards/Icicle/icicle.tscn
Normal file
30
PCs/Universal/ClassCards/Icicle/icicle.tscn
Normal file
@ -0,0 +1,30 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cdme5v2sq7u3p"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/icicle.gd" id="1_qlswm"]
|
||||
[ext_resource type="Texture2D" uid="uid://b54d5dc4jmlau" path="res://Assets/Textures/bomb.png" id="2_8pdfq"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_whkhx"]
|
||||
bounce = 0.6
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_mi0in"]
|
||||
radius = 0.2
|
||||
|
||||
[node name="RigidBody3D" type="RigidBody3D"]
|
||||
collision_layer = 0
|
||||
collision_mask = 5
|
||||
physics_material_override = SubResource("PhysicsMaterial_whkhx")
|
||||
gravity_scale = 0.0
|
||||
max_contacts_reported = 1
|
||||
contact_monitor = true
|
||||
script = ExtResource("1_qlswm")
|
||||
|
||||
[node name="Node3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.4, 0, 0, 0, 1.4, 0, 0, 0, 1.4, 0, 0, 0)
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("2_8pdfq")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
shape = SubResource("SphereShape3D_mi0in")
|
||||
|
||||
[connection signal="body_entered" from="." to="." method="_on_body_entered"]
|
13
PCs/Universal/ClassCards/Icicle/icicletower.gd
Normal file
13
PCs/Universal/ClassCards/Icicle/icicletower.gd
Normal file
@ -0,0 +1,13 @@
|
||||
extends Tower
|
||||
class_name IcicleTower
|
||||
|
||||
@export var icicle_scene : PackedScene
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
|
||||
func shoot():
|
||||
var icicle = icicle_scene.instantiate() as Icicle
|
||||
icicle.position = model.global_position
|
||||
icicle.status_stats = status_stats
|
||||
get_tree().root.add_child(icicle)
|
||||
icicle.direction = -model.global_transform.basis.z
|
16
PCs/Universal/ClassCards/Icicle/icicleweapon.gd
Normal file
16
PCs/Universal/ClassCards/Icicle/icicleweapon.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends Weapon
|
||||
class_name IcicleWeapon
|
||||
|
||||
@export var icicle_scene : PackedScene
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
|
||||
func shoot():
|
||||
if other_cooldown <= 0 and stats != null:
|
||||
other_cooldown = cooldown
|
||||
$AnimationPlayer.play("shoot")
|
||||
var icicle = icicle_scene.instantiate() as Icicle
|
||||
icicle.position = $RayCast3D.global_position
|
||||
icicle.status_stats = status_stats
|
||||
get_tree().root.add_child(icicle)
|
||||
icicle.direction = -global_transform.basis.z
|
41
PCs/Universal/ClassCards/Icicle/tower_icicle.tscn
Normal file
41
PCs/Universal/ClassCards/Icicle/tower_icicle.tscn
Normal file
@ -0,0 +1,41 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://clabvrajn6k3r"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/icicletower.gd" id="1_diocy"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdme5v2sq7u3p" path="res://PCs/Universal/ClassCards/Icicle/icicle.tscn" id="2_706hd"]
|
||||
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="3_ei6qp"]
|
||||
[ext_resource type="Resource" uid="uid://cdmkajdgfpk6h" path="res://Resources/TurretStats/icicle.tres" id="4_vyj5f"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_fouf8"]
|
||||
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("model", "range_sphere", "minimap_range_sphere")]
|
||||
script = ExtResource("1_diocy")
|
||||
icicle_scene = ExtResource("2_706hd")
|
||||
status_stats = ExtResource("3_ei6qp")
|
||||
stats = ExtResource("4_vyj5f")
|
||||
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, 1.97939, 0)
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="Model"]
|
||||
|
||||
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -0.486166)
|
||||
size = Vector3(1.10238, 1.08881, 1.04243)
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="Model"]
|
||||
visible = false
|
||||
radius = 7.5
|
||||
material = SubResource("StandardMaterial3D_fouf8")
|
||||
|
||||
[node name="CSGSphere3D2" type="CSGSphere3D" parent="Model"]
|
||||
visible = false
|
||||
layers = 4
|
||||
radius = 7.5
|
||||
material = SubResource("StandardMaterial3D_fouf8")
|
79
PCs/Universal/ClassCards/Icicle/weapon_icicle.tscn
Normal file
79
PCs/Universal/ClassCards/Icicle/weapon_icicle.tscn
Normal file
@ -0,0 +1,79 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://dvfpqrrmjfco4"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://clr6kfyci5jqb" path="res://Assets/TextureAtlases/g_rocket_launcher.tres" id="1_23r2a"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/icicleweapon.gd" id="2_j3c63"]
|
||||
[ext_resource type="PackedScene" uid="uid://cdme5v2sq7u3p" path="res://PCs/Universal/ClassCards/Icicle/icicle.tscn" id="3_hgb5e"]
|
||||
[ext_resource type="Resource" uid="uid://fed6kimfbcwv" path="res://Resources/StatusEffects/cold.tres" id="4_hsh8q"]
|
||||
[ext_resource type="Resource" uid="uid://dsmlqik586soo" path="res://Resources/WeaponStats/icicle.tres" id="5_wivww"]
|
||||
[ext_resource type="Texture2D" uid="uid://bgeu8dnqaxq7v" path="res://Assets/TextureAtlases/target_list.tres" id="6_mqgqx"]
|
||||
|
||||
[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")
|
||||
}
|
||||
|
||||
[node name="Weapon" type="Sprite3D"]
|
||||
layers = 2
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = ExtResource("1_23r2a")
|
||||
script = ExtResource("2_j3c63")
|
||||
icicle_scene = ExtResource("3_hgb5e")
|
||||
status_stats = ExtResource("4_hsh8q")
|
||||
stats = ExtResource("5_wivww")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
"": SubResource("AnimationLibrary_ntl6p")
|
||||
}
|
||||
|
||||
[node name="RayCast3D" type="RayCast3D" parent="."]
|
||||
collision_mask = 4
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
visible = false
|
||||
texture_filter = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -20.0
|
||||
offset_top = -20.0
|
||||
offset_right = 20.0
|
||||
offset_bottom = 20.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = ExtResource("6_mqgqx")
|
11
PCs/Universal/ClassCards/Lightning/card_lightning.tres
Normal file
11
PCs/Universal/ClassCards/Lightning/card_lightning.tres
Normal file
@ -0,0 +1,11 @@
|
||||
[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://Assets/TextureAtlases/g_assault.tres" id="2_eyg7w"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_oj1u6")
|
||||
title = "Lightning"
|
||||
rarity = 4
|
||||
faction = 0
|
||||
sprite = ExtResource("2_eyg7w")
|
19
PCs/Universal/ClassCards/Reactor/card_reactor.tres
Normal file
19
PCs/Universal/ClassCards/Reactor/card_reactor.tres
Normal file
@ -0,0 +1,19 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=7 format=3 uid="uid://dra640am6ykri"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_7065k"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_8hvde"]
|
||||
[ext_resource type="Resource" uid="uid://baa8sauri4218" path="res://Resources/TurretStats/reactor.tres" id="3_ikj6b"]
|
||||
[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://cpe3b700kwj48" path="res://PCs/Universal/ClassCards/Reactor/weapon_reactor.tscn" id="5_atmmn"]
|
||||
[ext_resource type="Resource" uid="uid://b5eakeawu3gle" path="res://Resources/WeaponStats/reactor.tres" id="5_erecn"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_7065k")
|
||||
title = "Reactor"
|
||||
rarity = 4
|
||||
faction = 0
|
||||
sprite = ExtResource("2_8hvde")
|
||||
turret = ExtResource("4_y3lkh")
|
||||
weapon = ExtResource("5_atmmn")
|
||||
weapon_stats = ExtResource("5_erecn")
|
||||
tower_stats = ExtResource("3_ikj6b")
|
17
PCs/Universal/ClassCards/Reactor/reactortower.gd
Normal file
17
PCs/Universal/ClassCards/Reactor/reactortower.gd
Normal file
@ -0,0 +1,17 @@
|
||||
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)
|
30
PCs/Universal/ClassCards/Reactor/reactorweapon.gd
Normal file
30
PCs/Universal/ClassCards/Reactor/reactorweapon.gd
Normal file
@ -0,0 +1,30 @@
|
||||
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
|
72
PCs/Universal/ClassCards/Reactor/tower_reactor.tscn
Normal file
72
PCs/Universal/ClassCards/Reactor/tower_reactor.tscn
Normal file
@ -0,0 +1,72 @@
|
||||
[gd_scene load_steps=10 format=3 uid="uid://byglhh0etuy6"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Reactor/reactortower.gd" id="1_rb733"]
|
||||
[ext_resource type="Resource" uid="uid://dxlisoas4xlmo" path="res://Resources/StatusEffects/radioactive.tres" id="2_vyodb"]
|
||||
[ext_resource type="Resource" uid="uid://baa8sauri4218" path="res://Resources/TurretStats/reactor.tres" id="3_a6b2i"]
|
||||
|
||||
[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"]
|
||||
colors = PackedColorArray(0.376471, 0.976471, 0, 0.435294, 0.127613, 0.391512, 0, 0.870588)
|
||||
|
||||
[sub_resource type="GradientTexture1D" id="GradientTexture1D_4cwgw"]
|
||||
gradient = SubResource("Gradient_kkqms")
|
||||
|
||||
[sub_resource type="ParticleProcessMaterial" id="ParticleProcessMaterial_2nhns"]
|
||||
emission_shape = 6
|
||||
emission_ring_axis = Vector3(0, 1, 0)
|
||||
emission_ring_height = 0.5
|
||||
emission_ring_radius = 20.0
|
||||
emission_ring_inner_radius = 0.0
|
||||
gravity = Vector3(0, 1, 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_rb733")
|
||||
status_stats = ExtResource("2_vyodb")
|
||||
particlesystem = NodePath("Model/GPUParticles3D")
|
||||
stats = ExtResource("3_a6b2i")
|
||||
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.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
|
||||
visibility_aabb = AABB(-110.773, -4, -105.31, 221.547, 8, 210.62)
|
||||
process_material = SubResource("ParticleProcessMaterial_2nhns")
|
||||
draw_pass_1 = SubResource("BoxMesh_q83y7")
|
99
PCs/Universal/ClassCards/Reactor/weapon_reactor.tscn
Normal file
99
PCs/Universal/ClassCards/Reactor/weapon_reactor.tscn
Normal file
@ -0,0 +1,99 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://cpe3b700kwj48"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://jmxhiwsiw1f5" path="res://Assets/TextureAtlases/g_glue_gun.tres" id="1_lmai4"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Reactor/reactorweapon.gd" id="2_mpd2q"]
|
||||
[ext_resource type="Resource" uid="uid://dxlisoas4xlmo" path="res://Resources/StatusEffects/radioactive.tres" id="3_x464r"]
|
||||
[ext_resource type="Resource" uid="uid://b5eakeawu3gle" path="res://Resources/WeaponStats/reactor.tres" id="4_lclha"]
|
||||
|
||||
[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"]
|
||||
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
|
||||
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_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="."]
|
||||
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")
|
@ -0,0 +1,19 @@
|
||||
[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://Assets/TextureAtlases/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")
|
17
PCs/Universal/ClassCards/Refridgerator/fridgetower.gd
Normal file
17
PCs/Universal/ClassCards/Refridgerator/fridgetower.gd
Normal file
@ -0,0 +1,17 @@
|
||||
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)
|
@ -0,0 +1,30 @@
|
||||
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
|
@ -0,0 +1,76 @@
|
||||
[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")
|
100
PCs/Universal/ClassCards/Refridgerator/weapon_refridgerator.tscn
Normal file
100
PCs/Universal/ClassCards/Refridgerator/weapon_refridgerator.tscn
Normal file
@ -0,0 +1,100 @@
|
||||
[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")
|
@ -10,7 +10,7 @@
|
||||
[resource]
|
||||
script = ExtResource("1_dg0td")
|
||||
title = "Rocket Launcher"
|
||||
rarity = 2
|
||||
rarity = 0
|
||||
faction = 0
|
||||
sprite = ExtResource("2_duef5")
|
||||
turret = ExtResource("4_mvvp4")
|
||||
|
@ -0,0 +1,11 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=3 format=3 uid="uid://bkhbxi82sd3y4"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_lii00"]
|
||||
[ext_resource type="Texture2D" uid="uid://ca4lwwd3e0y73" path="res://Assets/TextureAtlases/g_assault.tres" id="2_npyaf"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_lii00")
|
||||
title = "Speed Enhancer"
|
||||
rarity = 2
|
||||
faction = 0
|
||||
sprite = ExtResource("2_npyaf")
|
@ -416,7 +416,7 @@ vertical_alignment = 1
|
||||
|
||||
[node name="Label2" type="Label" parent="HUD"]
|
||||
visible = false
|
||||
anchors_preset = -1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
|
13
Resources/StatusEffects/cold.tres
Normal file
13
Resources/StatusEffects/cold.tres
Normal file
@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="StatusStats" load_steps=3 format=3 uid="uid://fed6kimfbcwv"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://vmcidp1sk5ns" path="res://Assets/Textures/cold.png" id="1_0gkew"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/status_stats.gd" id="1_krmeh"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_krmeh")
|
||||
name = "Cold"
|
||||
max_stacks = 10
|
||||
proc_cd = 0.0
|
||||
duration = 2.0
|
||||
potency = 0.05
|
||||
icon = ExtResource("1_0gkew")
|
11
Resources/StatusEffects/frozen.tres
Normal file
11
Resources/StatusEffects/frozen.tres
Normal file
@ -0,0 +1,11 @@
|
||||
[gd_resource type="Resource" script_class="StatusStats" load_steps=2 format=3 uid="uid://berwexb0x8ihh"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/status_stats.gd" id="1_pu408"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_pu408")
|
||||
name = "Frozen"
|
||||
max_stacks = 1
|
||||
proc_cd = 0.0
|
||||
duration = 4.0
|
||||
potency = 1.0
|
@ -5,8 +5,9 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_ogrf4")
|
||||
name = "Burning"
|
||||
unique = false
|
||||
proc_frequency = 1.0
|
||||
proc_cd = 1.0
|
||||
duration = 3.0
|
||||
potency = 2.0
|
||||
icon = ExtResource("1_ebohu")
|
||||
|
13
Resources/StatusEffects/poisoned.tres
Normal file
13
Resources/StatusEffects/poisoned.tres
Normal file
@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="StatusStats" load_steps=3 format=3 uid="uid://cbskijhnnj3kw"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cqah4a2pp40jt" path="res://Assets/Textures/poison.png" id="1_730i6"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/status_stats.gd" id="1_e1nii"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_e1nii")
|
||||
name = "Poisoned"
|
||||
max_stacks = 0
|
||||
proc_cd = 0.5
|
||||
duration = 5.0
|
||||
potency = 1.0
|
||||
icon = ExtResource("1_730i6")
|
13
Resources/StatusEffects/radioactive.tres
Normal file
13
Resources/StatusEffects/radioactive.tres
Normal file
@ -0,0 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="StatusStats" load_steps=3 format=3 uid="uid://dxlisoas4xlmo"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://bvc4b3v0wke84" path="res://Assets/Textures/radioactive.png" id="1_2vw1n"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/status_stats.gd" id="1_eh52x"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_eh52x")
|
||||
name = "Radioactive"
|
||||
max_stacks = 0
|
||||
proc_cd = 3.0
|
||||
duration = 0.0
|
||||
potency = 1.0
|
||||
icon = ExtResource("1_2vw1n")
|
@ -5,8 +5,9 @@
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_57gd1")
|
||||
unique = true
|
||||
proc_frequency = 0.0
|
||||
name = "Sticky"
|
||||
max_stacks = 1
|
||||
proc_cd = 0.0
|
||||
duration = 5.0
|
||||
potency = 0.3
|
||||
icon = ExtResource("1_b1meh")
|
||||
|
10
Resources/TurretStats/blowdart.tres
Normal file
10
Resources/TurretStats/blowdart.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="TowerStats" load_steps=2 format=3 uid="uid://by1gyra5a4aks"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/TowerStats.gd" id="1_cofk4"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_cofk4")
|
||||
can_target = 3
|
||||
damage = 10.0
|
||||
fire_range = 20.0
|
||||
fire_rate = 1.0
|
10
Resources/TurretStats/fireball.tres
Normal file
10
Resources/TurretStats/fireball.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="TowerStats" load_steps=2 format=3 uid="uid://b8a635kajtq6"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/TowerStats.gd" id="1_3jfph"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_3jfph")
|
||||
can_target = 3
|
||||
damage = 10.0
|
||||
fire_range = 20.0
|
||||
fire_rate = 1.0
|
10
Resources/TurretStats/icicle.tres
Normal file
10
Resources/TurretStats/icicle.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="TowerStats" load_steps=2 format=3 uid="uid://cdmkajdgfpk6h"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/TowerStats.gd" id="1_sxyf1"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_sxyf1")
|
||||
can_target = 3
|
||||
damage = 10.0
|
||||
fire_range = 20.0
|
||||
fire_rate = 1.0
|
10
Resources/TurretStats/reactor.tres
Normal file
10
Resources/TurretStats/reactor.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="TowerStats" load_steps=2 format=3 uid="uid://baa8sauri4218"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/TowerStats.gd" id="1_uugt6"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_uugt6")
|
||||
can_target = 1
|
||||
damage = 10.0
|
||||
fire_range = 20.0
|
||||
fire_rate = 1.0
|
10
Resources/TurretStats/refridgerator.tres
Normal file
10
Resources/TurretStats/refridgerator.tres
Normal file
@ -0,0 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="TowerStats" load_steps=2 format=3 uid="uid://ugpxwdjfvssu"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/TowerStats.gd" id="1_71ewu"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_71ewu")
|
||||
can_target = 1
|
||||
damage = 10.0
|
||||
fire_range = 4.0
|
||||
fire_rate = 2.0
|
9
Resources/WeaponStats/blowdart.tres
Normal file
9
Resources/WeaponStats/blowdart.tres
Normal file
@ -0,0 +1,9 @@
|
||||
[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://dhegsd45xi7na"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/WeaponStats.gd" id="1_xkaiy"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_xkaiy")
|
||||
damage = 0
|
||||
fire_rate = 1.0
|
||||
fire_range = 30.0
|
9
Resources/WeaponStats/fireball.tres
Normal file
9
Resources/WeaponStats/fireball.tres
Normal file
@ -0,0 +1,9 @@
|
||||
[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://c473xvhm2g6m0"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/WeaponStats.gd" id="1_4kg7u"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_4kg7u")
|
||||
damage = 0
|
||||
fire_rate = 1.0
|
||||
fire_range = 0.0
|
@ -5,5 +5,5 @@
|
||||
[resource]
|
||||
script = ExtResource("1_kt5ga")
|
||||
damage = 0
|
||||
fire_rate = 0.0
|
||||
fire_range = 0.0
|
||||
fire_rate = 2.0
|
||||
fire_range = 3.0
|
||||
|
9
Resources/WeaponStats/icicle.tres
Normal file
9
Resources/WeaponStats/icicle.tres
Normal file
@ -0,0 +1,9 @@
|
||||
[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://dsmlqik586soo"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/WeaponStats.gd" id="1_irad3"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_irad3")
|
||||
damage = 0
|
||||
fire_rate = 0.5
|
||||
fire_range = 20.0
|
9
Resources/WeaponStats/reactor.tres
Normal file
9
Resources/WeaponStats/reactor.tres
Normal file
@ -0,0 +1,9 @@
|
||||
[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://b5eakeawu3gle"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/WeaponStats.gd" id="1_np134"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_np134")
|
||||
damage = 0
|
||||
fire_rate = 2.0
|
||||
fire_range = 10.0
|
9
Resources/WeaponStats/refridgerator.tres
Normal file
9
Resources/WeaponStats/refridgerator.tres
Normal file
@ -0,0 +1,9 @@
|
||||
[gd_resource type="Resource" script_class="WeaponStats" load_steps=2 format=3 uid="uid://cpyrdja71sboe"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/WeaponStats.gd" id="1_uybdl"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_uybdl")
|
||||
damage = 0
|
||||
fire_rate = 0.5
|
||||
fire_range = 5.0
|
@ -18,7 +18,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 0.615686)
|
||||
color = Color(0, 0, 0, 0.745098)
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
|
@ -21,13 +21,14 @@ anchor_right = 0.5
|
||||
offset_left = -559.5
|
||||
offset_top = 25.0
|
||||
offset_right = 559.5
|
||||
offset_bottom = 88.0
|
||||
offset_bottom = 113.0
|
||||
grow_horizontal = 2
|
||||
|
||||
[node name="Label" type="Label" parent="Title"]
|
||||
layout_mode = 2
|
||||
text = "MULTIPLAYER TOWER DEFENSE CARD GAME ROGUELIKE !!!"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MainControls" type="PanelContainer" parent="."]
|
||||
layout_mode = 1
|
||||
|
@ -18,7 +18,7 @@ anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
color = Color(0, 0, 0, 0.486275)
|
||||
color = Color(0, 0, 0, 0.745098)
|
||||
|
||||
[node name="Label" type="Label" parent="."]
|
||||
layout_mode = 1
|
||||
|
@ -1,11 +1,13 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://d2yv447trxkwt"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://d2yv447trxkwt"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/enemy_spawner.gd" id="1_23wuv"]
|
||||
[ext_resource type="PackedScene" uid="uid://b0nady5xm88bo" path="res://Worlds/GreenPlanet/Enemies/land_enemy.tscn" id="2_muaoj"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjo2q6vca5qlv" path="res://Worlds/GreenPlanet/Enemies/air_enemy.tscn" id="3_nh55v"]
|
||||
|
||||
[node name="Node3D" type="Node3D"]
|
||||
script = ExtResource("1_23wuv")
|
||||
land_enemy_scene = ExtResource("2_muaoj")
|
||||
air_enemy_scene = ExtResource("3_nh55v")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
|
@ -1,8 +1,9 @@
|
||||
extends Resource
|
||||
class_name StatusStats
|
||||
|
||||
@export var unique := false
|
||||
@export var proc_frequency := 0.0
|
||||
@export var name : String
|
||||
@export var max_stacks := 0
|
||||
@export var proc_cd := 0.0
|
||||
@export var duration := 1.0
|
||||
@export var potency := 1.0
|
||||
@export var icon : Texture
|
||||
|
@ -2,35 +2,59 @@ extends Node3D
|
||||
class_name StatusEffector
|
||||
|
||||
@export var hbox : HBoxContainer
|
||||
@export var enemy : EnemyController
|
||||
|
||||
var icon_scene = preload("res://Scenes/status_icon.tscn")
|
||||
var effects : Array[StatusEffect]
|
||||
var icons : Array[TextureRect]
|
||||
var immune : Array[StatusEffect] = []
|
||||
var effects = {}
|
||||
var icons = {}
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
for effect in effects:
|
||||
if effects[effect] == 0:
|
||||
continue
|
||||
effect.time_since_proc += delta
|
||||
effect.time_existed += delta
|
||||
if effect.stats.duration > 0.0 and effect.time_existed >= effect.stats.duration:
|
||||
effect.time_existed -= effect.stats.duration
|
||||
effects[effect] -= 1
|
||||
effect.on_removed(enemy, effects)
|
||||
if effects[effect] == 0:
|
||||
icons[effect].set_visible(false)
|
||||
if effect.time_since_proc >= effect.stats.proc_cd:
|
||||
effect.proc(enemy, effects[effect], effects)
|
||||
effect.time_since_proc -= effect.stats.proc_cd
|
||||
|
||||
|
||||
func force_proc(effect_to_proc : StatusEffect):
|
||||
for effect in effects:
|
||||
if effect.stats == effect_to_proc.stats:
|
||||
effect.proc(enemy, effects[effect], effects)
|
||||
|
||||
|
||||
func add_effect(new_effect : StatusEffect):
|
||||
var icon_present = false
|
||||
for effect in immune:
|
||||
if effect.stats == new_effect.stats:
|
||||
return
|
||||
|
||||
var existing_effect
|
||||
for effect in effects:
|
||||
if effect.stats == new_effect.stats:
|
||||
icon_present = true
|
||||
new_effect.expired.connect(remove_effect)
|
||||
effects.append(new_effect)
|
||||
if !icon_present:
|
||||
existing_effect = effect
|
||||
if !existing_effect:
|
||||
existing_effect = new_effect
|
||||
effects[new_effect] = 0
|
||||
var icon = icon_scene.instantiate()
|
||||
icon.texture = new_effect.stats.icon
|
||||
icons.append(icon)
|
||||
icon.set_visible(false)
|
||||
icons[new_effect] = icon
|
||||
hbox.add_child(icon)
|
||||
|
||||
|
||||
func remove_effect(expiring_effect : StatusEffect):
|
||||
effects.erase(expiring_effect)
|
||||
var has_remaining_stack = false
|
||||
for effect in effects:
|
||||
if effect.stats == expiring_effect.stats:
|
||||
has_remaining_stack = true
|
||||
if !has_remaining_stack:
|
||||
for icon in icons:
|
||||
if icon.texture == expiring_effect.stats.icon:
|
||||
icons.erase(icon)
|
||||
icon.queue_free()
|
||||
break
|
||||
if existing_effect.stats.max_stacks == 0 or effects[existing_effect] < existing_effect.stats.max_stacks:
|
||||
existing_effect.on_attached(enemy, effects)
|
||||
icons[existing_effect].set_visible(true)
|
||||
effects[existing_effect] += 1
|
||||
existing_effect.time_existed = 0.0
|
||||
if existing_effect.stats.max_stacks != 0 and effects[existing_effect] > existing_effect.stats.max_stacks:
|
||||
effects[existing_effect] = existing_effect.stats.max_stacks
|
||||
|
@ -2,5 +2,5 @@ extends StatusEffect
|
||||
class_name StatusOnFire
|
||||
|
||||
|
||||
func proc():
|
||||
affected.damage(stats.potency)
|
||||
func proc(affected, stacks, existing_effects):
|
||||
affected.damage(stats.potency * stacks)
|
||||
|
9
Scripts/StatusEffects/status_cold.gd
Normal file
9
Scripts/StatusEffects/status_cold.gd
Normal file
@ -0,0 +1,9 @@
|
||||
extends StatusEffect
|
||||
class_name StatusCold
|
||||
|
||||
func on_attached(affected, existing_effects):
|
||||
affected.movement_speed_penalty -= stats.potency
|
||||
|
||||
|
||||
func on_removed(affected, existing_effects):
|
||||
affected.movement_speed_penalty += stats.potency
|
@ -1,44 +1,19 @@
|
||||
extends Node
|
||||
extends RefCounted
|
||||
class_name StatusEffect
|
||||
|
||||
signal expired(effect : StatusEffect)
|
||||
|
||||
var stats : StatusStats
|
||||
|
||||
var affected :
|
||||
set(value):
|
||||
affected = value
|
||||
on_attached()
|
||||
var cooldown := 0.0
|
||||
var other_cooldown := 0.0
|
||||
var time_since_proc := 0.0
|
||||
var time_existed := 0.0
|
||||
|
||||
|
||||
func on_attached():
|
||||
func on_attached(affected, existing_effects):
|
||||
pass
|
||||
|
||||
|
||||
func on_removed():
|
||||
expired.emit(self)
|
||||
|
||||
|
||||
func proc():
|
||||
func on_removed(affected, existing_effects):
|
||||
pass
|
||||
|
||||
|
||||
func _ready():
|
||||
other_cooldown = 1.0 / stats.proc_frequency
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
time_existed += delta
|
||||
if time_existed >= stats.duration:
|
||||
on_removed()
|
||||
queue_free()
|
||||
return
|
||||
if stats.proc_frequency > 0.0:
|
||||
cooldown += delta
|
||||
if cooldown >= other_cooldown:
|
||||
cooldown -= other_cooldown
|
||||
proc()
|
||||
|
||||
func proc(affected, stacks, existing_effects):
|
||||
pass
|
||||
|
6
Scripts/StatusEffects/status_poison.gd
Normal file
6
Scripts/StatusEffects/status_poison.gd
Normal file
@ -0,0 +1,6 @@
|
||||
extends StatusEffect
|
||||
class_name StatusPoison
|
||||
|
||||
|
||||
func proc(affected, stacks, existing_effects):
|
||||
affected.damage(stats.potency * stacks)
|
5
Scripts/StatusEffects/status_radioactive.gd
Normal file
5
Scripts/StatusEffects/status_radioactive.gd
Normal file
@ -0,0 +1,5 @@
|
||||
extends StatusEffect
|
||||
class_name StatusRadioactive
|
||||
|
||||
func proc(affected, stacks, existing_effects):
|
||||
affected.damage(stats.potency * stacks)
|
@ -2,17 +2,9 @@ extends StatusEffect
|
||||
class_name StatusSticky
|
||||
|
||||
|
||||
func on_attached():
|
||||
super.on_attached()
|
||||
affected.movement_speed = affected.stats.movement_speed * (1.0 - stats.potency)
|
||||
func on_attached(affected, existing_effects):
|
||||
affected.movement_speed_penalty -= stats.potency
|
||||
|
||||
|
||||
func on_removed():
|
||||
super.on_removed()
|
||||
var siblings = get_parent().get_children()
|
||||
var stickies = 0
|
||||
for node in siblings:
|
||||
if node is StatusSticky:
|
||||
stickies += 1
|
||||
if stickies == 1:
|
||||
affected.movement_speed = affected.stats.movement_speed
|
||||
func on_removed(affected, existing_effects):
|
||||
affected.movement_speed_penalty += stats.potency
|
||||
|
16
Scripts/beelining_controller.gd
Normal file
16
Scripts/beelining_controller.gd
Normal file
@ -0,0 +1,16 @@
|
||||
extends EnemyMovement
|
||||
class_name BeeliningController
|
||||
|
||||
var goal : Node3D
|
||||
var direction : Vector3
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
distance_remaining = character.global_position.distance_squared_to(goal.global_position)
|
||||
direction = character.global_position.direction_to(goal.global_position)
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var distance_travelled = (character.stats.movement_speed * clampf(character.movement_speed_penalty, 0.0, 1.0)) * delta
|
||||
distance_remaining -= distance_travelled
|
||||
character.global_position = character.global_position + (direction * distance_travelled)
|
@ -14,10 +14,10 @@ enum TargetType {LAND = 1, AIR = 2, BOTH = 3}
|
||||
enum EnemyType {LAND = 1, AIR = 2}
|
||||
enum Rarity {COMMON, UNCOMMON, RARE, EPIC, LEGENDARY}
|
||||
var rarity_weights = {
|
||||
"COMMON" = 100,
|
||||
"UNCOMMON" = 60,
|
||||
"RARE" = 20,
|
||||
"EPIC" = 8,
|
||||
"COMMON" = 50,
|
||||
"UNCOMMON" = 30,
|
||||
"RARE" = 10,
|
||||
"EPIC" = 4,
|
||||
"LEGENDARY" = 1
|
||||
}
|
||||
|
||||
@ -38,6 +38,12 @@ func _ready() -> void:
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Gatling/card_gatling.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/GlueLauncher/card_glue_launcher.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Flamethrower/card_flamethrower.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Blowdart/card_blowdart.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Fireball/card_fireball.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Icicle/card_icicle.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Reactor/card_reactor.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Refridgerator/card_refridgerator.tres"))
|
||||
|
||||
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog.tres"))
|
||||
enemies.append(preload("res://Worlds/GreenPlanet/Enemies/dog_fast.tres"))
|
||||
|
6
Scripts/enemy_goal.gd
Normal file
6
Scripts/enemy_goal.gd
Normal file
@ -0,0 +1,6 @@
|
||||
extends Node3D
|
||||
|
||||
|
||||
func _on_area_3d_body_entered(body: Node3D) -> void:
|
||||
if body is EnemyController:
|
||||
body.goal_entered()
|
6
Scripts/enemy_movement.gd
Normal file
6
Scripts/enemy_movement.gd
Normal file
@ -0,0 +1,6 @@
|
||||
extends Node
|
||||
class_name EnemyMovement
|
||||
|
||||
@export var character : CharacterBody3D
|
||||
|
||||
var distance_remaining := 0.0
|
@ -35,19 +35,20 @@ func _process(delta: float) -> void:
|
||||
enemy.stats = enemy_stats
|
||||
enemy.died.connect(signal_for_after_enemy_died)
|
||||
enemy.reached_goal.connect(signal_for_after_enemy_reached_goal)
|
||||
path.add_child(enemy)
|
||||
enemy.movement_controller.path = path.curve
|
||||
add_child(enemy)
|
||||
enemy_spawn_timers[x] -= enemy_stats.spawn_cooldown
|
||||
signal_for_when_enemy_spawns.emit()
|
||||
if type == Data.EnemyType.AIR:
|
||||
var enemy = air_enemy_scene.instantiate() as AirEnemyController
|
||||
var enemy = air_enemy_scene.instantiate() as EnemyController
|
||||
var radius = 10.0
|
||||
var random_dir = Vector3(randf_range(-1, 1), randf_range(-1, 1), randf_range(-1, 1))
|
||||
var random_pos = randf_range(0, radius) * random_dir.normalized()
|
||||
enemy.position = random_pos
|
||||
enemy.stats = enemy_stats
|
||||
enemy.destination = dest
|
||||
enemy.died.connect(signal_for_after_enemy_died)
|
||||
enemy.reached_goal.connect(signal_for_after_enemy_reached_goal)
|
||||
enemy.movement_controller.goal = dest
|
||||
add_child(enemy)
|
||||
enemy_spawn_timers[x] -= enemy_stats.spawn_cooldown
|
||||
signal_for_when_enemy_spawns.emit()
|
||||
|
@ -24,6 +24,13 @@ var objective_health := 120
|
||||
var wave := 0
|
||||
var upcoming_wave
|
||||
var pot : int
|
||||
var UILayer : CanvasLayer
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
UILayer = CanvasLayer.new()
|
||||
UILayer.layer = 2
|
||||
get_tree().root.add_child.call_deferred(UILayer)
|
||||
|
||||
|
||||
func parse_command(text : String, peer_id : int):
|
||||
@ -174,7 +181,7 @@ func lose_game():
|
||||
return
|
||||
game_active = false
|
||||
var menu = lose_game_scene.instantiate()
|
||||
add_child(menu)
|
||||
UILayer.add_child(menu)
|
||||
lost_game.emit()
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
for peer_id in connected_players_nodes:
|
||||
@ -186,7 +193,7 @@ func win_game():
|
||||
return
|
||||
game_active = false
|
||||
var menu = won_game_scene.instantiate()
|
||||
add_child(menu)
|
||||
UILayer.add_child(menu)
|
||||
won_game.emit()
|
||||
Input.mouse_mode = Input.MOUSE_MODE_VISIBLE
|
||||
for peer_id in connected_players_nodes:
|
||||
|
18
Scripts/pathing_controller.gd
Normal file
18
Scripts/pathing_controller.gd
Normal file
@ -0,0 +1,18 @@
|
||||
extends EnemyMovement
|
||||
class_name PathingController
|
||||
|
||||
var path : Curve3D
|
||||
var path_progress = 0.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
distance_remaining = path.get_baked_length()
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
var distance_travelled = (character.stats.movement_speed * clampf(character.movement_speed_penalty, 0.0, 1.0)) * delta
|
||||
distance_remaining -= distance_travelled
|
||||
path_progress += distance_travelled
|
||||
var sample = path.sample_baked_with_rotation(path_progress, true)
|
||||
character.global_position = sample.origin
|
||||
character.look_at(character.global_position + -sample.basis.z)
|
@ -1,7 +1,6 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://bjo2q6vca5qlv"]
|
||||
|
||||
[ext_resource type="Script" path="res://Worlds/GreenPlanet/Enemies/air_enemy_controller.gd" id="1_lyo1o"]
|
||||
[ext_resource type="Resource" uid="uid://dsgkwh3opyqtx" path="res://Worlds/GreenPlanet/Enemies/airenemy.tres" id="2_6qx4a"]
|
||||
[ext_resource type="Script" path="res://Worlds/GreenPlanet/Enemies/enemy_controller.gd" id="1_m83kr"]
|
||||
[ext_resource type="Script" path="res://Scripts/health.gd" id="3_wiose"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqtew0t8sttpm" path="res://Scenes/damage_particle.tscn" id="4_mhq3m"]
|
||||
[ext_resource type="Script" path="res://Scripts/hitbox.gd" id="5_433ie"]
|
||||
@ -9,19 +8,21 @@
|
||||
[ext_resource type="Texture2D" uid="uid://r202vo47jw1q" path="res://Assets/Textures/enemyhealth.png" id="8_77uyi"]
|
||||
[ext_resource type="Script" path="res://Scripts/StatusEffector.gd" id="9_7hati"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1fn60m6xfcsq" path="res://Assets/Textures/minimap_enemy.png" id="9_7yfyh"]
|
||||
[ext_resource type="Script" path="res://Scripts/beelining_controller.gd" id="9_cx8mv"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_21dgw"]
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ss5ir"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager") groups=["Enemies"]]
|
||||
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health") groups=["Enemies"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
motion_mode = 1
|
||||
script = ExtResource("1_lyo1o")
|
||||
stats = ExtResource("2_6qx4a")
|
||||
script = ExtResource("1_m83kr")
|
||||
status_manager = NodePath("StatusEffector")
|
||||
movement_controller = NodePath("BeeliningController")
|
||||
health = NodePath("Health")
|
||||
|
||||
[node name="Health" type="Node" parent="."]
|
||||
script = ExtResource("3_wiose")
|
||||
@ -32,7 +33,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.527022, 0)
|
||||
shape = SubResource("SphereShape3D_21dgw")
|
||||
script = ExtResource("5_433ie")
|
||||
|
||||
[node name="Sprite3D3" type="Sprite3D" parent="."]
|
||||
[node name="DirectionSprite" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1.56, 0, 0, 0, 1.56, 0, 0, 0, 1.56, 0, 0.546419, 0)
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
@ -51,9 +52,10 @@ layers = 4
|
||||
texture_filter = 0
|
||||
texture = ExtResource("9_7yfyh")
|
||||
|
||||
[node name="StatusEffector" type="Node3D" parent="." node_paths=PackedStringArray("hbox")]
|
||||
[node name="StatusEffector" type="Node3D" parent="." node_paths=PackedStringArray("hbox", "enemy")]
|
||||
script = ExtResource("9_7hati")
|
||||
hbox = NodePath("../SubViewport/HBoxContainer")
|
||||
enemy = NodePath("..")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="."]
|
||||
transparent_bg = true
|
||||
@ -80,6 +82,10 @@ fill_mode = 6
|
||||
texture_progress = ExtResource("8_77uyi")
|
||||
tint_progress = Color(0, 1, 0, 1)
|
||||
|
||||
[node name="BeeliningController" type="Node" parent="." node_paths=PackedStringArray("character")]
|
||||
script = ExtResource("9_cx8mv")
|
||||
character = NodePath("..")
|
||||
|
||||
[connection signal="health_changed" from="Health" to="." method="_on_health_health_changed"]
|
||||
[connection signal="health_depleted" from="Health" to="." method="_on_health_health_depleted"]
|
||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||
|
@ -10,6 +10,7 @@ var alive = true
|
||||
@export var status_manager : StatusEffector
|
||||
|
||||
var movement_speed
|
||||
var movement_speed_penalty := 1.0
|
||||
var progress := 0.0
|
||||
var progress_ratio := 0.0
|
||||
var destination : Node3D
|
||||
@ -28,8 +29,8 @@ func damage(amount):
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
progress += movement_speed * delta
|
||||
velocity = global_position.direction_to(destination.global_position) * movement_speed
|
||||
progress += (movement_speed * clampf(movement_speed_penalty, 0.0, 1.0)) * delta
|
||||
velocity = global_position.direction_to(destination.global_position) * (movement_speed * clampf(movement_speed_penalty, 0.0, 1.0))
|
||||
move_and_slide()
|
||||
if global_position.distance_to(destination.global_position) <= 1.0:
|
||||
reached_goal.emit(stats, stats.penalty)
|
||||
|
@ -11,7 +11,7 @@ target_type = 2
|
||||
icon = ExtResource("1_57rr1")
|
||||
sprite = ExtResource("3_homny")
|
||||
spawn_power = 4
|
||||
health = 40
|
||||
health = 30
|
||||
penalty = 4
|
||||
movement_speed = 1.5
|
||||
spawn_cooldown = 0.5
|
||||
|
@ -10,8 +10,8 @@ title = "spike"
|
||||
target_type = 2
|
||||
icon = ExtResource("1_22o7e")
|
||||
sprite = ExtResource("3_tbb38")
|
||||
spawn_power = 8
|
||||
health = 100
|
||||
spawn_power = 6
|
||||
health = 90
|
||||
penalty = 7
|
||||
movement_speed = 1.0
|
||||
spawn_cooldown = 1.0
|
||||
|
@ -17,7 +17,7 @@ target_type = 1
|
||||
icon = ExtResource("1_es0ht")
|
||||
sprite = SubResource("AtlasTexture_n6kdu")
|
||||
spawn_power = 10
|
||||
health = 200
|
||||
health = 180
|
||||
penalty = 10
|
||||
movement_speed = 1.2
|
||||
spawn_cooldown = 1.2
|
||||
|
@ -11,7 +11,7 @@ target_type = 1
|
||||
icon = ExtResource("1_lck53")
|
||||
sprite = ExtResource("2_7nc4x")
|
||||
spawn_power = 14
|
||||
health = 400
|
||||
health = 350
|
||||
penalty = 10
|
||||
movement_speed = 0.8
|
||||
spawn_cooldown = 2.0
|
||||
|
@ -1,48 +1,48 @@
|
||||
extends PathFollow3D
|
||||
extends CharacterBody3D
|
||||
class_name EnemyController
|
||||
|
||||
signal reached_goal(enemy, penalty)
|
||||
signal died(enemy)
|
||||
|
||||
var alive = true
|
||||
|
||||
@export var stats : Enemy
|
||||
@export var status_manager : StatusEffector
|
||||
@export var movement_controller : EnemyMovement
|
||||
@export var health : Health
|
||||
|
||||
var movement_speed
|
||||
var movement_speed_penalty := 1.0
|
||||
var alive = true
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
$Dog/Health.max_health = stats.health
|
||||
$Dog/Health.current_health = stats.health
|
||||
$Dog/SubViewport/ProgressBar.max_value = stats.health
|
||||
$Dog/SubViewport/ProgressBar.value = stats.health
|
||||
$Dog/DirectionSprite.texture = stats.sprite.duplicate()
|
||||
health.max_health = stats.health
|
||||
health.current_health = stats.health
|
||||
$SubViewport/ProgressBar.max_value = stats.health
|
||||
$SubViewport/ProgressBar.value = stats.health
|
||||
$DirectionSprite.texture = stats.sprite.duplicate()
|
||||
movement_speed = stats.movement_speed
|
||||
|
||||
|
||||
func damage(amount):
|
||||
$Dog/Hitbox.damage(amount)
|
||||
$Hitbox.damage(amount)
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
progress += movement_speed * delta
|
||||
if progress_ratio >= 1:
|
||||
func goal_entered():
|
||||
if alive:
|
||||
alive = false
|
||||
reached_goal.emit(stats, stats.penalty)
|
||||
queue_free()
|
||||
|
||||
|
||||
func die():
|
||||
died.emit(stats)
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_health_health_depleted() -> void:
|
||||
if alive:
|
||||
alive = false
|
||||
die()
|
||||
died.emit(stats)
|
||||
queue_free()
|
||||
|
||||
|
||||
func _on_health_health_changed(health) -> void:
|
||||
$Dog/SubViewport/ProgressBar.value = health
|
||||
var percent = float($Dog/Health.current_health) / float($Dog/Health.max_health)
|
||||
$Dog/SubViewport/ProgressBar.tint_progress = Color(1 - percent, percent, 0.0)
|
||||
$Dog/SubViewport/ProgressBar.set_visible(true)
|
||||
func _on_health_health_changed(value) -> void:
|
||||
$SubViewport/ProgressBar.value = value
|
||||
var percent = float(health.current_health) / float(health.max_health)
|
||||
$SubViewport/ProgressBar.tint_progress = Color(1 - percent, percent, 0.0)
|
||||
$SubViewport/ProgressBar.set_visible(true)
|
||||
|
@ -3,79 +3,78 @@
|
||||
[ext_resource type="Script" path="res://Worlds/GreenPlanet/Enemies/enemy_controller.gd" id="1_fwsjt"]
|
||||
[ext_resource type="Script" path="res://Scripts/hitbox.gd" id="2_j8yin"]
|
||||
[ext_resource type="PackedScene" uid="uid://ri8r03wqy80t" path="res://Scenes/8_direction_sprite.tscn" id="2_o7jmg"]
|
||||
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Worlds/GreenPlanet/Enemies/dog.tres" id="2_sswqn"]
|
||||
[ext_resource type="Script" path="res://Scripts/health.gd" id="2_swu53"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj13g1w14mekw" path="res://Assets/Textures/eye_dog.png" id="3_naknq"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqtew0t8sttpm" path="res://Scenes/damage_particle.tscn" id="4_tn1tu"]
|
||||
[ext_resource type="Texture2D" uid="uid://r202vo47jw1q" path="res://Assets/Textures/enemyhealth.png" id="8_5ba7s"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1fn60m6xfcsq" path="res://Assets/Textures/minimap_enemy.png" id="9_f8btv"]
|
||||
[ext_resource type="Script" path="res://Scripts/pathing_controller.gd" id="10_gljle"]
|
||||
[ext_resource type="Script" path="res://Scripts/StatusEffector.gd" id="10_txouh"]
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_21dgw"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_75ly7"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_73qac"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("3_naknq")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_4tj6k"]
|
||||
viewport_path = NodePath("Dog/SubViewport")
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="PathFollow3D" type="PathFollow3D" node_paths=PackedStringArray("status_manager") groups=["Enemies"]]
|
||||
loop = false
|
||||
script = ExtResource("1_fwsjt")
|
||||
stats = ExtResource("2_sswqn")
|
||||
status_manager = NodePath("Dog/StatusEffector")
|
||||
|
||||
[node name="Dog" type="CharacterBody3D" parent="."]
|
||||
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health") groups=["Enemies"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_fwsjt")
|
||||
status_manager = NodePath("StatusEffector")
|
||||
movement_controller = NodePath("PathingController")
|
||||
health = NodePath("Health")
|
||||
|
||||
[node name="Health" type="Node" parent="Dog"]
|
||||
[node name="Health" type="Node" parent="."]
|
||||
script = ExtResource("2_swu53")
|
||||
damage_particle_scene = ExtResource("4_tn1tu")
|
||||
|
||||
[node name="Hitbox" type="CollisionShape3D" parent="Dog"]
|
||||
[node name="Hitbox" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.527022, 0)
|
||||
shape = SubResource("SphereShape3D_21dgw")
|
||||
script = ExtResource("2_j8yin")
|
||||
|
||||
[node name="DirectionSprite" parent="Dog" instance=ExtResource("2_o7jmg")]
|
||||
[node name="DirectionSprite" parent="." instance=ExtResource("2_o7jmg")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.642479, 0)
|
||||
pixel_size = 0.04
|
||||
texture = SubResource("AtlasTexture_75ly7")
|
||||
texture = SubResource("AtlasTexture_73qac")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="Dog"]
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 1.20821, 0)
|
||||
pixel_size = 0.02
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
texture = SubResource("ViewportTexture_4tj6k")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Dog"]
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(2, 0, 0, 0, -8.74228e-08, 2, 0, -2, -8.74228e-08, 0, 1.40824, 0)
|
||||
layers = 4
|
||||
texture_filter = 0
|
||||
texture = ExtResource("9_f8btv")
|
||||
|
||||
[node name="StatusEffector" type="Node3D" parent="Dog" node_paths=PackedStringArray("hbox")]
|
||||
[node name="StatusEffector" type="Node3D" parent="." node_paths=PackedStringArray("hbox", "enemy")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1.18114, 0)
|
||||
script = ExtResource("10_txouh")
|
||||
hbox = NodePath("../SubViewport/HBoxContainer")
|
||||
enemy = NodePath("..")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="Dog"]
|
||||
[node name="SubViewport" type="SubViewport" parent="."]
|
||||
transparent_bg = true
|
||||
size = Vector2i(200, 55)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="Dog/SubViewport"]
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="SubViewport"]
|
||||
anchors_preset = 10
|
||||
anchor_right = 1.0
|
||||
offset_bottom = 32.0
|
||||
grow_horizontal = 2
|
||||
alignment = 1
|
||||
|
||||
[node name="ProgressBar" type="TextureProgressBar" parent="Dog/SubViewport"]
|
||||
[node name="ProgressBar" type="TextureProgressBar" parent="SubViewport"]
|
||||
visible = false
|
||||
offset_top = 36.0
|
||||
offset_right = 200.0
|
||||
@ -88,6 +87,10 @@ fill_mode = 6
|
||||
texture_progress = ExtResource("8_5ba7s")
|
||||
tint_progress = Color(0, 1, 0, 1)
|
||||
|
||||
[connection signal="health_changed" from="Dog/Health" to="." method="_on_health_health_changed"]
|
||||
[connection signal="health_depleted" from="Dog/Health" to="." method="_on_health_health_depleted"]
|
||||
[connection signal="took_damage" from="Dog/Hitbox" to="Dog/Health" method="take_damage"]
|
||||
[node name="PathingController" type="Node" parent="." node_paths=PackedStringArray("character")]
|
||||
script = ExtResource("10_gljle")
|
||||
character = NodePath("..")
|
||||
|
||||
[connection signal="health_changed" from="Health" to="." method="_on_health_health_changed"]
|
||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=20 format=3 uid="uid://y1qa1g3ic8sp"]
|
||||
[gd_scene load_steps=21 format=3 uid="uid://y1qa1g3ic8sp"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/level.gd" id="1_ws6nn"]
|
||||
[ext_resource type="PackedScene" uid="uid://d2yv447trxkwt" path="res://Scenes/enemy_spawner.tscn" id="3_5imwp"]
|
||||
@ -9,10 +9,10 @@
|
||||
[ext_resource type="Resource" uid="uid://dsgkwh3opyqtx" path="res://Worlds/GreenPlanet/Enemies/airenemy.tres" id="7_07st7"]
|
||||
[ext_resource type="Resource" uid="uid://bffhb5krs5elm" path="res://Worlds/GreenPlanet/Enemies/airenemy2.tres" id="8_sf1ao"]
|
||||
[ext_resource type="PackedScene" uid="uid://1b2ikdanl66b" path="res://Scenes/card_constructor.tscn" id="9_r25gu"]
|
||||
[ext_resource type="Script" path="res://Scripts/enemy_goal.gd" id="9_s3rd7"]
|
||||
[ext_resource type="PackedScene" uid="uid://iohlxrso4bl8" path="res://Worlds/GreenPlanet/Decorations/tree.tscn" id="10_7v1co"]
|
||||
[ext_resource type="Script" path="res://Scripts/AStarGraph3D.gd" id="11_07ukk"]
|
||||
[ext_resource type="Script" path="res://Scripts/visualized_path.gd" id="11_d7ofl"]
|
||||
[ext_resource type="PackedScene" uid="uid://bjo2q6vca5qlv" path="res://Worlds/GreenPlanet/Enemies/air_enemy.tscn" id="12_tqi5x"]
|
||||
[ext_resource type="MeshLibrary" uid="uid://jfr8j8kycfa5" path="res://Worlds/GreenPlanet/tilemap.tres" id="12_ywwug"]
|
||||
|
||||
[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_h1csw"]
|
||||
@ -25,6 +25,8 @@ sky_material = SubResource("PhysicalSkyMaterial_h1csw")
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_t42h5")
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_awjk1"]
|
||||
|
||||
[sub_resource type="Curve3D" id="Curve3D_suxqu"]
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_kkwvm"]
|
||||
@ -56,10 +58,18 @@ environment = SubResource("Environment_l41d0")
|
||||
|
||||
[node name="EnemyGoal" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 23, 0.5, 0)
|
||||
script = ExtResource("9_s3rd7")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="EnemyGoal"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
|
||||
[node name="Area3D" type="Area3D" parent="EnemyGoal"]
|
||||
collision_mask = 4
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="EnemyGoal/Area3D"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.5, 0)
|
||||
shape = SubResource("BoxShape3D_awjk1")
|
||||
|
||||
[node name="VisualizedPath" type="Path3D" parent="."]
|
||||
curve = SubResource("Curve3D_suxqu")
|
||||
script = ExtResource("11_d7ofl")
|
||||
@ -69,13 +79,11 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -20, 0.5, 0)
|
||||
path = NodePath("../VisualizedPath")
|
||||
type = 1
|
||||
dest = NodePath("../EnemyGoal")
|
||||
air_enemy_scene = ExtResource("12_tqi5x")
|
||||
|
||||
[node name="AirSpawn" parent="." node_paths=PackedStringArray("dest") instance=ExtResource("3_5imwp")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -47.0801, 22.5492, 0)
|
||||
type = 2
|
||||
dest = NodePath("../EnemyGoal")
|
||||
air_enemy_scene = ExtResource("12_tqi5x")
|
||||
|
||||
[node name="CardPrinter" parent="." instance=ExtResource("9_r25gu")]
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 25.1496, 0.499996, 5.79039)
|
||||
@ -564,3 +572,5 @@ collision_mask = 0
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="InvisibleWalls/StaticBody3D4"]
|
||||
shape = SubResource("BoxShape3D_kkwvm")
|
||||
|
||||
[connection signal="body_entered" from="EnemyGoal/Area3D" to="EnemyGoal" method="_on_area_3d_body_entered"]
|
||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user