pathfinding rework for now
This commit is contained in:
@ -1,12 +1,14 @@
|
||||
[gd_scene load_steps=3 format=3 uid="uid://iohlxrso4bl8"]
|
||||
[gd_scene load_steps=4 format=3 uid="uid://iohlxrso4bl8"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dy2ukmg6koun1" path="res://Assets/Textures/tree.png" id="1_sisdp"]
|
||||
[ext_resource type="Texture2D" uid="uid://dg47vgt0uccw1" path="res://Assets/Textures/minimap_tree.png" id="2_85nm0"]
|
||||
[ext_resource type="PackedScene" uid="uid://406wnf58lo7h" path="res://3dtree.tscn" id="3_q6n84"]
|
||||
|
||||
[node name="Tree" type="Node3D"]
|
||||
|
||||
[node name="Sprite3D" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 2.15464, 0)
|
||||
visible = false
|
||||
pixel_size = 0.05
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
@ -14,6 +16,7 @@ texture = ExtResource("1_sisdp")
|
||||
|
||||
[node name="Sprite3D2" type="Sprite3D" parent="."]
|
||||
transform = Transform3D(-4.37114e-08, 0, 1, 0, 1, 0, -1, 0, -4.37114e-08, 0, 2.15464, 0)
|
||||
visible = false
|
||||
pixel_size = 0.05
|
||||
alpha_cut = 1
|
||||
texture_filter = 0
|
||||
@ -24,3 +27,5 @@ transform = Transform3D(7.5, 0, 0, 0, -3.27835e-07, 7.5, 0, -7.5, -3.27835e-07,
|
||||
layers = 4
|
||||
texture_filter = 0
|
||||
texture = ExtResource("2_85nm0")
|
||||
|
||||
[node name="tree_test" parent="." instance=ExtResource("3_q6n84")]
|
||||
|
@ -16,7 +16,7 @@
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_ss5ir"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "sprite") groups=["Enemies"]]
|
||||
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "d_n") groups=["Enemies"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
motion_mode = 1
|
||||
@ -24,7 +24,7 @@ script = ExtResource("1_m83kr")
|
||||
status_manager = NodePath("StatusEffector")
|
||||
movement_controller = NodePath("BeeliningController")
|
||||
health = NodePath("Health")
|
||||
sprite = NodePath("DirectionSprite")
|
||||
d_n = NodePath("Node3D")
|
||||
corpse_scene = ExtResource("2_aed6c")
|
||||
|
||||
[node name="Health" type="Node" parent="."]
|
||||
@ -82,6 +82,8 @@ script = ExtResource("9_7hati")
|
||||
sprite_container = NodePath("../SubViewport/HBoxContainer")
|
||||
metadata/_custom_type_script = "uid://cojjgevmbhwal"
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="."]
|
||||
|
||||
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||
|
@ -1,5 +1,4 @@
|
||||
extends CharacterBody3D
|
||||
class_name EnemyController
|
||||
class_name EnemyController extends CharacterBody3D
|
||||
|
||||
signal reached_goal(enemy: Enemy, penalty: int)
|
||||
signal died(enemy: Enemy)
|
||||
@ -8,7 +7,8 @@ signal died(enemy: Enemy)
|
||||
@export var status_manager: StatusEffector
|
||||
@export var movement_controller: EnemyMovement
|
||||
@export var health: Health
|
||||
@export var sprite: Sprite3D
|
||||
@export var d_n: Node3D
|
||||
#@export var sprite: Sprite3D
|
||||
@export var corpse_scene: PackedScene
|
||||
|
||||
var movement_speed: float
|
||||
@ -20,7 +20,7 @@ func _ready() -> void:
|
||||
health.max_health = stats.health
|
||||
health.current_health = stats.health
|
||||
$SubViewport/HealthBar.setup(stats.health)
|
||||
sprite.texture = stats.sprite.duplicate()
|
||||
#sprite.texture = stats.sprite.duplicate()
|
||||
movement_speed = stats.movement_speed
|
||||
status_manager.enemy = self
|
||||
|
||||
|
@ -23,14 +23,14 @@ region = Rect2(0, 0, 32, 32)
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_4tj6k"]
|
||||
viewport_path = NodePath("SubViewport")
|
||||
|
||||
[node name="WalkingEnemy" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "sprite") groups=["Enemies"]]
|
||||
[node name="WalkingEnemy" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "d_n") groups=["Enemies"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_fwsjt")
|
||||
status_manager = NodePath("StatusEffector")
|
||||
movement_controller = NodePath("PathingController")
|
||||
health = NodePath("Health")
|
||||
sprite = NodePath("DirectionSprite")
|
||||
d_n = NodePath("Node3D")
|
||||
corpse_scene = ExtResource("2_y7h25")
|
||||
|
||||
[node name="Health" type="Node" parent="."]
|
||||
@ -93,6 +93,9 @@ script = ExtResource("10_txouh")
|
||||
sprite_container = NodePath("../SubViewport/HBoxContainer")
|
||||
metadata/_custom_type_script = "uid://cojjgevmbhwal"
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.429125, 0)
|
||||
|
||||
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||
|
@ -5,7 +5,7 @@
|
||||
[ext_resource type="Script" uid="uid://bamhci3kawuyt" path="res://Scripts/health.gd" id="3_dhcpw"]
|
||||
[ext_resource type="PackedScene" uid="uid://cqtew0t8sttpm" path="res://Scenes/damage_particle.tscn" id="4_yref6"]
|
||||
[ext_resource type="PackedScene" uid="uid://ri8r03wqy80t" path="res://Scenes/8_direction_sprite.tscn" id="5_5u3uw"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj13g1w14mekw" path="res://Assets/Textures/eye_dog.png" id="6_h3ov4"]
|
||||
[ext_resource type="Texture2D" uid="uid://cb66pspr16scy" path="res://Assets/Textures/leapfrog_2.png" id="6_joiuq"]
|
||||
[ext_resource type="Script" uid="uid://cummt2be3r1gq" path="res://Scripts/hitbox.gd" id="7_72t32"]
|
||||
[ext_resource type="Texture2D" uid="uid://b1fn60m6xfcsq" path="res://Assets/Textures/minimap_enemy.png" id="8_egpbw"]
|
||||
[ext_resource type="Script" uid="uid://cojjgevmbhwal" path="res://Scripts/status_effector.gd" id="9_47ywr"]
|
||||
@ -15,7 +15,7 @@
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_o3ikr"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("6_h3ov4")
|
||||
atlas = ExtResource("6_joiuq")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="SphereShape3D" id="SphereShape3D_132sr"]
|
||||
@ -38,14 +38,14 @@ viewport_path = NodePath("SubViewport5")
|
||||
[sub_resource type="ViewportTexture" id="ViewportTexture_5u3uw"]
|
||||
viewport_path = NodePath("SubViewport6")
|
||||
|
||||
[node name="LeapingEnemy" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "sprite") groups=["Enemies"]]
|
||||
[node name="LeapingEnemy" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "d_n") groups=["Enemies"]]
|
||||
collision_layer = 4
|
||||
collision_mask = 3
|
||||
script = ExtResource("1_joiuq")
|
||||
status_manager = NodePath("StatusEffector")
|
||||
movement_controller = NodePath("LeapingController")
|
||||
health = NodePath("Health")
|
||||
sprite = NodePath("DirectionSprite")
|
||||
d_n = NodePath("Node3D")
|
||||
corpse_scene = ExtResource("2_ssgps")
|
||||
|
||||
[node name="Health" type="Node" parent="."]
|
||||
@ -224,6 +224,9 @@ script = ExtResource("9_47ywr")
|
||||
sprite_container = NodePath("../SubViewport/HBoxContainer")
|
||||
metadata/_custom_type_script = "uid://cojjgevmbhwal"
|
||||
|
||||
[node name="Node3D" type="Node3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.440026, 0)
|
||||
|
||||
[connection signal="health_changed" from="Health" to="SubViewport/HealthBar" method="on_health_changed"]
|
||||
[connection signal="health_depleted" from="Health" to="." method="die"]
|
||||
[connection signal="took_damage" from="Hitbox" to="Health" method="take_damage"]
|
||||
|
File diff suppressed because one or more lines are too long
@ -1,4 +1,4 @@
|
||||
[gd_scene load_steps=12 format=3 uid="uid://uv7hjsgisy31"]
|
||||
[gd_scene load_steps=24 format=3 uid="uid://uv7hjsgisy31"]
|
||||
|
||||
[ext_resource type="Texture2D" uid="uid://dgwsvkmnesjjm" path="res://Assets/Textures/stone.png" id="1_45ikc"]
|
||||
[ext_resource type="Script" uid="uid://cjensbjuji22t" path="res://Worlds/TestingRange/Levels/training_arena.gd" id="1_dgqrn"]
|
||||
@ -6,7 +6,10 @@
|
||||
[ext_resource type="PackedScene" uid="uid://b0nady5xm88bo" path="res://Worlds/GreenPlanet/Enemies/land_enemy.tscn" id="3_y4upj"]
|
||||
[ext_resource type="PackedScene" uid="uid://dsasunnk47n8o" path="res://Scenes/item_card.tscn" id="4_i7krx"]
|
||||
[ext_resource type="Resource" uid="uid://deer0awg4d18o" path="res://Cards/assault.tres" id="5_806m0"]
|
||||
[ext_resource type="Resource" uid="uid://8eba45hql7bo" path="res://Resources/Enemies/dog.tres" id="5_tv1bi"]
|
||||
[ext_resource type="Texture2D" uid="uid://cdnhe2mi5c5ln" path="res://Assets/Textures/dead_eye_dog.png" id="5_aqj4m"]
|
||||
[ext_resource type="Texture2D" uid="uid://g00wwrlxxdc5" path="res://Assets/Textures/icon_eye_dog.png" id="6_ukkm8"]
|
||||
[ext_resource type="Script" uid="uid://cbwxa2a4hfcy4" path="res://Scripts/Resources/enemy.gd" id="7_5p2fi"]
|
||||
[ext_resource type="Texture2D" uid="uid://dj13g1w14mekw" path="res://Assets/Textures/eye_dog.png" id="8_4y2w1"]
|
||||
[ext_resource type="PackedScene" uid="uid://ddbbwx0yy16lh" path="res://Scenes/TowerBase/tower_base.tscn" id="9_imodf"]
|
||||
|
||||
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_mqtlc"]
|
||||
@ -19,6 +22,125 @@ texture_filter = 0
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_3mcyj"]
|
||||
size = Vector3(15, 1, 30)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_aqj4m"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("8_4y2w1")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_ukkm8"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("7_5p2fi")
|
||||
title = "dog"
|
||||
target_type = 1
|
||||
icon = ExtResource("6_ukkm8")
|
||||
death_sprite = ExtResource("5_aqj4m")
|
||||
sprite = SubResource("AtlasTexture_aqj4m")
|
||||
spawn_power = 10
|
||||
health = 180
|
||||
penalty = 10
|
||||
movement_speed = 1.2
|
||||
spawn_cooldown = 1.2
|
||||
common_group = 4
|
||||
common_cost = 1
|
||||
uncommon_group = 6
|
||||
uncommon_cost = 2
|
||||
rare_group = 8
|
||||
rare_cost = 3
|
||||
epic_group = 10
|
||||
epic_cost = 4
|
||||
legendary_group = 12
|
||||
legendary_cost = 5
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_5p2fi"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("8_4y2w1")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_4y2w1"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("7_5p2fi")
|
||||
title = "dog"
|
||||
target_type = 1
|
||||
icon = ExtResource("6_ukkm8")
|
||||
death_sprite = ExtResource("5_aqj4m")
|
||||
sprite = SubResource("AtlasTexture_5p2fi")
|
||||
spawn_power = 10
|
||||
health = 180
|
||||
penalty = 10
|
||||
movement_speed = 1.2
|
||||
spawn_cooldown = 1.2
|
||||
common_group = 4
|
||||
common_cost = 1
|
||||
uncommon_group = 6
|
||||
uncommon_cost = 2
|
||||
rare_group = 8
|
||||
rare_cost = 3
|
||||
epic_group = 10
|
||||
epic_cost = 4
|
||||
legendary_group = 12
|
||||
legendary_cost = 5
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dl7a1"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("8_4y2w1")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_tilno"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("7_5p2fi")
|
||||
title = "dog"
|
||||
target_type = 1
|
||||
icon = ExtResource("6_ukkm8")
|
||||
death_sprite = ExtResource("5_aqj4m")
|
||||
sprite = SubResource("AtlasTexture_dl7a1")
|
||||
spawn_power = 10
|
||||
health = 180
|
||||
penalty = 10
|
||||
movement_speed = 1.2
|
||||
spawn_cooldown = 1.2
|
||||
common_group = 4
|
||||
common_cost = 1
|
||||
uncommon_group = 6
|
||||
uncommon_cost = 2
|
||||
rare_group = 8
|
||||
rare_cost = 3
|
||||
epic_group = 10
|
||||
epic_cost = 4
|
||||
legendary_group = 12
|
||||
legendary_cost = 5
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_dgy1v"]
|
||||
resource_local_to_scene = true
|
||||
atlas = ExtResource("8_4y2w1")
|
||||
region = Rect2(0, 0, 32, 32)
|
||||
|
||||
[sub_resource type="Resource" id="Resource_1enkk"]
|
||||
resource_local_to_scene = true
|
||||
script = ExtResource("7_5p2fi")
|
||||
title = "dog"
|
||||
target_type = 1
|
||||
icon = ExtResource("6_ukkm8")
|
||||
death_sprite = ExtResource("5_aqj4m")
|
||||
sprite = SubResource("AtlasTexture_dgy1v")
|
||||
spawn_power = 10
|
||||
health = 180
|
||||
penalty = 10
|
||||
movement_speed = 1.2
|
||||
spawn_cooldown = 1.2
|
||||
common_group = 4
|
||||
common_cost = 1
|
||||
uncommon_group = 6
|
||||
uncommon_cost = 2
|
||||
rare_group = 8
|
||||
rare_cost = 3
|
||||
epic_group = 10
|
||||
epic_cost = 4
|
||||
legendary_group = 12
|
||||
legendary_cost = 5
|
||||
|
||||
[sub_resource type="BoxShape3D" id="BoxShape3D_aqj4m"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
||||
[node name="Node3D" type="Node3D"]
|
||||
script = ExtResource("1_dgqrn")
|
||||
|
||||
@ -41,19 +163,19 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.805513, 0.5, 2.30163)
|
||||
|
||||
[node name="Enemy" parent="." instance=ExtResource("3_y4upj")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -4.28337, 0.601179, -1.23188)
|
||||
stats = ExtResource("5_tv1bi")
|
||||
stats = SubResource("Resource_ukkm8")
|
||||
|
||||
[node name="Enemy2" parent="." instance=ExtResource("3_y4upj")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -1.59318, 0.601179, -2.16648)
|
||||
stats = ExtResource("5_tv1bi")
|
||||
stats = SubResource("Resource_4y2w1")
|
||||
|
||||
[node name="Enemy3" parent="." instance=ExtResource("3_y4upj")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 1.38431, 0.601179, -2.44026)
|
||||
stats = ExtResource("5_tv1bi")
|
||||
stats = SubResource("Resource_tilno")
|
||||
|
||||
[node name="Enemy4" parent="." instance=ExtResource("3_y4upj")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 3.49476, 0.601179, -2.4969)
|
||||
stats = ExtResource("5_tv1bi")
|
||||
stats = SubResource("Resource_1enkk")
|
||||
|
||||
[node name="assaultcard" parent="." instance=ExtResource("4_i7krx")]
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, -2.7802, 0.5, 3.16356)
|
||||
@ -66,3 +188,66 @@ transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 4.77234, 0.5, 2.6958)
|
||||
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0.0766634, 0.5, -9.7488)
|
||||
inventory = NodePath("../towerbase/Inventory")
|
||||
collider = NodePath("../towerbase/CollisionShape3D")
|
||||
|
||||
[node name="StaticBody3D2" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.984808, 0.173648, 0, -0.173648, 0.984808, 1.16471, 0.5, 12.4493)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D2"]
|
||||
shape = SubResource("BoxShape3D_aqj4m")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D2"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
||||
[node name="StaticBody3D3" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.965926, 0.258819, 0, -0.258819, 0.965926, 0.0990853, 0.5, 11.5008)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D3"]
|
||||
shape = SubResource("BoxShape3D_aqj4m")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D3"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
||||
[node name="StaticBody3D4" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.939693, 0.34202, 0, -0.34202, 0.939693, -1.00031, 0.5, 11.0314)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D4"]
|
||||
shape = SubResource("BoxShape3D_aqj4m")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D4"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
||||
[node name="StaticBody3D5" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.906308, 0.422618, 0, -0.422618, 0.906308, -2.09458, 0.5, 10.7668)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D5"]
|
||||
shape = SubResource("BoxShape3D_aqj4m")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D5"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
||||
[node name="StaticBody3D6" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.866025, 0.5, 0, -0.5, 0.866025, -3.20157, 0.5, 10.5973)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D6"]
|
||||
shape = SubResource("BoxShape3D_aqj4m")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D6"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
||||
[node name="StaticBody3D7" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.819152, 0.573576, 0, -0.573576, 0.819152, -4.31944, 0.5, 10.4654)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D7"]
|
||||
shape = SubResource("BoxShape3D_aqj4m")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D7"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
||||
[node name="StaticBody3D8" type="StaticBody3D" parent="."]
|
||||
transform = Transform3D(1, 0, 0, 0, 0.766044, 0.642788, 0, -0.642788, 0.766044, -5.47159, 0.5, 10.4089)
|
||||
|
||||
[node name="CollisionShape3D" type="CollisionShape3D" parent="StaticBody3D8"]
|
||||
shape = SubResource("BoxShape3D_aqj4m")
|
||||
|
||||
[node name="CSGBox3D" type="CSGBox3D" parent="StaticBody3D8"]
|
||||
size = Vector3(1, 1, 10)
|
||||
|
Reference in New Issue
Block a user