84 lines
2.9 KiB
Text
84 lines
2.9 KiB
Text
[gd_scene load_steps=9 format=3 uid="uid://dg8bjkjuddnhg"]
|
|
|
|
[ext_resource type="Script" uid="uid://dg6f6na1nn2c6" path="res://Enemies/Enemy.gd" id="1_orwns"]
|
|
[ext_resource type="Texture2D" uid="uid://db2efj41fwjee" path="res://Assets/Characters/72 Character Free/Char 1/Character 1.png" id="2_a6vjd"]
|
|
[ext_resource type="Script" uid="uid://blnmjxmusrsa7" path="res://UI/GameStyleBoxFlat.gd" id="3_07tka"]
|
|
|
|
[sub_resource type="SphereShape3D" id="SphereShape3D_7frlh"]
|
|
|
|
[sub_resource type="ViewportTexture" id="ViewportTexture_cmo2f"]
|
|
viewport_path = NodePath("Enemy/HealthBar3D/SubViewport")
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_cmo2f"]
|
|
bg_color = Color(0.341, 0.082, 0.094, 0)
|
|
script = ExtResource("3_07tka")
|
|
color = 3
|
|
metadata/_custom_type_script = "uid://blnmjxmusrsa7"
|
|
|
|
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_d6lpy"]
|
|
bg_color = Color(0.921569, 0.419608, 0.415686, 1)
|
|
script = ExtResource("3_07tka")
|
|
color = 0
|
|
metadata/_custom_type_script = "uid://blnmjxmusrsa7"
|
|
|
|
[sub_resource type="SphereShape3D" id="SphereShape3D_cmo2f"]
|
|
radius = 1.0
|
|
|
|
[node name="PathFollow3D" type="PathFollow3D"]
|
|
|
|
[node name="Enemy" type="CharacterBody3D" parent="."]
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.25, 0)
|
|
collision_layer = 4
|
|
collision_mask = 4
|
|
script = ExtResource("1_orwns")
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Enemy"]
|
|
shape = SubResource("SphereShape3D_7frlh")
|
|
|
|
[node name="Sprite3D" type="Sprite3D" parent="Enemy"]
|
|
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, 0, 0)
|
|
billboard = 2
|
|
texture = ExtResource("2_a6vjd")
|
|
hframes = 12
|
|
vframes = 22
|
|
|
|
[node name="HealthBar3D" type="Sprite3D" parent="Enemy"]
|
|
transform = Transform3D(0.35, 0, 0, 0, 0.35, 0, 0, 0, 0.35, 0, 0.33, 0)
|
|
visible = false
|
|
billboard = 2
|
|
texture = SubResource("ViewportTexture_cmo2f")
|
|
|
|
[node name="SubViewport" type="SubViewport" parent="Enemy/HealthBar3D"]
|
|
size = Vector2i(100, 12)
|
|
size_2d_override_stretch = true
|
|
|
|
[node name="HealthBar2D" type="ProgressBar" parent="Enemy/HealthBar3D/SubViewport"]
|
|
anchors_preset = 8
|
|
anchor_left = 0.5
|
|
anchor_top = 0.5
|
|
anchor_right = 0.5
|
|
anchor_bottom = 0.5
|
|
offset_left = -48.0
|
|
offset_top = -4.0
|
|
offset_right = 48.0
|
|
offset_bottom = 4.0
|
|
grow_horizontal = 2
|
|
grow_vertical = 2
|
|
theme_override_styles/background = SubResource("StyleBoxFlat_cmo2f")
|
|
theme_override_styles/fill = SubResource("StyleBoxFlat_d6lpy")
|
|
show_percentage = false
|
|
metadata/_custom_type_script = "uid://blnmjxmusrsa7"
|
|
|
|
[node name="AttackRange" type="Area3D" parent="Enemy"]
|
|
collision_layer = 8
|
|
collision_mask = 8
|
|
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="Enemy/AttackRange"]
|
|
shape = SubResource("SphereShape3D_cmo2f")
|
|
debug_color = Color(0.994297, 0, 0.224345, 0.42)
|
|
|
|
[node name="AttackCooldown" type="Timer" parent="Enemy"]
|
|
one_shot = true
|
|
|
|
[connection signal="body_entered" from="Enemy/AttackRange" to="Enemy" method="_on_attack_range_body_entered"]
|
|
[connection signal="body_exited" from="Enemy/AttackRange" to="Enemy" method="_on_attack_range_body_exited"]
|