way too many changes to list, oops. big rewrite.
This commit is contained in:
BIN
Towers/Gatling/gatling.glb
Normal file
BIN
Towers/Gatling/gatling.glb
Normal file
Binary file not shown.
50
Towers/Gatling/gatling.glb.import
Normal file
50
Towers/Gatling/gatling.glb.import
Normal file
@ -0,0 +1,50 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://c8l43de2o07kb"
|
||||
path="res://.godot/imported/gatling.glb-9b04db40ae4eb581b3e55543c00cd70d.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Towers/Gatling/gatling.glb"
|
||||
dest_files=["res://.godot/imported/gatling.glb-9b04db40ae4eb581b3e55543c00cd70d.scn"]
|
||||
|
||||
[params]
|
||||
|
||||
nodes/root_type="Node3D"
|
||||
nodes/root_name="Scene Root"
|
||||
nodes/apply_root_scale=true
|
||||
nodes/root_scale=1.0
|
||||
nodes/import_as_skeleton_bones=false
|
||||
nodes/use_node_type_suffixes=true
|
||||
meshes/ensure_tangents=true
|
||||
meshes/generate_lods=true
|
||||
meshes/create_shadow_meshes=true
|
||||
meshes/light_baking=1
|
||||
meshes/lightmap_texel_size=0.2
|
||||
meshes/force_disable_compression=false
|
||||
skins/use_named_skins=true
|
||||
animation/import=true
|
||||
animation/fps=30
|
||||
animation/trimming=false
|
||||
animation/remove_immutable_tracks=true
|
||||
animation/import_rest_as_RESET=false
|
||||
import_script/path=""
|
||||
_subresources={
|
||||
"meshes": {
|
||||
"gatling_Cube": {
|
||||
"generate/lightmap_uv": 0,
|
||||
"generate/lods": 0,
|
||||
"generate/shadow_meshes": 0,
|
||||
"lods/normal_merge_angle": 60.0,
|
||||
"lods/normal_split_angle": 25.0,
|
||||
"save_to_file/enabled": false,
|
||||
"save_to_file/make_streamable": "",
|
||||
"save_to_file/path": "res://gattlemesh.res"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=0
|
||||
gltf/embedded_image_handling=1
|
BIN
Towers/Gatling/gatling.png
Normal file
BIN
Towers/Gatling/gatling.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 13 KiB |
34
Towers/Gatling/gatling.png.import
Normal file
34
Towers/Gatling/gatling.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://bjh6e8t8br6rq"
|
||||
path="res://.godot/imported/gatling.png-3c782a94494355068a82b7d51ccf2fce.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Towers/Gatling/gatling.png"
|
||||
dest_files=["res://.godot/imported/gatling.png-3c782a94494355068a82b7d51ccf2fce.ctex"]
|
||||
|
||||
[params]
|
||||
|
||||
compress/mode=0
|
||||
compress/high_quality=false
|
||||
compress/lossy_quality=0.7
|
||||
compress/hdr_compression=1
|
||||
compress/normal_map=0
|
||||
compress/channel_pack=0
|
||||
mipmaps/generate=true
|
||||
mipmaps/limit=-1
|
||||
roughness/mode=0
|
||||
roughness/src_normal=""
|
||||
process/fix_alpha_border=true
|
||||
process/premult_alpha=false
|
||||
process/normal_map_invert_y=false
|
||||
process/hdr_as_srgb=false
|
||||
process/hdr_clamp_exposure=false
|
||||
process/size_limit=0
|
||||
detect_3d/compress_to=0
|
BIN
Towers/Gatling/gattlemesh.res
Normal file
BIN
Towers/Gatling/gattlemesh.res
Normal file
Binary file not shown.
BIN
Towers/Gatling/gattlemesh.res.depren
Normal file
BIN
Towers/Gatling/gattlemesh.res.depren
Normal file
Binary file not shown.
33
Towers/Gatling/tower_gatling.gd
Normal file
33
Towers/Gatling/tower_gatling.gd
Normal file
@ -0,0 +1,33 @@
|
||||
class_name GatlingTower extends Tower
|
||||
|
||||
var time_since_firing_started: float = 0.0
|
||||
var time_to_reach_max_speed: float = 0.0
|
||||
var max_speed_multiplier: float = 0.0
|
||||
var current_time_between_shots: float = 0.0
|
||||
var final_time_between_shots: float = 0.0
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
time_to_reach_max_speed = stats.get_attribute("Speed Time")
|
||||
max_speed_multiplier = stats.get_attribute("Speed Multiplier")
|
||||
final_time_between_shots = time_between_shots / max_speed_multiplier
|
||||
|
||||
|
||||
func _process(delta: float) -> void:
|
||||
if time_since_firing < current_time_between_shots:
|
||||
time_since_firing += delta
|
||||
|
||||
|
||||
func _physics_process(delta: float) -> void:
|
||||
if !target_finder.targets.size() > 0:
|
||||
time_since_firing_started = 0.0
|
||||
current_time_between_shots = time_between_shots
|
||||
else:
|
||||
aim()
|
||||
time_since_firing_started += delta
|
||||
var progress: float = clamp(time_since_firing_started / time_to_reach_max_speed, 0, 1.0)
|
||||
current_time_between_shots = lerpf(time_between_shots, final_time_between_shots, progress)
|
||||
if time_since_firing >= current_time_between_shots:
|
||||
time_since_firing -= current_time_between_shots
|
||||
shoot()
|
1
Towers/Gatling/tower_gatling.gd.uid
Normal file
1
Towers/Gatling/tower_gatling.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://b43lbaanefmj3
|
77
Towers/Gatling/tower_gatling.tscn
Normal file
77
Towers/Gatling/tower_gatling.tscn
Normal file
@ -0,0 +1,77 @@
|
||||
[gd_scene load_steps=13 format=3 uid="uid://ci822ash3mbhi"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://b43lbaanefmj3" path="res://Towers/Gatling/tower_gatling.gd" id="2_ipjp1"]
|
||||
[ext_resource type="Script" uid="uid://rvnacmxsrh4w" path="res://Scripts/target_finder.gd" id="3_co24a"]
|
||||
[ext_resource type="Resource" uid="uid://nxl5wabgl36t" path="res://Towers/Gatling/tower_stats.tres" id="3_oicqw"]
|
||||
[ext_resource type="Script" uid="uid://djp7tepdsda8w" path="res://Scripts/effect.gd" id="3_tykap"]
|
||||
[ext_resource type="Script" uid="uid://chy7bx8dlwgs0" path="res://Scripts/StatusEffects/status_effect.gd" id="4_sc4bm"]
|
||||
[ext_resource type="Script" uid="uid://8d0a4uc2i0ti" path="res://Scripts/Affectors/direct_affect.gd" id="4_v2roj"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://dler7wcqj0bm6" path="res://Towers/Gatling/gattlemesh.res" id="4_wihc0"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7ovr8"]
|
||||
script = ExtResource("3_tykap")
|
||||
damage = 0
|
||||
status_effects = Array[ExtResource("4_sc4bm")]([])
|
||||
|
||||
[sub_resource type="Animation" id="Animation_vk4a8"]
|
||||
resource_name = "shoot"
|
||||
|
||||
[sub_resource type="AnimationLibrary" id="AnimationLibrary_cebsq"]
|
||||
_data = {
|
||||
&"shoot": SubResource("Animation_vk4a8")
|
||||
}
|
||||
|
||||
[sub_resource type="BoxMesh" id="BoxMesh_42byu"]
|
||||
|
||||
[sub_resource type="StandardMaterial3D" id="StandardMaterial3D_1ucq4"]
|
||||
transparency = 1
|
||||
cull_mode = 1
|
||||
shading_mode = 0
|
||||
albedo_color = Color(1, 0, 0.415686, 0.223529)
|
||||
|
||||
[node name="DirectAffectTower" type="Node3D" node_paths=PackedStringArray("target_finder", "affector", "animator", "pitch_model", "yaw_model", "range_indicator", "audio_player")]
|
||||
script = ExtResource("2_ipjp1")
|
||||
stats = ExtResource("3_oicqw")
|
||||
target_finder = NodePath("TargetFinder")
|
||||
affector = NodePath("DirectAffect")
|
||||
animator = NodePath("AnimationPlayer")
|
||||
pitch_model = NodePath("Pitch")
|
||||
yaw_model = NodePath("Yaw")
|
||||
range_indicator = NodePath("CSGSphere3D")
|
||||
audio_player = NodePath("Yaw/AudioStreamPlayer3D")
|
||||
effect = SubResource("Resource_7ovr8")
|
||||
|
||||
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
|
||||
libraries = {
|
||||
&"": SubResource("AnimationLibrary_cebsq")
|
||||
}
|
||||
|
||||
[node name="Pitch" type="MeshInstance3D" parent="."]
|
||||
visible = false
|
||||
mesh = SubResource("BoxMesh_42byu")
|
||||
|
||||
[node name="Yaw" type="MeshInstance3D" parent="."]
|
||||
transform = Transform3D(0.3, 0, 0, 0, 0.3, 0, 0, 0, 0.3, 0, 0.515143, 0)
|
||||
mesh = ExtResource("4_wihc0")
|
||||
|
||||
[node name="AudioStreamPlayer3D" type="AudioStreamPlayer3D" parent="Yaw"]
|
||||
bus = &"SFX"
|
||||
|
||||
[node name="MinimapIcon" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2, 0)
|
||||
layers = 4
|
||||
|
||||
[node name="CSGSphere3D" type="CSGSphere3D" parent="."]
|
||||
visible = false
|
||||
layers = 5
|
||||
radius = 10.0
|
||||
radial_segments = 16
|
||||
rings = 16
|
||||
material = SubResource("StandardMaterial3D_1ucq4")
|
||||
|
||||
[node name="TargetFinder" type="Node" parent="." node_paths=PackedStringArray("tower")]
|
||||
script = ExtResource("3_co24a")
|
||||
tower = NodePath("..")
|
||||
|
||||
[node name="DirectAffect" type="Node" parent="."]
|
||||
script = ExtResource("4_v2roj")
|
38
Towers/Gatling/tower_stats.tres
Normal file
38
Towers/Gatling/tower_stats.tres
Normal file
@ -0,0 +1,38 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=8 format=3 uid="uid://nxl5wabgl36t"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://yjb0uv6og430" path="res://Scripts/Resources/stat_attribute.gd" id="1_w20qq"]
|
||||
[ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_ky46y"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_oayfg"]
|
||||
script = ExtResource("1_w20qq")
|
||||
key = "Fire Delay"
|
||||
value = 0.6
|
||||
|
||||
[sub_resource type="Resource" id="Resource_fekle"]
|
||||
script = ExtResource("1_w20qq")
|
||||
key = "Damage"
|
||||
value = 1.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ud8xi"]
|
||||
script = ExtResource("1_w20qq")
|
||||
key = "Range"
|
||||
value = 10.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_cvkxf"]
|
||||
script = ExtResource("1_w20qq")
|
||||
key = "Speed Multiplier"
|
||||
value = 2.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_pivwn"]
|
||||
script = ExtResource("1_w20qq")
|
||||
key = "Speed Time"
|
||||
value = 3.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_ky46y")
|
||||
target_type = 1
|
||||
energy_type = 0
|
||||
attributes = Array[ExtResource("1_w20qq")]([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
|
||||
|
||||
While attacking the same target, gradually accelerates to /Speed Multiplier\\x the fire rate over /Speed Time\\s"
|
Reference in New Issue
Block a user