fixed the parity between air and land enemies. +added a lot of new cards
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user