inching towards better class inheritence and multiplayer compatibility

This commit is contained in:
2023-11-15 15:19:40 +11:00
parent f004f64b71
commit 1500c22ccc
204 changed files with 1920 additions and 1951 deletions

View File

@ -8,14 +8,14 @@
[ext_resource type="Texture2D" uid="uid://r202vo47jw1q" path="res://Assets/Textures/enemyhealth.png" id="8_77uyi"]
[ext_resource type="Script" path="res://Scripts/StatusEffector.gd" id="9_7hati"]
[ext_resource type="Texture2D" uid="uid://b1fn60m6xfcsq" path="res://Assets/Textures/minimap_enemy.png" id="9_7yfyh"]
[ext_resource type="Script" path="res://Scripts/beelining_controller.gd" id="9_cx8mv"]
[ext_resource type="Script" path="res://Scripts/EnemyAI/beelining_controller.gd" id="9_cx8mv"]
[sub_resource type="SphereShape3D" id="SphereShape3D_21dgw"]
[sub_resource type="ViewportTexture" id="ViewportTexture_ss5ir"]
viewport_path = NodePath("SubViewport")
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health") groups=["Enemies"]]
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "sprite") groups=["Enemies"]]
collision_layer = 4
collision_mask = 3
motion_mode = 1
@ -23,6 +23,7 @@ script = ExtResource("1_m83kr")
status_manager = NodePath("StatusEffector")
movement_controller = NodePath("BeeliningController")
health = NodePath("Health")
sprite = NodePath("DirectionSprite")
[node name="Health" type="Node" parent="."]
script = ExtResource("3_wiose")

View File

@ -8,6 +8,7 @@ signal died(enemy)
@export var status_manager : StatusEffector
@export var movement_controller : EnemyMovement
@export var health : Health
@export var sprite : Sprite3D
var movement_speed
var movement_speed_penalty := 1.0
@ -19,7 +20,7 @@ func _ready() -> void:
health.current_health = stats.health
$SubViewport/ProgressBar.max_value = stats.health
$SubViewport/ProgressBar.value = stats.health
$DirectionSprite.texture = stats.sprite.duplicate()
sprite.texture = stats.sprite.duplicate()
movement_speed = stats.movement_speed

View File

@ -8,12 +8,12 @@
[ext_resource type="PackedScene" uid="uid://cqtew0t8sttpm" path="res://Scenes/damage_particle.tscn" id="4_tn1tu"]
[ext_resource type="Texture2D" uid="uid://r202vo47jw1q" path="res://Assets/Textures/enemyhealth.png" id="8_5ba7s"]
[ext_resource type="Texture2D" uid="uid://b1fn60m6xfcsq" path="res://Assets/Textures/minimap_enemy.png" id="9_f8btv"]
[ext_resource type="Script" path="res://Scripts/pathing_controller.gd" id="10_gljle"]
[ext_resource type="Script" path="res://Scripts/EnemyAI/pathing_controller.gd" id="10_gljle"]
[ext_resource type="Script" path="res://Scripts/StatusEffector.gd" id="10_txouh"]
[sub_resource type="SphereShape3D" id="SphereShape3D_21dgw"]
[sub_resource type="AtlasTexture" id="AtlasTexture_ln1wo"]
[sub_resource type="AtlasTexture" id="AtlasTexture_sn7du"]
resource_local_to_scene = true
atlas = ExtResource("3_naknq")
region = Rect2(0, 0, 32, 32)
@ -21,13 +21,14 @@ region = Rect2(0, 0, 32, 32)
[sub_resource type="ViewportTexture" id="ViewportTexture_4tj6k"]
viewport_path = NodePath("SubViewport")
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health") groups=["Enemies"]]
[node name="Dog" type="CharacterBody3D" node_paths=PackedStringArray("status_manager", "movement_controller", "health", "sprite") 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")
[node name="Health" type="Node" parent="."]
script = ExtResource("2_swu53")
@ -41,7 +42,7 @@ 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_ln1wo")
texture = SubResource("AtlasTexture_sn7du")
[node name="Sprite3D" type="Sprite3D" parent="."]
transform = Transform3D(0.2, 0, 0, 0, 0.2, 0, 0, 0, 0.2, 0, 1.20821, 0)

File diff suppressed because one or more lines are too long