we're so close to working multiplayer
@ -1,7 +0,0 @@
|
||||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://bgt3j4cuq814m"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dyqh1uu4pocv1" path="res://Assets/Textures/green.png" id="1_gvbxi"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_gvbxi")
|
||||
region = Rect2(0, 0, 96, 96)
|
@ -1,7 +0,0 @@
|
||||
[gd_resource type="AtlasTexture" load_steps=2 format=3 uid="uid://hxev3a2ktya"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://cjqxkraykhxxk" path="res://Assets/Textures/red.png" id="1_ecb2i"]
|
||||
|
||||
[resource]
|
||||
atlas = ExtResource("1_ecb2i")
|
||||
region = Rect2(0, 0, 96, 96)
|
Before Width: | Height: | Size: 1.9 KiB After Width: | Height: | Size: 1.3 KiB |
BIN
Assets/Textures/cardborders.png~
Normal file
After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.1 KiB |
BIN
Assets/Textures/cardhand.png.kra
Normal file
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.2 KiB |
BIN
PCs/Blue/blue.png
Normal file
After Width: | Height: | Size: 4.9 KiB |
34
PCs/Blue/blue.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cnedls3i4gso"
|
||||
path="res://.godot/imported/blue.png-fe2dd0c7f45bbe48ab43f0cd684bc51c.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://PCs/Blue/blue.png"
|
||||
dest_files=["res://.godot/imported/blue.png-fe2dd0c7f45bbe48ab43f0cd684bc51c.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
|
@ -1,11 +1,13 @@
|
||||
[gd_resource type="Resource" script_class="HeroClass" load_steps=5 format=3 uid="uid://dxonpv8qbyrjy"]
|
||||
[gd_resource type="Resource" script_class="HeroClass" load_steps=6 format=3 uid="uid://dxonpv8qbyrjy"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/hero_class.gd" id="1_aeu85"]
|
||||
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="1_uvyoy"]
|
||||
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="2_3yr5a"]
|
||||
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="3_wyb0n"]
|
||||
[ext_resource type="Texture2D" uid="uid://cnedls3i4gso" path="res://PCs/Blue/blue.png" id="5_qucwv"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_aeu85")
|
||||
hero_name = "Blue"
|
||||
texture = ExtResource("5_qucwv")
|
||||
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("1_uvyoy"), ExtResource("2_3yr5a"), ExtResource("3_wyb0n")])
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@ -3,15 +3,15 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dyqh1uu4pocv1"
|
||||
path="res://.godot/imported/green.png-1858fb7b418df7714b6f9cb16192a802.ctex"
|
||||
path="res://.godot/imported/green.png-38b6db0d66c1c24a46a0ff72679363ac.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/green.png"
|
||||
dest_files=["res://.godot/imported/green.png-1858fb7b418df7714b6f9cb16192a802.ctex"]
|
||||
source_file="res://PCs/Green/green.png"
|
||||
dest_files=["res://.godot/imported/green.png-38b6db0d66c1c24a46a0ff72679363ac.ctex"]
|
||||
|
||||
[params]
|
||||
|
@ -2,12 +2,12 @@
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/hero_class.gd" id="1_cpfpk"]
|
||||
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="1_hv6hq"]
|
||||
[ext_resource type="Texture2D" uid="uid://bgt3j4cuq814m" path="res://Assets/TextureAtlases/green.tres" id="2_4p73e"]
|
||||
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="2_jdi4m"]
|
||||
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="3_f04lj"]
|
||||
[ext_resource type="Texture2D" uid="uid://dyqh1uu4pocv1" path="res://PCs/Green/green.png" id="5_vhx4f"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_cpfpk")
|
||||
hero_name = "Green"
|
||||
texture = ExtResource("2_4p73e")
|
||||
texture = ExtResource("5_vhx4f")
|
||||
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("3_f04lj"), ExtResource("1_hv6hq"), ExtResource("2_jdi4m")])
|
||||
|
Before Width: | Height: | Size: 4.9 KiB After Width: | Height: | Size: 4.9 KiB |
@ -3,7 +3,7 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cjqxkraykhxxk"
|
||||
path.s3tc="res://.godot/imported/red.png-906118aab604286bad2aef98ee509875.s3tc.ctex"
|
||||
path.s3tc="res://.godot/imported/red.png-b25127c86ab818d9451ad43b9c8c60be.s3tc.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
@ -11,8 +11,8 @@ metadata={
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Assets/Textures/red.png"
|
||||
dest_files=["res://.godot/imported/red.png-906118aab604286bad2aef98ee509875.s3tc.ctex"]
|
||||
source_file="res://PCs/Red/red.png"
|
||||
dest_files=["res://.godot/imported/red.png-b25127c86ab818d9451ad43b9c8c60be.s3tc.ctex"]
|
||||
|
||||
[params]
|
||||
|
@ -3,11 +3,11 @@
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/hero_class.gd" id="1_1wkap"]
|
||||
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://PCs/Universal/ClassCards/Assault/card_assault.tres" id="1_iiksa"]
|
||||
[ext_resource type="Resource" uid="uid://ckm88acryitl4" path="res://PCs/Universal/ClassCards/Sniper/card_sniper.tres" id="2_hkiwr"]
|
||||
[ext_resource type="Texture2D" uid="uid://hxev3a2ktya" path="res://Assets/TextureAtlases/red.tres" id="2_kjc7g"]
|
||||
[ext_resource type="Resource" uid="uid://b37r54q84vqoi" path="res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres" id="3_ruhqi"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjqxkraykhxxk" path="res://PCs/Red/red.png" id="5_raux1"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_1wkap")
|
||||
hero_name = "Red"
|
||||
texture = ExtResource("2_kjc7g")
|
||||
texture = ExtResource("5_raux1")
|
||||
deck = Array[Resource("res://Scripts/Resources/card.gd")]([ExtResource("2_hkiwr"), ExtResource("3_ruhqi"), ExtResource("1_iiksa")])
|
||||
|
@ -11,7 +11,7 @@ value = 1.0
|
||||
[sub_resource type="Resource" id="Resource_2e75s"]
|
||||
script = ExtResource("1_cwxf1")
|
||||
key = "Damage"
|
||||
value = 1.0
|
||||
value = 0.5
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1vpnf"]
|
||||
script = ExtResource("1_cwxf1")
|
||||
|
@ -3,20 +3,19 @@
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://dnlplq8duves3"
|
||||
path.s3tc="res://.godot/imported/blowdart.png-bf139154f6dbb2ce97655e4664c07987.s3tc.ctex"
|
||||
path="res://.godot/imported/blowdart.png-bf139154f6dbb2ce97655e4664c07987.ctex"
|
||||
metadata={
|
||||
"imported_formats": ["s3tc_bptc"],
|
||||
"vram_texture": true
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://PCs/Universal/ClassCards/Blowdart/blowdart.png"
|
||||
dest_files=["res://.godot/imported/blowdart.png-bf139154f6dbb2ce97655e4664c07987.s3tc.ctex"]
|
||||
dest_files=["res://.godot/imported/blowdart.png-bf139154f6dbb2ce97655e4664c07987.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=2
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
|
@ -1,10 +0,0 @@
|
||||
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)
|
@ -1,9 +1,23 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=2 format=3 uid="uid://bywwtjdjsgdsj"]
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://bywwtjdjsgdsj"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_nobd8"]
|
||||
[ext_resource type="Texture2D" uid="uid://dnlplq8duves3" path="res://PCs/Universal/ClassCards/Blowdart/blowdart.png" id="2_jglqy"]
|
||||
[ext_resource type="PackedScene" uid="uid://cy05ssd52exf0" path="res://PCs/Universal/ClassCards/Blowdart/weapon_blowdart.tscn" id="3_shm45"]
|
||||
[ext_resource type="Resource" uid="uid://cfbap4o68urti" path="res://PCs/Universal/ClassCards/Blowdart/tower_stats.tres" id="3_t7ppb"]
|
||||
[ext_resource type="PackedScene" uid="uid://cq5q6c28pwi47" path="res://PCs/Universal/ClassCards/Blowdart/tower_blowdart.tscn" id="4_wvh75"]
|
||||
[ext_resource type="Resource" uid="uid://c6e50linnk2i7" path="res://PCs/Universal/ClassCards/Blowdart/weapon_stats.tres" id="4_x71t4"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_jl74p"]
|
||||
atlas = ExtResource("2_jglqy")
|
||||
region = Rect2(0, 0, 64, 64)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_nobd8")
|
||||
title = "Blowdart"
|
||||
rarity = 0
|
||||
rarity = 2
|
||||
faction = 0
|
||||
sprite = SubResource("AtlasTexture_jl74p")
|
||||
turret_scene = ExtResource("4_wvh75")
|
||||
weapon_scene = ExtResource("3_shm45")
|
||||
weapon_stats = ExtResource("4_x71t4")
|
||||
tower_stats = ExtResource("3_t7ppb")
|
||||
|
8
PCs/Universal/ClassCards/Blowdart/tower_blowdart.gd
Normal file
@ -0,0 +1,8 @@
|
||||
extends StatusApplyingTower
|
||||
class_name BlowdartTower
|
||||
|
||||
|
||||
func build_status_object() -> StatusEffect:
|
||||
var status = StatusDoT.new()
|
||||
status.stats = status_stats
|
||||
return status
|
@ -1,39 +1,11 @@
|
||||
[gd_scene load_steps=5 format=3 uid="uid://qkvo6ibgfrlb"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://cq5q6c28pwi47"]
|
||||
|
||||
[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"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxwtlvv632ae8" path="res://Scenes/Towers/status_applying_tower.tscn" id="1_lnpfa"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Blowdart/tower_blowdart.gd" id="2_s3qd0"]
|
||||
[ext_resource type="Resource" uid="uid://cbskijhnnj3kw" path="res://Resources/StatusEffects/poisoned.tres" id="3_ix50y"]
|
||||
[ext_resource type="Resource" uid="uid://cfbap4o68urti" path="res://PCs/Universal/ClassCards/Blowdart/tower_stats.tres" id="4_1w7pa"]
|
||||
|
||||
[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")
|
||||
[node name="BlowdartTower" instance=ExtResource("1_lnpfa")]
|
||||
script = ExtResource("2_s3qd0")
|
||||
status_stats = ExtResource("3_ix50y")
|
||||
stats = ExtResource("4_1w7pa")
|
||||
|
25
PCs/Universal/ClassCards/Blowdart/tower_stats.tres
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://cfbap4o68urti"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_jxacs"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_eifl4"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1txa7"]
|
||||
script = ExtResource("1_jxacs")
|
||||
key = "Damage"
|
||||
value = 0.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_46kv2"]
|
||||
script = ExtResource("1_jxacs")
|
||||
key = "Range"
|
||||
value = 20.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gb76x"]
|
||||
script = ExtResource("1_jxacs")
|
||||
key = "Fire Delay"
|
||||
value = 2.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_eifl4")
|
||||
target_type = 3
|
||||
attributes = Array[ExtResource("1_jxacs")]([SubResource("Resource_1txa7"), SubResource("Resource_46kv2"), SubResource("Resource_gb76x")])
|
||||
text = "Fires every /Fire Delay\\s, applying one stack of Poison at a range of /Range\\m"
|
@ -13,15 +13,7 @@ region = Rect2(0, 0, 64, 64)
|
||||
[node name="BlowdartWeapon" instance=ExtResource("1_t3gfv")]
|
||||
script = ExtResource("2_g1m1f")
|
||||
status_stats = ExtResource("3_wculg")
|
||||
raycast = Object(RayCast3D,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"editor_description":"","transform":Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0),"rotation_edit_mode":0,"rotation_order":2,"top_level":false,"visible":true,"visibility_parent":NodePath(""),"enabled":true,"exclude_parent":true,"target_position":Vector3(0, 0, -1),"collision_mask":4,"hit_from_inside":false,"collide_with_areas":false,"collide_with_bodies":true,"debug_shape_custom_color":Color(0, 0, 0, 1),"debug_shape_thickness":2,"script":null)
|
||||
|
||||
range_debug_indicator = Object(CSGSphere3D,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"editor_description":"","transform":Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0),"rotation_edit_mode":0,"rotation_order":2,"top_level":false,"visible":false,"visibility_parent":NodePath(""),"layers":1,"sorting_offset":0.0,"sorting_use_aabb_center":true,"material_override":null,"material_overlay":null,"transparency":0.0,"cast_shadow":1,"extra_cull_margin":0.0,"custom_aabb":AABB(0, 0, 0, 0, 0, 0),"lod_bias":1.0,"ignore_occlusion_culling":false,"gi_mode":1,"gi_lightmap_scale":0,"visibility_range_begin":0.0,"visibility_range_begin_margin":0.0,"visibility_range_end":0.0,"visibility_range_end_margin":0.0,"visibility_range_fade_mode":0,"operation":0,"snap":0.001,"calculate_tangents":true,"use_collision":false,"collision_layer":1,"collision_mask":1,"collision_priority":1.0,"flip_faces":false,"radius":4.104,"radial_segments":16,"rings":16,"smooth_faces":true,"material":null,"script":null)
|
||||
|
||||
stats = ExtResource("4_dwqec")
|
||||
animator = Object(AnimationPlayer,"_import_path":NodePath(""),"unique_name_in_owner":false,"process_mode":0,"process_priority":0,"process_physics_priority":0,"process_thread_group":0,"editor_description":"","root_node":NodePath(".."),"autoplay":"","reset_on_save":true,"playback_process_mode":1,"playback_default_blend_time":0.0,"speed_scale":1.0,"method_call_mode":0,"audio_max_polyphony":32,"movie_quit_on_finish":false,"libraries":{
|
||||
"": null
|
||||
},"blend_times":[],"script":null)
|
||||
|
||||
|
||||
[node name="Sprite3D" parent="." index="0"]
|
||||
texture = SubResource("AtlasTexture_85web")
|
||||
|
@ -20,5 +20,6 @@ value = 0.8
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_5ldx7")
|
||||
target_type = 0
|
||||
attributes = Array[ExtResource("1_pw5it")]([SubResource("Resource_1txa7"), SubResource("Resource_46kv2"), SubResource("Resource_gb76x")])
|
||||
text = "Fires every /Fire Delay\\s, applying one stack of Poison at a range of /Range\\m"
|
||||
|
@ -1,30 +0,0 @@
|
||||
extends Tower
|
||||
class_name BombTower
|
||||
|
||||
@export var bomb_scene: PackedScene
|
||||
var firing_velocity
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
firing_velocity = sqrt((stats.fire_range * ProjectSettings.get_setting("physics/3d/default_gravity")) / sin(2 * 45))
|
||||
|
||||
|
||||
func shoot():
|
||||
var bomb = bomb_scene.instantiate() as Bomb
|
||||
bomb.position = model.global_position
|
||||
bomb.damage = stats.damage
|
||||
get_tree().root.add_child(bomb)
|
||||
bomb.apply_impulse(-model.global_transform.basis.z * firing_velocity)
|
||||
|
||||
|
||||
func aim():
|
||||
var pos = Vector2(global_position.x, global_position.z)
|
||||
var t_pos = Vector2(targeted_enemy.global_position.x, targeted_enemy.global_position.z)
|
||||
var x = pos.distance_to(t_pos)
|
||||
var y = targeted_enemy.global_position.y - global_position.y
|
||||
var v = firing_velocity
|
||||
var g = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
var v2 = pow(v, 2)
|
||||
var angle = atan((v2 + sqrt(pow(v, 4) - g * ((g * pow(x, 2)) + (2 * y * v2)))) / (g * x))
|
||||
model.look_at(Vector3(t_pos.x, model.global_position.y, t_pos.y))
|
||||
model.rotate(model.global_transform.basis.x.normalized(), angle)
|
@ -11,7 +11,7 @@ func aim():
|
||||
var pos = Vector2(global_position.x, global_position.z)
|
||||
var t_pos = Vector2(targeted_enemy.global_position.x, targeted_enemy.global_position.z)
|
||||
var x = pos.distance_to(t_pos)
|
||||
var y = targeted_enemy.global_position.y - (global_position.y + 1)
|
||||
var y = targeted_enemy.global_position.y - global_position.y
|
||||
var v = force
|
||||
var g = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
var v2 = pow(v, 2)
|
||||
|
@ -1,8 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=6 format=3 uid="uid://bibx2my7igspq"]
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://bibx2my7igspq"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_qktm8"]
|
||||
[ext_resource type="Texture2D" uid="uid://mwgpnnm3g3re" path="res://PCs/Universal/ClassCards/Fireball/fireball.png" id="2_lfltq"]
|
||||
[ext_resource type="Resource" uid="uid://dnvqghpwyuw84" path="res://PCs/Universal/ClassCards/Fireball/tower_stats.tres" id="3_1l6fp"]
|
||||
[ext_resource type="PackedScene" uid="uid://dnwjfb4fexr0o" path="res://PCs/Universal/ClassCards/Fireball/weapon_fireball.tscn" id="3_4c0mu"]
|
||||
[ext_resource type="PackedScene" uid="uid://dwwgvgn0ds8tk" path="res://PCs/Universal/ClassCards/Fireball/tower_fireball.tscn" id="4_e3adw"]
|
||||
[ext_resource type="Resource" uid="uid://dhwhwicgpw7yh" path="res://PCs/Universal/ClassCards/Fireball/weapon_stats.tres" id="4_folo6"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_wvh1s"]
|
||||
@ -15,5 +17,7 @@ title = "Fireball"
|
||||
rarity = 3
|
||||
faction = 0
|
||||
sprite = SubResource("AtlasTexture_wvh1s")
|
||||
turret_scene = ExtResource("4_e3adw")
|
||||
weapon_scene = ExtResource("3_4c0mu")
|
||||
weapon_stats = ExtResource("4_folo6")
|
||||
tower_stats = ExtResource("3_1l6fp")
|
||||
|
@ -1,13 +0,0 @@
|
||||
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
|
2
PCs/Universal/ClassCards/Fireball/tower_fireball.gd
Normal file
@ -0,0 +1,2 @@
|
||||
extends ProjectileTower
|
||||
class_name FireballTower
|
@ -1,41 +1,11 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://dr2bmfj8fquxr"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://dwwgvgn0ds8tk"]
|
||||
|
||||
[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"]
|
||||
[ext_resource type="PackedScene" uid="uid://t0b32qb8eub2" path="res://Scenes/Towers/projectile_tower.tscn" id="1_rkdu6"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Fireball/tower_fireball.gd" id="2_td8dh"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddpixntjsbpqp" path="res://PCs/Universal/ClassCards/Fireball/fireball_projectile.tscn" id="3_1akv8"]
|
||||
[ext_resource type="Resource" uid="uid://dnvqghpwyuw84" path="res://PCs/Universal/ClassCards/Fireball/tower_stats.tres" id="4_uu77s"]
|
||||
|
||||
[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")
|
||||
[node name="FireballTower" instance=ExtResource("1_rkdu6")]
|
||||
script = ExtResource("2_td8dh")
|
||||
projectile_scene = ExtResource("3_1akv8")
|
||||
stats = ExtResource("4_uu77s")
|
||||
|
25
PCs/Universal/ClassCards/Fireball/tower_stats.tres
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://dnvqghpwyuw84"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_tvubo"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_26lj8"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_68ba3"]
|
||||
script = ExtResource("1_tvubo")
|
||||
key = "Fire Delay"
|
||||
value = 3.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gogvm"]
|
||||
script = ExtResource("1_tvubo")
|
||||
key = "Damage"
|
||||
value = 5.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pswb4"]
|
||||
script = ExtResource("1_tvubo")
|
||||
key = "Range"
|
||||
value = 15.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_26lj8")
|
||||
target_type = 3
|
||||
attributes = Array[ExtResource("1_tvubo")]([SubResource("Resource_68ba3"), SubResource("Resource_gogvm"), SubResource("Resource_pswb4")])
|
||||
text = "Conjures a fireball every /Fire Delay\\s that deals /Damage\\ and apply Burning to enemies caught in its blast"
|
@ -1,8 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=2 format=3 uid="uid://dhwhwicgpw7yh"]
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://dhwhwicgpw7yh"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_80jfw"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_hmbwy"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_68ba3"]
|
||||
script = ExtResource("1_80jfw")
|
||||
key = "Fire Delay"
|
||||
value = 2.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gogvm"]
|
||||
script = ExtResource("1_80jfw")
|
||||
key = "Damage"
|
||||
value = 5.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pswb4"]
|
||||
script = ExtResource("1_80jfw")
|
||||
key = "Range"
|
||||
value = 15.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_hmbwy")
|
||||
attributes = Array[Resource("res://Scripts/Resources/stat_attribute.gd")]([])
|
||||
text = ""
|
||||
target_type = 0
|
||||
attributes = Array[ExtResource("1_80jfw")]([SubResource("Resource_68ba3"), SubResource("Resource_gogvm"), SubResource("Resource_pswb4")])
|
||||
text = "Conjure a fireball every /Fire Delay\\s that can be thrown to deal /Damage\\ and apply Burning to enemies caught in its blast"
|
||||
|
@ -6,7 +6,7 @@
|
||||
[sub_resource type="Resource" id="Resource_oayfg"]
|
||||
script = ExtResource("1_nu6vr")
|
||||
key = "Fire Delay"
|
||||
value = 1.0
|
||||
value = 0.6
|
||||
|
||||
[sub_resource type="Resource" id="Resource_fekle"]
|
||||
script = ExtResource("1_nu6vr")
|
||||
@ -32,6 +32,6 @@ value = 3.0
|
||||
script = ExtResource("1_80xci")
|
||||
target_type = 1
|
||||
attributes = Array[ExtResource("1_nu6vr")]([SubResource("Resource_oayfg"), SubResource("Resource_fekle"), SubResource("Resource_ud8xi"), SubResource("Resource_cvkxf"), SubResource("Resource_pivwn")])
|
||||
text = "Fires a shot every [Fire Delay] seconds dealing [Damage] damage at a range of [Range]m
|
||||
text = "Fires a shot every /Fire Delay\\ seconds dealing /Damage\\ damage at a range of /Range\\m
|
||||
|
||||
While attacking the same target, gradually accelerates to [Speed Multiplier] times the fire rate over [Speed Time]"
|
||||
While attacking the same target, gradually accelerates to /Speed Multiplier\\x the fire rate over /Speed Time\\s"
|
||||
|
@ -32,6 +32,6 @@ value = 3.0
|
||||
script = ExtResource("1_630yu")
|
||||
target_type = 0
|
||||
attributes = Array[ExtResource("1_vpmor")]([SubResource("Resource_fi7tc"), SubResource("Resource_r6h5d"), SubResource("Resource_gwg1i"), SubResource("Resource_ogk1x"), SubResource("Resource_wdp3h")])
|
||||
text = "Fires a shot every [Fire Delay] seconds dealing [Damage] damage at a range of [Range]m
|
||||
text = "Fires a shot every /Fire Delay\\ seconds dealing /Damage\\ damage at a range of /Range\\m
|
||||
|
||||
While held, gradually accelerates to [Speed Multiplier] times the fire rate over [Speed Time]"
|
||||
While held, gradually accelerates to /Speed Multiplier\\x the fire rate over /Speed Time\\"
|
||||
|
@ -1,9 +1,23 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=2 format=3 uid="uid://fwsg5av1egp2"]
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://fwsg5av1egp2"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_tdu8a"]
|
||||
[ext_resource type="Texture2D" uid="uid://oblavj8vj30n" path="res://PCs/Universal/ClassCards/GlueLauncher/glue_gun.png" id="2_lh4dk"]
|
||||
[ext_resource type="Resource" uid="uid://boj1ho5x0sxtq" path="res://PCs/Universal/ClassCards/GlueLauncher/weapon_stats.tres" id="3_dukui"]
|
||||
[ext_resource type="Resource" uid="uid://bvkwgmbxje0dp" path="res://PCs/Universal/ClassCards/GlueLauncher/tower_stats.tres" id="3_e5fta"]
|
||||
[ext_resource type="PackedScene" uid="uid://bb44pintbwdcf" path="res://PCs/Universal/ClassCards/GlueLauncher/tower_glue_launcher.tscn" id="4_xcrut"]
|
||||
[ext_resource type="PackedScene" uid="uid://takm6diuy71m" path="res://PCs/Universal/ClassCards/GlueLauncher/weapon_glue_launcher.tscn" id="5_l3c38"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7gjas"]
|
||||
atlas = ExtResource("2_lh4dk")
|
||||
region = Rect2(0, 0, 64, 64)
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_tdu8a")
|
||||
title = ""
|
||||
rarity = 0
|
||||
title = "Glue Launcher"
|
||||
rarity = 1
|
||||
faction = 0
|
||||
sprite = SubResource("AtlasTexture_7gjas")
|
||||
turret_scene = ExtResource("4_xcrut")
|
||||
weapon_scene = ExtResource("5_l3c38")
|
||||
weapon_stats = ExtResource("3_dukui")
|
||||
tower_stats = ExtResource("3_e5fta")
|
||||
|
@ -1,10 +0,0 @@
|
||||
extends Tower
|
||||
class_name StickyTower
|
||||
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
|
||||
func shoot():
|
||||
var status = StatusSticky.new()
|
||||
status.stats = status_stats
|
||||
targeted_enemy.status_manager.add_effect(status)
|
@ -0,0 +1,8 @@
|
||||
extends StatusApplyingTower
|
||||
class_name GlueLauncherTower
|
||||
|
||||
|
||||
func build_status_object() -> StatusEffect:
|
||||
var status = StatusSlow.new()
|
||||
status.stats = status_stats
|
||||
return status
|
@ -1,47 +1,11 @@
|
||||
[gd_scene load_steps=4 format=3 uid="uid://dja1b2ke8clo5"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://bb44pintbwdcf"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/GlueLauncher/stickytower.gd" id="1_0fo13"]
|
||||
[ext_resource type="Resource" uid="uid://d0643gfp52x3s" path="res://Resources/StatusEffects/sticky.tres" id="2_f8mxi"]
|
||||
[ext_resource type="PackedScene" uid="uid://dxwtlvv632ae8" path="res://Scenes/Towers/status_applying_tower.tscn" id="1_r1dvg"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/GlueLauncher/tower_glue_launcher.gd" id="2_ot8fu"]
|
||||
[ext_resource type="Resource" uid="uid://d0643gfp52x3s" path="res://Resources/StatusEffects/sticky.tres" id="3_ibb53"]
|
||||
[ext_resource type="Resource" uid="uid://bvkwgmbxje0dp" path="res://PCs/Universal/ClassCards/GlueLauncher/tower_stats.tres" id="4_etcd4"]
|
||||
|
||||
[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_0fo13")
|
||||
status_stats = ExtResource("2_f8mxi")
|
||||
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"]
|
||||
|
||||
[node name="CSGBox3D2" type="CSGBox3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -0.0158235, 0, -0.956956)
|
||||
size = Vector3(0.481654, 0.427749, 1.38438)
|
||||
|
||||
[node name="CSGBox3D3" type="CSGBox3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00590318, 0.717947, 0.210929)
|
||||
size = Vector3(0.329535, 0.622842, 0.319929)
|
||||
|
||||
[node name="CSGBox3D4" type="CSGBox3D" parent="Model"]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.00590295, 0.453314, -0.265725)
|
||||
size = Vector3(0.329535, 0.622842, 0.319929)
|
||||
|
||||
[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")
|
||||
[node name="GlueLauncherTower" instance=ExtResource("1_r1dvg")]
|
||||
script = ExtResource("2_ot8fu")
|
||||
status_stats = ExtResource("3_ibb53")
|
||||
stats = ExtResource("4_etcd4")
|
||||
|
25
PCs/Universal/ClassCards/GlueLauncher/tower_stats.tres
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://bvkwgmbxje0dp"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_0wpdf"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="2_we1js"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gbocu"]
|
||||
script = ExtResource("1_0wpdf")
|
||||
key = "Damage"
|
||||
value = 0.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_6a2im"]
|
||||
script = ExtResource("1_0wpdf")
|
||||
key = "Range"
|
||||
value = 10.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7npe0"]
|
||||
script = ExtResource("1_0wpdf")
|
||||
key = "Fire Delay"
|
||||
value = 2.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_we1js")
|
||||
target_type = 1
|
||||
attributes = Array[ExtResource("1_0wpdf")]([SubResource("Resource_gbocu"), SubResource("Resource_6a2im"), SubResource("Resource_7npe0")])
|
||||
text = "Fires every /Fire Delay\\s, making the target Sticky at a range of /Range\\m"
|
@ -20,5 +20,6 @@ value = 0.5
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_8sdo4")
|
||||
target_type = 0
|
||||
attributes = Array[ExtResource("1_gheu8")]([SubResource("Resource_gbocu"), SubResource("Resource_6a2im"), SubResource("Resource_7npe0")])
|
||||
text = "Fires every [Fire Delay]s, making the target Sticky at a range of [Range]m"
|
||||
text = "Fires every /Fire Delay\\s, making the target Sticky at a range of /Range\\m"
|
||||
|
@ -1,8 +1,10 @@
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=6 format=3 uid="uid://cb1uqjl1387kk"]
|
||||
[gd_resource type="Resource" script_class="Card" load_steps=8 format=3 uid="uid://cb1uqjl1387kk"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card.gd" id="1_cmmto"]
|
||||
[ext_resource type="Texture2D" uid="uid://mqo5qcghfit8" path="res://PCs/Universal/ClassCards/Icicle/icicle.png" id="2_w5fi7"]
|
||||
[ext_resource type="Resource" uid="uid://d34bfj5togyyt" path="res://PCs/Universal/ClassCards/Icicle/tower_stats.tres" id="3_p8y0m"]
|
||||
[ext_resource type="PackedScene" uid="uid://v3iuf4lt2iff" path="res://PCs/Universal/ClassCards/Icicle/weapon_icicle.tscn" id="3_ve3rv"]
|
||||
[ext_resource type="PackedScene" uid="uid://miawrarbb1up" path="res://PCs/Universal/ClassCards/Icicle/tower_icicle.tscn" id="4_vgqev"]
|
||||
[ext_resource type="Resource" uid="uid://ckjmym1ofww4" path="res://PCs/Universal/ClassCards/Icicle/weapon_stats.tres" id="4_yv37w"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_7due4"]
|
||||
@ -15,5 +17,7 @@ title = "Icicle"
|
||||
rarity = 3
|
||||
faction = 0
|
||||
sprite = SubResource("AtlasTexture_7due4")
|
||||
turret_scene = ExtResource("4_vgqev")
|
||||
weapon_scene = ExtResource("3_ve3rv")
|
||||
weapon_stats = ExtResource("4_yv37w")
|
||||
tower_stats = ExtResource("3_p8y0m")
|
||||
|
@ -1,13 +0,0 @@
|
||||
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
|
2
PCs/Universal/ClassCards/Icicle/tower_icicle.gd
Normal file
@ -0,0 +1,2 @@
|
||||
extends ProjectileTower
|
||||
class_name IcicleTower
|
@ -1,41 +1,11 @@
|
||||
[gd_scene load_steps=6 format=3 uid="uid://clabvrajn6k3r"]
|
||||
[gd_scene load_steps=5 format=3 uid="uid://miawrarbb1up"]
|
||||
|
||||
[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"]
|
||||
[ext_resource type="PackedScene" uid="uid://t0b32qb8eub2" path="res://Scenes/Towers/projectile_tower.tscn" id="1_d6g88"]
|
||||
[ext_resource type="Script" path="res://PCs/Universal/ClassCards/Icicle/tower_icicle.gd" id="2_qcpgh"]
|
||||
[ext_resource type="PackedScene" uid="uid://dyurjxotdkf1u" path="res://PCs/Universal/ClassCards/Icicle/icicle_projectile.tscn" id="3_o4uqf"]
|
||||
[ext_resource type="Resource" uid="uid://d34bfj5togyyt" path="res://PCs/Universal/ClassCards/Icicle/tower_stats.tres" id="4_3il5a"]
|
||||
|
||||
[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")
|
||||
[node name="IcicleTower" instance=ExtResource("1_d6g88")]
|
||||
script = ExtResource("2_qcpgh")
|
||||
projectile_scene = ExtResource("3_o4uqf")
|
||||
stats = ExtResource("4_3il5a")
|
||||
|
25
PCs/Universal/ClassCards/Icicle/tower_stats.tres
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://d34bfj5togyyt"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_3sgqf"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_x2vtw"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_68ba3"]
|
||||
script = ExtResource("1_3sgqf")
|
||||
key = "Fire Delay"
|
||||
value = 3.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gogvm"]
|
||||
script = ExtResource("1_3sgqf")
|
||||
key = "Damage"
|
||||
value = 4.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pswb4"]
|
||||
script = ExtResource("1_3sgqf")
|
||||
key = "Range"
|
||||
value = 15.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_x2vtw")
|
||||
target_type = 3
|
||||
attributes = Array[ExtResource("1_3sgqf")]([SubResource("Resource_68ba3"), SubResource("Resource_gogvm"), SubResource("Resource_pswb4")])
|
||||
text = "Conjures an icicle every /Fire Delay\\s that deals /Damage\\ and applies Cold to enemies caught in its blast"
|
@ -1,8 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=2 format=3 uid="uid://ckjmym1ofww4"]
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://ckjmym1ofww4"]
|
||||
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/stat_attribute.gd" id="1_c13s0"]
|
||||
[ext_resource type="Script" path="res://Scripts/Resources/card_text.gd" id="1_fpi27"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_68ba3"]
|
||||
script = ExtResource("1_c13s0")
|
||||
key = "Fire Delay"
|
||||
value = 2.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_gogvm"]
|
||||
script = ExtResource("1_c13s0")
|
||||
key = "Damage"
|
||||
value = 5.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pswb4"]
|
||||
script = ExtResource("1_c13s0")
|
||||
key = "Range"
|
||||
value = 15.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_fpi27")
|
||||
attributes = Array[Resource("res://Scripts/Resources/stat_attribute.gd")]([])
|
||||
text = ""
|
||||
target_type = 0
|
||||
attributes = Array[ExtResource("1_c13s0")]([SubResource("Resource_68ba3"), SubResource("Resource_gogvm"), SubResource("Resource_pswb4")])
|
||||
text = "Conjure an icicle every /Fire Delay\\s that can be thrown to deal /Damage\\ and apply Cold to enemies caught in its blast"
|
||||
|
@ -16,7 +16,7 @@ value = 30.0
|
||||
[sub_resource type="Resource" id="Resource_28kyj"]
|
||||
script = ExtResource("1_7xbx2")
|
||||
key = "Range"
|
||||
value = 50.0
|
||||
value = 100.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_t3oy2")
|
||||
|
@ -21,6 +21,7 @@ signal died
|
||||
@export var hud : HUD
|
||||
@export var movement : PlayerMovement
|
||||
@export var sprint_zoom_speed := 0.2
|
||||
@export var player_name_tag : Label
|
||||
|
||||
var equipped_card : Card
|
||||
var weapon : Weapon
|
||||
@ -49,6 +50,7 @@ func _ready() -> void:
|
||||
right_hand_animator.speed_scale = 0
|
||||
camera.make_current()
|
||||
sprite.queue_free()
|
||||
player_name_tag.queue_free()
|
||||
else:
|
||||
camera.set_visible(false)
|
||||
gun_camera.set_visible(false)
|
||||
@ -56,7 +58,7 @@ func _ready() -> void:
|
||||
if weapon != null:
|
||||
weapon.set_raycast_origin(camera)
|
||||
inventory.contents.append_array(hero_class.deck)
|
||||
sprite.texture = hero_class.texture
|
||||
sprite.texture.atlas = hero_class.texture
|
||||
check_left_hand_valid()
|
||||
Input.mouse_mode = Input.MOUSE_MODE_CAPTURED
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=28 format=3 uid="uid://dxgxbtf68lcv5"]
|
||||
[gd_scene load_steps=30 format=3 uid="uid://dxgxbtf68lcv5"]
|
||||
|
||||
[ext_resource type="Script" path="res://PCs/hero.gd" id="1_pihpe"]
|
||||
[ext_resource type="Resource" uid="uid://b5pc3frhx467q" path="res://PCs/Red/red.tres" id="2_dbyo0"]
|
||||
@ -8,7 +8,7 @@
|
||||
[ext_resource type="PackedScene" uid="uid://dixtx38u4jhd7" path="res://Scenes/UI/card_hand.tscn" id="4_mwtvp"]
|
||||
[ext_resource type="PackedScene" uid="uid://dqt1ggtkpkuhs" path="res://Scenes/gauntlet.tscn" id="5_jlxb3"]
|
||||
[ext_resource type="Script" path="res://Scripts/inventory.gd" id="6_cf5ap"]
|
||||
[ext_resource type="Texture2D" uid="uid://hxev3a2ktya" path="res://Assets/TextureAtlases/red.tres" id="6_loffy"]
|
||||
[ext_resource type="Texture2D" uid="uid://cjqxkraykhxxk" path="res://PCs/Red/red.png" id="6_yyp8i"]
|
||||
[ext_resource type="Texture2D" uid="uid://d0btebva6djdl" path="res://Assets/Textures/crosshair.png" id="8_fq3f6"]
|
||||
[ext_resource type="Script" path="res://Scripts/HUD.gd" id="8_yl6ka"]
|
||||
[ext_resource type="Script" path="res://Scripts/on_top_camera.gd" id="11_4sdwe"]
|
||||
@ -22,6 +22,11 @@
|
||||
|
||||
[sub_resource type="CapsuleShape3D" id="CapsuleShape3D_jbu13"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_oyv4e"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("6_yyp8i")
|
||||
region = Rect2(0, 0, 96, 96)
|
||||
|
||||
[sub_resource type="Environment" id="Environment_ekmug"]
|
||||
|
||||
[sub_resource type="Animation" id="Animation_2q50p"]
|
||||
@ -54,7 +59,10 @@ viewport_path = NodePath("SubViewport")
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_574jy"]
|
||||
viewport_path = NodePath("MiniMapViewport")
|
||||
|
||||
[node name="Character" type="CharacterBody3D" node_paths=PackedStringArray("camera", "gun_camera", "left_hand", "right_hand", "right_hand_animator", "edit_tool", "gauntlet_sprite", "sprite", "interaction_raycast", "inventory", "card", "hud", "movement")]
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_m3ots"]
|
||||
viewport_path = NodePath("Nametag")
|
||||
|
||||
[node name="Character" type="CharacterBody3D" node_paths=PackedStringArray("camera", "gun_camera", "left_hand", "right_hand", "right_hand_animator", "edit_tool", "gauntlet_sprite", "sprite", "interaction_raycast", "inventory", "card", "hud", "movement", "player_name_tag")]
|
||||
collision_layer = 2
|
||||
collision_mask = 37
|
||||
script = ExtResource("1_pihpe")
|
||||
@ -73,6 +81,7 @@ card = NodePath("SubViewport/Head2/LeftHand/SubViewport/Node2D")
|
||||
pause_menu_scene = ExtResource("3_avnsx")
|
||||
hud = NodePath("HUD")
|
||||
movement = NodePath("PlayerMovement")
|
||||
player_name_tag = NodePath("Nametag/Label")
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0)
|
||||
@ -94,7 +103,7 @@ collision_mask = 24
|
||||
|
||||
[node name="EightDirectionSprite" parent="." instance=ExtResource("2_ib0t5")]
|
||||
transform = Transform3D(2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0.915529, 0)
|
||||
texture = ExtResource("6_loffy")
|
||||
texture = SubResource("AtlasTexture_oyv4e")
|
||||
|
||||
[node name="Inventory" type="Node" parent="."]
|
||||
script = ExtResource("6_cf5ap")
|
||||
@ -130,12 +139,12 @@ transform = Transform3D(0.235, 0, 0, 0, 0.235, 0, 0, 0, 0.235, -0.665, -0.275, -
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="SubViewport/Head2/LeftHand"]
|
||||
transparent_bg = true
|
||||
size = Vector2i(192, 192)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Node2D" parent="SubViewport/Head2/LeftHand/SubViewport" instance=ExtResource("4_mwtvp")]
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="SubViewport/Head2/LeftHand"]
|
||||
transform = Transform3D(0.45, 0, 0, 0, 0.45, 0, 0, 0, 0.45, 0.2, 0.19, 0)
|
||||
layers = 2
|
||||
texture_filter = 0
|
||||
texture = SubResource("ViewportTexture_8f12g")
|
||||
@ -168,20 +177,6 @@ hover_text = NodePath("Label2")
|
||||
enemy_sprites = [NodePath("TextureRect4/TextureRect"), NodePath("TextureRect4/TextureRect2"), NodePath("TextureRect4/TextureRect3"), NodePath("TextureRect4/TextureRect4"), NodePath("TextureRect4/TextureRect5")]
|
||||
enemy_counts = [NodePath("TextureRect4/TextureRect/Label"), NodePath("TextureRect4/TextureRect2/Label2"), NodePath("TextureRect4/TextureRect3/Label3"), NodePath("TextureRect4/TextureRect4/Label4"), NodePath("TextureRect4/TextureRect5/Label5")]
|
||||
|
||||
[node name="WaveCount" type="Label" parent="HUD"]
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -30.0
|
||||
offset_top = 83.0
|
||||
offset_right = 30.0
|
||||
offset_bottom = 26.0
|
||||
grow_horizontal = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "1"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="EnemyCount" type="Label" parent="HUD"]
|
||||
visible = false
|
||||
offset_left = 10.0
|
||||
@ -434,6 +429,20 @@ text = "Press button to do thing"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="WaveCount" type="Label" parent="HUD"]
|
||||
anchors_preset = 5
|
||||
anchor_left = 0.5
|
||||
anchor_right = 0.5
|
||||
offset_left = -30.0
|
||||
offset_top = 83.0
|
||||
offset_right = 30.0
|
||||
offset_bottom = 109.0
|
||||
grow_horizontal = 2
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "1"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="MinimapIcon" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(4, 0, 0, 0, 0.0698095, 3.99939, 0, -3.99939, 0.0698095, 0, 2.86288, 0)
|
||||
layers = 4
|
||||
@ -444,3 +453,28 @@ texture = ExtResource("15_nhlam")
|
||||
script = ExtResource("20_cfhw8")
|
||||
player = NodePath("..")
|
||||
head = NodePath("../Head")
|
||||
|
||||
[node name="Nametag" type="SubViewport" parent="."]
|
||||
transparent_bg = true
|
||||
size = Vector2i(300, 40)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Label" type="Label" parent="Nametag"]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
text = "QUITE LONG PLAYER NAME"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
layers = 5
|
||||
sorting_offset = 500.0
|
||||
pixel_size = 0.002
|
||||
billboard = 1
|
||||
no_depth_test = true
|
||||
fixed_size = true
|
||||
texture = SubResource("ViewportTexture_m3ots")
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
[sub_resource type="ImageTexture" id="ImageTexture_03x6q"]
|
||||
|
||||
[node name="OptionsMenu" type="PanelContainer" node_paths=PackedStringArray("look_sens_slider", "look_sens_input", "toggle_sprint_checkbox", "vsync_dropdown", "aa_dropdown", "window_dropdown", "invert_lookY", "invert_lookX", "fov_input", "fov_slider", "fixed_minimap")]
|
||||
[node name="OptionsMenu" type="PanelContainer" node_paths=PackedStringArray("look_sens_slider", "look_sens_input", "toggle_sprint_checkbox", "vsync_dropdown", "aa_dropdown", "window_dropdown", "invert_lookY", "invert_lookX", "fov_input", "fov_slider", "fixed_minimap", "tower_damage", "self_damage", "party_damage")]
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
@ -28,6 +28,9 @@ invert_lookX = NodePath("VBoxContainer/TabContainer/Gameplay/InvertMouseX/Center
|
||||
fov_input = NodePath("VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer/SpinBox")
|
||||
fov_slider = NodePath("VBoxContainer/TabContainer/Graphics/FOV/HBoxContainer/HSlider")
|
||||
fixed_minimap = NodePath("VBoxContainer/TabContainer/Gameplay/FixedMinimap/CenterContainer/CheckButton")
|
||||
tower_damage = NodePath("VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer/Button")
|
||||
self_damage = NodePath("VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer/Button2")
|
||||
party_damage = NodePath("VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer/Button3")
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 2
|
||||
@ -139,6 +142,47 @@ size_flags_horizontal = 3
|
||||
[node name="CheckButton" type="CheckButton" parent="VBoxContainer/TabContainer/Gameplay/FixedMinimap/CenterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="FloatingDamageIndicators" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Label" type="Label" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
text = "Floating Damage Indicators"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="Button" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "Tower Damage"
|
||||
|
||||
[node name="Button2" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "Self Damage"
|
||||
|
||||
[node name="Button3" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "Party Damage"
|
||||
|
||||
[node name="Button4" type="Button" parent="VBoxContainer/TabContainer/Gameplay/FloatingDamageIndicators/CenterContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
toggle_mode = true
|
||||
button_pressed = true
|
||||
text = "Status Effect Damage"
|
||||
|
||||
[node name="Graphics" type="VBoxContainer" parent="VBoxContainer/TabContainer"]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
|
@ -4,6 +4,5 @@
|
||||
[ext_resource type="Script" path="res://Scripts/Projectiles/status_applying_projectile.gd" id="2_4p44n"]
|
||||
|
||||
[node name="StatusApplyingProjectile" instance=ExtResource("1_atrjq")]
|
||||
max_contacts_reported = 0
|
||||
script = ExtResource("2_4p44n")
|
||||
status_stats = null
|
||||
|
8
Scenes/Towers/status_applying_tower.tscn
Normal file
@ -0,0 +1,8 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://dxwtlvv632ae8"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://dumiyjlnea4gq" path="res://Scenes/Towers/hitscan_tower.tscn" id="1_suc1i"]
|
||||
[ext_resource type="Script" path="res://Scripts/Towers/status_applying_tower.gd" id="2_rd0fq"]
|
||||
|
||||
[node name="StatusApplyingTower" instance=ExtResource("1_suc1i")]
|
||||
script = ExtResource("2_rd0fq")
|
||||
status_stats = null
|
@ -4,42 +4,59 @@
|
||||
[ext_resource type="Texture2D" uid="uid://dlqnhs8or4ik2" path="res://Assets/Textures/cardhand.png" id="1_d5oo3"]
|
||||
[ext_resource type="Texture2D" uid="uid://buf8t5gc7iw3a" path="res://Assets/TextureAtlases/rarityborders.tres" id="3_pclfx"]
|
||||
|
||||
[node name="Node2D" type="Node2D" node_paths=PackedStringArray("rarity_sprite", "title_text", "description")]
|
||||
[node name="Node2D" type="Node2D" node_paths=PackedStringArray("rarity_sprite", "title_text", "description", "target_label")]
|
||||
script = ExtResource("1_2cfmh")
|
||||
rarity_sprite = NodePath("Sprite2D2")
|
||||
title_text = NodePath("Title")
|
||||
description = NodePath("Description")
|
||||
target_label = NodePath("Title2")
|
||||
|
||||
[node name="Sprite2D" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(96, 96)
|
||||
scale = Vector2(3, 3)
|
||||
position = Vector2(256, 256)
|
||||
scale = Vector2(8, 8)
|
||||
texture = ExtResource("1_d5oo3")
|
||||
|
||||
[node name="Sprite2D2" type="Sprite2D" parent="."]
|
||||
texture_filter = 1
|
||||
position = Vector2(96, 96)
|
||||
scale = Vector2(3, 3)
|
||||
position = Vector2(256, 256)
|
||||
scale = Vector2(8, 8)
|
||||
texture = ExtResource("3_pclfx")
|
||||
region_enabled = true
|
||||
region_rect = Rect2(0, 0, 64, 64)
|
||||
|
||||
[node name="Title" type="Label" parent="."]
|
||||
offset_left = 48.0
|
||||
offset_top = 20.0
|
||||
offset_right = 150.0
|
||||
offset_bottom = 46.0
|
||||
offset_left = 89.0
|
||||
offset_top = 56.0
|
||||
offset_right = 373.0
|
||||
offset_bottom = 96.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
text = "spider queen"
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "Rocket Launcher 50"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Title2" type="Label" parent="."]
|
||||
offset_left = 183.0
|
||||
offset_top = 424.0
|
||||
offset_right = 296.0
|
||||
offset_bottom = 464.0
|
||||
theme_override_colors/font_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/font_size = 27
|
||||
text = "Land
|
||||
"
|
||||
horizontal_alignment = 1
|
||||
vertical_alignment = 1
|
||||
|
||||
[node name="Description" type="RichTextLabel" parent="."]
|
||||
offset_left = 66.0
|
||||
offset_top = 42.0
|
||||
offset_right = 167.0
|
||||
offset_bottom = 178.0
|
||||
offset_left = 107.0
|
||||
offset_top = 144.0
|
||||
offset_right = 357.0
|
||||
offset_bottom = 389.0
|
||||
theme_override_colors/default_color = Color(0, 0, 0, 1)
|
||||
theme_override_font_sizes/normal_font_size = 11
|
||||
theme_override_font_sizes/normal_font_size = 17
|
||||
bbcode_enabled = true
|
||||
text = "In here goes some card text that really be quite long sometimes if you're not really really careful to describe the card's effects concisely"
|
||||
text = "In here goes some card text that really be quite long sometimes if you're not really really careful to describe the card's effects concisely
|
||||
|
||||
In fact, sometimes its really really really rediculously long, when it needs to be and im too dumb to shorten it"
|
||||
fit_content = true
|
||||
|
@ -45,21 +45,18 @@ shape = SubResource("BoxShape3D_0ebt5")
|
||||
|
||||
[node name="SubViewport" type="SubViewport" parent="."]
|
||||
transparent_bg = true
|
||||
size = Vector2i(192, 192)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Node2D" parent="SubViewport" instance=ExtResource("2_7ouw1")]
|
||||
|
||||
[node name="SubViewport2" type="SubViewport" parent="."]
|
||||
transparent_bg = true
|
||||
size = Vector2i(192, 192)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Node2D" parent="SubViewport2" instance=ExtResource("2_7ouw1")]
|
||||
|
||||
[node name="SubViewport3" type="SubViewport" parent="."]
|
||||
transparent_bg = true
|
||||
size = Vector2i(192, 192)
|
||||
render_target_update_mode = 4
|
||||
|
||||
[node name="Node2D" parent="SubViewport3" instance=ExtResource("2_7ouw1")]
|
||||
@ -68,17 +65,17 @@ render_target_update_mode = 4
|
||||
visible = false
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="Node3D"]
|
||||
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, -0.805106, 1.12938, 0.500052)
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, -0.805106, 1.12938, 0.500052)
|
||||
texture_filter = 0
|
||||
texture = SubResource("ViewportTexture_yf4je")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="Node3D"]
|
||||
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0.0180808, 1.12938, 0.500052)
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0.0180808, 1.12938, 0.500052)
|
||||
texture_filter = 0
|
||||
texture = SubResource("ViewportTexture_3q3h0")
|
||||
|
||||
[node name="Sprite3D3" type="Sprite3D" parent="Node3D"]
|
||||
transform = Transform3D(0.4, 0, 0, 0, 0.4, 0, 0, 0, 0.4, 0.843507, 1.12938, 0.500052)
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0.843507, 1.12938, 0.500052)
|
||||
texture_filter = 0
|
||||
texture = SubResource("ViewportTexture_vyyy4")
|
||||
|
||||
|
@ -10,6 +10,10 @@ var lifetime := 10.0
|
||||
var time_alive := 0.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
apply_central_impulse(direction * force)
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
time_alive += delta
|
||||
|
||||
|
@ -6,7 +6,7 @@ enum Faction {GENERIC = 0}
|
||||
@export var title : String
|
||||
@export var rarity : Data.Rarity
|
||||
@export var faction : Faction
|
||||
@export var sprite : AtlasTexture
|
||||
@export var sprite : Texture
|
||||
@export var turret_scene : PackedScene
|
||||
@export var weapon_scene : PackedScene
|
||||
@export var weapon_stats : CardText
|
||||
|
@ -2,5 +2,5 @@ extends Resource
|
||||
class_name HeroClass
|
||||
|
||||
@export var hero_name : String = "Default"
|
||||
@export var texture : AtlasTexture
|
||||
@export var texture : Texture
|
||||
@export var deck : Array[Card]
|
||||
|
@ -12,6 +12,10 @@ const SAVE_PATH := "user://preferences.tres"
|
||||
@export var windowed_mode := 0
|
||||
@export var hfov := 100.0
|
||||
@export var fixed_minimap := false
|
||||
@export var display_tower_damage_indicators := true
|
||||
@export var display_self_damage_indicators := true
|
||||
@export var display_party_damage_indicators := true
|
||||
@export var display_status_effect_damage_indicators := true
|
||||
|
||||
|
||||
func apply_graphical_settings(viewport):
|
||||
|
@ -3,7 +3,7 @@ class_name ProjectileTower
|
||||
|
||||
@export var projectile_scene : PackedScene
|
||||
|
||||
var force := 2.0
|
||||
var force := 20.0
|
||||
var projectile_id := 0
|
||||
|
||||
|
||||
|
22
Scripts/Towers/status_applying_tower.gd
Normal file
@ -0,0 +1,22 @@
|
||||
extends HitscanTower
|
||||
class_name StatusApplyingTower
|
||||
|
||||
@export var status_stats : StatusStats
|
||||
|
||||
|
||||
func shoot():
|
||||
super.shoot()
|
||||
if targeted_enemy and is_instance_valid(targeted_enemy) and targeted_enemy.alive:
|
||||
targeted_enemy.damage(damage)
|
||||
targeted_enemy.status_manager.add_effect(build_status_object())
|
||||
|
||||
|
||||
func build_status_object() -> StatusEffect:
|
||||
var status = StatusEffect.new()
|
||||
status.stats = status_stats
|
||||
return status
|
||||
|
||||
|
||||
@rpc("reliable")
|
||||
func networked_shoot():
|
||||
super.networked_shoot()
|
@ -23,6 +23,8 @@ func shoot():
|
||||
var target_hitbox = target.shape_owner_get_owner(raycast.get_collider_shape())
|
||||
if target_hitbox is Hitbox:
|
||||
hit(target, target_hitbox)
|
||||
if Data.preferences.display_self_damage_indicators:
|
||||
spawn_damage_indicator(raycast.get_collision_point())
|
||||
networked_hit.rpc(get_tree().root.get_path_to(target), get_tree().root.get_path_to(target_hitbox))
|
||||
|
||||
|
||||
@ -35,3 +37,5 @@ func networked_hit(target_path : String, target_hitbox_path : String):
|
||||
var target = get_tree().root.get_node(target_path)
|
||||
var target_hitbox = get_tree().root.get_node(target_hitbox_path) as Hitbox
|
||||
hit(target, target_hitbox)
|
||||
if Data.preferences.display_party_damage_indicators:
|
||||
spawn_damage_indicator(target.sprite.global_position)
|
||||
|
@ -3,23 +3,27 @@ class_name ProjectileWeapon
|
||||
|
||||
@export var projectile_scene : PackedScene
|
||||
|
||||
var force := 2.0
|
||||
var force := 20.0
|
||||
var projectile_id := 0
|
||||
|
||||
|
||||
func shoot():
|
||||
super.shoot()
|
||||
var projectile = projectile_scene.instantiate() as Projectile
|
||||
projectile.position = global_position
|
||||
projectile.damage = damage
|
||||
projectile.direction = -global_transform.basis.z
|
||||
projectile.force = force
|
||||
projectile.name = str(multiplayer.get_unique_id()) + str(projectile_id)
|
||||
get_tree().root.add_child(projectile)
|
||||
projectile_id += 1
|
||||
networked_spawn_projectile.rpc(multiplayer.get_unique_id(), -global_transform.basis.z)
|
||||
|
||||
|
||||
@rpc("reliable")
|
||||
func networked_shoot():
|
||||
super.networked_shoot()
|
||||
shoot()
|
||||
|
||||
|
||||
@rpc("reliable", "call_local")
|
||||
func networked_spawn_projectile(peer_id, direction):
|
||||
var projectile = projectile_scene.instantiate() as Projectile
|
||||
projectile.position = global_position
|
||||
projectile.damage = damage
|
||||
projectile.direction = direction
|
||||
projectile.force = force
|
||||
projectile.name = str(peer_id) + str(projectile_id)
|
||||
get_tree().root.add_child(projectile)
|
||||
projectile_id += 1
|
||||
|
@ -4,6 +4,7 @@ class_name Weapon
|
||||
@export var stats : CardText
|
||||
@export var animator : AnimationPlayer
|
||||
|
||||
var damage_particle_scene = preload("res://Scenes/damage_particle.tscn")
|
||||
var hero : Hero
|
||||
var trigger_held := false
|
||||
var second_trigger_held := false
|
||||
@ -49,6 +50,14 @@ func release_second_trigger():
|
||||
second_trigger_held = false
|
||||
|
||||
|
||||
func spawn_damage_indicator(pos):
|
||||
if damage > 0:
|
||||
var marker = damage_particle_scene.instantiate()
|
||||
get_tree().root.add_child(marker)
|
||||
marker.set_number(damage)
|
||||
marker.position = pos
|
||||
|
||||
|
||||
func shoot():
|
||||
animator.play("shoot")
|
||||
|
||||
|
@ -5,10 +5,12 @@ var stats : Card
|
||||
@export var rarity_sprite : Sprite2D
|
||||
@export var title_text : Label
|
||||
@export var description : RichTextLabel
|
||||
@export var target_label : Label
|
||||
|
||||
func set_card(value):
|
||||
stats = value
|
||||
title_text.text = stats.title
|
||||
target_label.text = str(Data.TargetType.keys()[stats.tower_stats.target_type])
|
||||
rarity_sprite.region_rect = Rect2(64 * stats.rarity, 0, 64, 64)
|
||||
|
||||
|
||||
@ -23,7 +25,9 @@ func process_card_text(card_text : CardText) -> String:
|
||||
|
||||
func view_weapon():
|
||||
description.text = process_card_text(stats.weapon_stats)
|
||||
target_label.text = "Both"
|
||||
|
||||
|
||||
func view_tower():
|
||||
description.text = process_card_text(stats.tower_stats)
|
||||
target_label.text = str(stats.tower_stats.target_type)
|
||||
|
@ -33,6 +33,8 @@ func randomize_cards():
|
||||
card = card_array.pick_random()
|
||||
card_array.erase(card)
|
||||
x.set_card(card)
|
||||
#TODO: in reality this should just show the icon and then hovering over it lets you see either side at the players own discretion
|
||||
x.view_tower()
|
||||
$Node3D.set_visible(true)
|
||||
for x in choice_colliders:
|
||||
x.disabled = false
|
||||
|
@ -38,16 +38,16 @@ func _ready() -> void:
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Gatling/card_gatling.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/RocketLauncher/card_rocket_launcher.tres"))
|
||||
#Uncommon
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/Blowdart/card_blowdart.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Blowdart/card_blowdart.tres"))
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/Refridgerator/card_refridgerator.tres"))
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/GlueLauncher/card_glue_launcher.tres"))
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/GlueLauncher/card_glue_launcher.tres"))
|
||||
#Rare
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/Flamethrower/card_flamethrower.tres"))
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/DamageEnhancer/card_damage_enhancer.tres"))
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/SpeedEnhancer/card_speed_enhancer.tres"))
|
||||
#Epic
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/Icicle/card_icicle.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/Fireball/card_fireball.tres"))
|
||||
#cards.append(preload("res://PCs/Universal/ClassCards/GammaLaser/card_gamma_laser.tres"))
|
||||
#Legendary
|
||||
cards.append(preload("res://PCs/Universal/ClassCards/Sniper/card_sniper.tres"))
|
||||
|
@ -95,6 +95,7 @@ func spawn_tower_preview():
|
||||
last_card = card
|
||||
tower_preview = card.turret_scene.instantiate() as Tower
|
||||
tower_preview.stats = card.tower_stats
|
||||
tower_preview.position = Vector3.UP
|
||||
tower_preview.preview_range(true)
|
||||
ray_collider.add_child(tower_preview)
|
||||
|
||||
|
@ -59,9 +59,11 @@ func spawn_players(player_array, player_profiles, chatbox_open_signal, chatbox_c
|
||||
for peer_id in player_array:
|
||||
var player = player_scene.instantiate() as Hero
|
||||
player.name = str(peer_id)
|
||||
player.player_name_tag.text = player_profiles[peer_id].display_name
|
||||
player.position = level.player_spawns[p_i].global_position
|
||||
player.profile = player_profiles[peer_id]
|
||||
player.hero_class = Data.characters[player_profiles[peer_id].preferred_class]
|
||||
print(player.hero_class.hero_name)
|
||||
player.ready_state_changed.connect(ready_player)
|
||||
if peer_id == multiplayer.get_unique_id():
|
||||
chatbox_open_signal.connect(player.pause)
|
||||
@ -152,6 +154,7 @@ func end_wave():
|
||||
|
||||
|
||||
func remove_player(peer_id):
|
||||
if connected_players_nodes.has(peer_id):
|
||||
connected_players_nodes[peer_id].queue_free()
|
||||
connected_players_nodes.erase(peer_id)
|
||||
|
||||
@ -159,7 +162,7 @@ func remove_player(peer_id):
|
||||
func start_game():
|
||||
game_active = true
|
||||
enemies = 0
|
||||
objective_health = 100
|
||||
objective_health = 120
|
||||
wave = 0
|
||||
level.a_star_graph_3d.make_grid()
|
||||
level.a_star_graph_3d.find_path()
|
||||
@ -176,7 +179,7 @@ func restart_game():
|
||||
connected_players_nodes.clear()
|
||||
level.queue_free()
|
||||
enemies = 0
|
||||
objective_health = 100
|
||||
objective_health = 120
|
||||
wave = 0
|
||||
spawn_level()
|
||||
game_restarted.emit()
|
||||
|
@ -10,11 +10,6 @@ signal health_changed(health)
|
||||
var current_health
|
||||
|
||||
func take_damage(damage):
|
||||
#var marker = damage_particle_scene.instantiate()
|
||||
#get_tree().root.add_child(marker)
|
||||
#marker.set_number(damage)
|
||||
#marker.position = get_parent().global_position + Vector3.UP
|
||||
|
||||
current_health -= damage
|
||||
health_changed.emit(current_health)
|
||||
if current_health <= 0:
|
||||
|
@ -28,11 +28,11 @@ func _ready():
|
||||
|
||||
func _on_player_connected(peer_id):
|
||||
add_player.rpc_id(peer_id, Data.player_profile.to_dict())
|
||||
if multiplayer.get_unique_id() == 1:
|
||||
print("Player connected with id: " + str(peer_id))
|
||||
|
||||
|
||||
func _on_player_disconnected(peer_id):
|
||||
if chatbox:
|
||||
chatbox.append_message("SERVER", connected_players_profiles[peer_id].display_name + " has disconnected!")
|
||||
connected_players_profiles.erase(peer_id)
|
||||
player_disconnected.emit(peer_id)
|
||||
|
||||
@ -115,6 +115,8 @@ func networked_edit_player_profile(peer_id, new_profile_dict):
|
||||
func add_player(new_player_profile_dict):
|
||||
var new_player_peer_id = multiplayer.get_remote_sender_id()
|
||||
var new_player_profile = PlayerProfile.from_dict(new_player_profile_dict)
|
||||
if chatbox:
|
||||
chatbox.append_message("SERVER", new_player_profile.display_name + " has connected!")
|
||||
connected_players_profiles[new_player_peer_id] = new_player_profile
|
||||
player_connected.emit(new_player_peer_id, new_player_profile)
|
||||
|
||||
|
@ -13,6 +13,10 @@ class_name OptionsMenu
|
||||
@export var fov_input : SpinBox
|
||||
@export var fov_slider : HSlider
|
||||
@export var fixed_minimap : CheckButton
|
||||
@export var tower_damage : Button
|
||||
@export var self_damage : Button
|
||||
@export var party_damage : Button
|
||||
@export var status_damage : Button
|
||||
var keybind_boxes = []
|
||||
var keybind_buttons = {}
|
||||
var key_event
|
||||
@ -31,7 +35,10 @@ func _ready():
|
||||
fov_input.value = Data.preferences.hfov
|
||||
fov_slider.value = Data.preferences.hfov
|
||||
fixed_minimap.button_pressed = Data.preferences.fixed_minimap
|
||||
|
||||
tower_damage.button_pressed = Data.preferences.display_tower_damage_indicators
|
||||
self_damage.button_pressed = Data.preferences.display_self_damage_indicators
|
||||
party_damage.button_pressed = Data.preferences.display_party_damage_indicators
|
||||
status_damage.button_pressed = Data.preferences.display_status_effect_damage_indicators
|
||||
for index in Data.keymaps.size():
|
||||
var map = Data.keymaps[index]
|
||||
var button = Button.new()
|
||||
@ -85,6 +92,10 @@ func _on_confirm_pressed() -> void:
|
||||
Data.preferences.invert_lookY = invert_lookY.button_pressed
|
||||
Data.preferences.invert_lookX = invert_lookX.button_pressed
|
||||
Data.preferences.fixed_minimap = fixed_minimap.button_pressed
|
||||
Data.preferences.display_tower_damage_indicators = tower_damage.button_pressed
|
||||
Data.preferences.display_self_damage_indicators = self_damage.button_pressed
|
||||
Data.preferences.display_party_damage_indicators = party_damage.button_pressed
|
||||
Data.preferences.display_status_effect_damage_indicators = status_damage.button_pressed
|
||||
Data.preferences.apply_graphical_settings(get_viewport())
|
||||
Data.preferences.save_profile_to_disk()
|
||||
Data.player_keymap.save_profile_to_disk()
|
||||
|
@ -7,7 +7,7 @@ func calculate_spawn_power(wave_number : int, number_of_players : int) -> int:
|
||||
|
||||
func generate_wave(spawn_power : int, spawn_pool : Array[Enemy]) -> Dictionary:
|
||||
var wave = {}
|
||||
var sp_used = 0
|
||||
#var sp_used = 0
|
||||
var enemy_types = randi_range(1, 5)
|
||||
var enemy_choices = spawn_pool.duplicate()
|
||||
var sp_allotment = floori(spawn_power / enemy_types)
|
||||
@ -16,6 +16,6 @@ func generate_wave(spawn_power : int, spawn_pool : Array[Enemy]) -> Dictionary:
|
||||
enemy_choices.erase(choice)
|
||||
if sp_allotment / choice.spawn_power > 0:
|
||||
wave[Data.enemies.find(choice)] = sp_allotment / choice.spawn_power
|
||||
sp_used += wave[Data.enemies.find(choice)] * choice.spawn_power
|
||||
print("tried to generate wave with " + str(spawn_power) + " spawn power, used " + str(sp_used))
|
||||
#sp_used += wave[Data.enemies.find(choice)] * choice.spawn_power
|
||||
#print("Generated wave with spawn power: " + str(sp_used) + "/" + str(spawn_power))
|
||||
return wave
|
||||
|
@ -1,6 +1,7 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://bjo2q6vca5qlv"]
|
||||
[gd_scene load_steps=13 format=3 uid="uid://bjo2q6vca5qlv"]
|
||||
|
||||
[ext_resource type="Script" path="res://Worlds/GreenPlanet/Enemies/enemy_controller.gd" id="1_m83kr"]
|
||||
[ext_resource type="Gradient" uid="uid://dx7auy3oqw82t" path="res://health_bar_gradient.tres" id="2_ql1oc"]
|
||||
[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"]
|
||||
@ -24,6 +25,7 @@ status_manager = NodePath("StatusEffector")
|
||||
movement_controller = NodePath("BeeliningController")
|
||||
health = NodePath("Health")
|
||||
sprite = NodePath("DirectionSprite")
|
||||
health_bar_gradient = ExtResource("2_ql1oc")
|
||||
|
||||
[node name="Health" type="Node" parent="."]
|
||||
script = ExtResource("3_wiose")
|
||||
@ -42,6 +44,7 @@ texture = ExtResource("6_ke2c8")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 1.15918, 0)
|
||||
sorting_offset = 1.0
|
||||
pixel_size = 0.02
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
|
@ -12,6 +12,6 @@ icon = ExtResource("1_lck53")
|
||||
sprite = ExtResource("2_7nc4x")
|
||||
spawn_power = 14
|
||||
health = 350
|
||||
penalty = 10
|
||||
penalty = 15
|
||||
movement_speed = 0.8
|
||||
spawn_cooldown = 2.0
|
||||
|
@ -9,6 +9,7 @@ signal died(enemy)
|
||||
@export var movement_controller : EnemyMovement
|
||||
@export var health : Health
|
||||
@export var sprite : Sprite3D
|
||||
@export var health_bar_gradient : Gradient
|
||||
|
||||
var movement_speed
|
||||
var movement_speed_penalty := 1.0
|
||||
@ -45,5 +46,5 @@ func die():
|
||||
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.tint_progress = health_bar_gradient.sample(percent)
|
||||
$SubViewport/ProgressBar.set_visible(true)
|
||||
|
@ -1,7 +1,8 @@
|
||||
[gd_scene load_steps=14 format=3 uid="uid://b0nady5xm88bo"]
|
||||
[gd_scene load_steps=15 format=3 uid="uid://b0nady5xm88bo"]
|
||||
|
||||
[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="Gradient" uid="uid://dx7auy3oqw82t" path="res://health_bar_gradient.tres" id="2_jn5to"]
|
||||
[ext_resource type="PackedScene" uid="uid://ri8r03wqy80t" path="res://Scenes/8_direction_sprite.tscn" id="2_o7jmg"]
|
||||
[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"]
|
||||
@ -13,7 +14,7 @@
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_21dgw"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_sn7du"]
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_s4568"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("3_naknq")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
@ -29,6 +30,7 @@ status_manager = NodePath("StatusEffector")
|
||||
movement_controller = NodePath("PathingController")
|
||||
health = NodePath("Health")
|
||||
sprite = NodePath("DirectionSprite")
|
||||
health_bar_gradient = ExtResource("2_jn5to")
|
||||
|
||||
[node name="Health" type="Node" parent="."]
|
||||
script = ExtResource("2_swu53")
|
||||
@ -42,10 +44,11 @@ script = ExtResource("2_j8yin")
|
||||
[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_sn7du")
|
||||
texture = SubResource("AtlasTexture_s4568")
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 1.20821, 0)
|
||||
sorting_offset = 1.0
|
||||
pixel_size = 0.02
|
||||
billboard = 1
|
||||
texture_filter = 0
|
||||
|
@ -15,15 +15,20 @@
|
||||
[ext_resource type="Script" path="res://Scripts/visualized_path.gd" id="11_d7ofl"]
|
||||
[ext_resource type="MeshLibrary" uid="uid://jfr8j8kycfa5" path="res://Worlds/GreenPlanet/tilemap.tres" id="12_ywwug"]
|
||||
|
||||
[sub_resource type="PhysicalSkyMaterial" id="PhysicalSkyMaterial_h1csw"]
|
||||
energy_multiplier = 3.0
|
||||
[sub_resource type="ProceduralSkyMaterial" id="ProceduralSkyMaterial_w6p0p"]
|
||||
sky_top_color = Color(0.333333, 0.447059, 0.658824, 1)
|
||||
sky_curve = 0.0349887
|
||||
|
||||
[sub_resource type="Sky" id="Sky_t42h5"]
|
||||
sky_material = SubResource("PhysicalSkyMaterial_h1csw")
|
||||
sky_material = SubResource("ProceduralSkyMaterial_w6p0p")
|
||||
|
||||
[sub_resource type="Environment" id="Environment_l41d0"]
|
||||
background_mode = 2
|
||||
sky = SubResource("Sky_t42h5")
|
||||
ssao_radius = 0.01
|
||||
fog_light_energy = 1.1
|
||||
fog_density = 0.0416
|
||||
adjustment_contrast = 2.18
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_awjk1"]
|
||||
|
||||
@ -92,6 +97,7 @@ enemy_path = NodePath("../Enemies")
|
||||
transform = Transform3D(-4.37114e-08, 0, -1, 0, 1, 0, 1, 0, -4.37114e-08, 25.1496, 0.499996, 5.79039)
|
||||
|
||||
[node name="Trees" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.02, 0)
|
||||
|
||||
[node name="Tree" parent="Trees" instance=ExtResource("10_7v1co")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -24.9581, 0.5, -4.16029)
|
||||
@ -535,7 +541,7 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 1, 1)
|
||||
|
||||
[node name="AStarGraph3D" type="Node3D" parent="." node_paths=PackedStringArray("start", "end", "spawner", "visualized_path", "tower_path")]
|
||||
script = ExtResource("11_07ukk")
|
||||
grid_size = Vector2(19, 9)
|
||||
grid_size = Vector2i(19, 9)
|
||||
point_gap = 1.5
|
||||
start = NodePath("../GroundSpawn")
|
||||
end = NodePath("../EnemyGoal")
|
||||
|
6
health_bar_gradient.tres
Normal file
@ -0,0 +1,6 @@
|
||||
[gd_resource type="Gradient" format=3 uid="uid://dx7auy3oqw82t"]
|
||||
|
||||
[resource]
|
||||
interpolation_color_space = 2
|
||||
offsets = PackedFloat32Array(0, 0.131148, 0.409836, 1)
|
||||
colors = PackedColorArray(0.788235, 0, 0, 1, 0.818896, 0.282651, 0.000353087, 1, 0.839216, 0.847059, 0, 1, 0, 0.917647, 0, 1)
|