way too many changes to list, oops. big rewrite.
This commit is contained in:
BIN
Towers/BombLauncher/bombamod.glb
Normal file
BIN
Towers/BombLauncher/bombamod.glb
Normal file
Binary file not shown.
50
Towers/BombLauncher/bombamod.glb.import
Normal file
50
Towers/BombLauncher/bombamod.glb.import
Normal file
@ -0,0 +1,50 @@
|
||||
[remap]
|
||||
|
||||
importer="scene"
|
||||
importer_version=1
|
||||
type="PackedScene"
|
||||
uid="uid://c7oec0i1k76et"
|
||||
path="res://.godot/imported/bombamod.glb-117802fd80272dd9feeffac01483d192.scn"
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Towers/BombLauncher/bombamod.glb"
|
||||
dest_files=["res://.godot/imported/bombamod.glb-117802fd80272dd9feeffac01483d192.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": {
|
||||
"bombamod_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://bombamodel.res"
|
||||
}
|
||||
}
|
||||
}
|
||||
gltf/naming_version=0
|
||||
gltf/embedded_image_handling=0
|
BIN
Towers/BombLauncher/bombamodel.res
Normal file
BIN
Towers/BombLauncher/bombamodel.res
Normal file
Binary file not shown.
BIN
Towers/BombLauncher/bombamodel.res.depren
Normal file
BIN
Towers/BombLauncher/bombamodel.res.depren
Normal file
Binary file not shown.
BIN
Towers/BombLauncher/bombatex.png
Normal file
BIN
Towers/BombLauncher/bombatex.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 3.5 KiB |
34
Towers/BombLauncher/bombatex.png.import
Normal file
34
Towers/BombLauncher/bombatex.png.import
Normal file
@ -0,0 +1,34 @@
|
||||
[remap]
|
||||
|
||||
importer="texture"
|
||||
type="CompressedTexture2D"
|
||||
uid="uid://cxwtwh2al18cb"
|
||||
path="res://.godot/imported/bombatex.png-df385163499382b24d471f4ddfe7bd23.ctex"
|
||||
metadata={
|
||||
"vram_texture": false
|
||||
}
|
||||
|
||||
[deps]
|
||||
|
||||
source_file="res://Towers/BombLauncher/bombatex.png"
|
||||
dest_files=["res://.godot/imported/bombatex.png-df385163499382b24d471f4ddfe7bd23.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
|
28
Towers/BombLauncher/bombtower.tscn
Normal file
28
Towers/BombLauncher/bombtower.tscn
Normal file
@ -0,0 +1,28 @@
|
||||
[gd_scene load_steps=8 format=3 uid="uid://bod84abxnnmdo"]
|
||||
|
||||
[ext_resource type="PackedScene" uid="uid://bidr1m71pajma" path="res://Scenes/Towers/projectile_tower.tscn" id="1_b7osn"]
|
||||
[ext_resource type="ArrayMesh" uid="uid://cbuu5w43qins8" path="res://Towers/BombLauncher/bombamodel.res" id="2_8yc3r"]
|
||||
[ext_resource type="Script" uid="uid://djp7tepdsda8w" path="res://Scripts/effect.gd" id="2_kdbmn"]
|
||||
[ext_resource type="Script" uid="uid://bs020rluyw3hs" path="res://Towers/BombLauncher/tower_bomb_launcher.gd" id="2_qwant"]
|
||||
[ext_resource type="PackedScene" uid="uid://c8oq5unisjqne" path="res://Projectiles/Bomb/bomb_projectile.tscn" id="3_kdbmn"]
|
||||
[ext_resource type="Script" uid="uid://chy7bx8dlwgs0" path="res://Scripts/StatusEffects/status_effect.gd" id="3_qwant"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_twicp"]
|
||||
script = ExtResource("2_kdbmn")
|
||||
damage = 0
|
||||
status_effects = Array[ExtResource("3_qwant")]([])
|
||||
metadata/_custom_type_script = "uid://djp7tepdsda8w"
|
||||
|
||||
[node name="ProjectileTower" instance=ExtResource("1_b7osn")]
|
||||
script = ExtResource("2_qwant")
|
||||
effect = SubResource("Resource_twicp")
|
||||
|
||||
[node name="Pitch" parent="." index="1"]
|
||||
visible = false
|
||||
|
||||
[node name="Yaw" parent="." index="2"]
|
||||
transform = Transform3D(0.5, 0, 0, 0, 0.5, 0, 0, 0, 0.5, 0, 0.386736, 0)
|
||||
mesh = ExtResource("2_8yc3r")
|
||||
|
||||
[node name="SpawnAffect" parent="." index="6"]
|
||||
spawn_scene = ExtResource("3_kdbmn")
|
22
Towers/BombLauncher/tower_bomb_launcher.gd
Normal file
22
Towers/BombLauncher/tower_bomb_launcher.gd
Normal file
@ -0,0 +1,22 @@
|
||||
class_name BombLauncherTower extends Tower
|
||||
|
||||
|
||||
func _ready() -> void:
|
||||
super._ready()
|
||||
#TODO: this needs a getter/setter on target_range to make sure force is
|
||||
#recalculated if target_range changes
|
||||
affector.force = sqrt((target_range * ProjectSettings.get_setting("physics/3d/default_gravity")) / sin(2 * 45))
|
||||
|
||||
|
||||
func aim() -> void:
|
||||
super.aim()
|
||||
var pos: Vector2 = Vector2(global_position.x, global_position.z)
|
||||
var t_pos: Vector2 = Vector2(target_finder.targets[0].global_position.x, target_finder.targets[0].global_position.z)
|
||||
var x: float = pos.distance_to(t_pos)
|
||||
var y: float = target_finder.targets[0].global_position.y - yaw_model.global_position.y
|
||||
var v: float = affector.force
|
||||
var g: float = ProjectSettings.get_setting("physics/3d/default_gravity")
|
||||
var v2: float = pow(v, 2)
|
||||
var angle: float = atan((v2 + sqrt(pow(v, 4) - g * ((g * pow(x, 2)) + (2 * y * v2)))) / (g * x))
|
||||
yaw_model.look_at(Vector3(t_pos.x, yaw_model.global_position.y, t_pos.y))
|
||||
yaw_model.rotate(yaw_model.global_transform.basis.x.normalized(), angle)
|
1
Towers/BombLauncher/tower_bomb_launcher.gd.uid
Normal file
1
Towers/BombLauncher/tower_bomb_launcher.gd.uid
Normal file
@ -0,0 +1 @@
|
||||
uid://bs020rluyw3hs
|
25
Towers/BombLauncher/tower_stats.tres
Normal file
25
Towers/BombLauncher/tower_stats.tres
Normal file
@ -0,0 +1,25 @@
|
||||
[gd_resource type="Resource" script_class="CardText" load_steps=6 format=3 uid="uid://8eaecilvan23"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://yjb0uv6og430" path="res://Scripts/Resources/stat_attribute.gd" id="1_eglp5"]
|
||||
[ext_resource type="Script" uid="uid://dg7gxxqfqxcmc" path="res://Scripts/Resources/card_text.gd" id="2_1vuma"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_yb48y"]
|
||||
script = ExtResource("1_eglp5")
|
||||
key = "Fire Delay"
|
||||
value = 4.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ewwvw"]
|
||||
script = ExtResource("1_eglp5")
|
||||
key = "Damage"
|
||||
value = 10.0
|
||||
|
||||
[sub_resource type="Resource" id="Resource_qu5dv"]
|
||||
script = ExtResource("1_eglp5")
|
||||
key = "Range"
|
||||
value = 8.0
|
||||
|
||||
[resource]
|
||||
script = ExtResource("2_1vuma")
|
||||
target_type = 1
|
||||
attributes = Array[ExtResource("1_eglp5")]([SubResource("Resource_yb48y"), SubResource("Resource_ewwvw"), SubResource("Resource_qu5dv")])
|
||||
text = "Launch a bomb that deals /Damage\\ damage every /Fire Delay\\ seconds"
|
Reference in New Issue
Block a user