50 lines
1.8 KiB
Text
50 lines
1.8 KiB
Text
|
|
[gd_scene load_steps=6 format=3 uid="uid://cyvhv1ih2s762"]
|
||
|
|
|
||
|
|
[ext_resource type="Script" uid="uid://dg6f6na1nn2c6" path="res://enemies/enemy.gd" id="1_s3rvm"]
|
||
|
|
[ext_resource type="Texture2D" uid="uid://drbtkux8n3h8w" path="res://Assets/Characters/72 Character Free/Char 2/Character 5.png" id="2_s3rvm"]
|
||
|
|
[ext_resource type="PackedScene" uid="uid://daiqb0q373002" path="res://UI/health_bar_3d.tscn" id="3_jdhd0"]
|
||
|
|
|
||
|
|
[sub_resource type="SphereShape3D" id="SphereShape3D_7frlh"]
|
||
|
|
|
||
|
|
[sub_resource type="SphereShape3D" id="SphereShape3D_cmo2f"]
|
||
|
|
radius = 1.0
|
||
|
|
|
||
|
|
[node name="PathFollow3D" type="PathFollow3D"]
|
||
|
|
|
||
|
|
[node name="EnemyB" type="CharacterBody3D" parent="."]
|
||
|
|
collision_layer = 4
|
||
|
|
collision_mask = 4
|
||
|
|
script = ExtResource("1_s3rvm")
|
||
|
|
speed = 1
|
||
|
|
max_life = 20
|
||
|
|
money = 10
|
||
|
|
|
||
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="EnemyB"]
|
||
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -0.0491967, 0)
|
||
|
|
shape = SubResource("SphereShape3D_7frlh")
|
||
|
|
|
||
|
|
[node name="Sprite3D" type="Sprite3D" parent="EnemyB"]
|
||
|
|
transform = Transform3D(1.5, 0, 0, 0, 1.5, 0, 0, 0, 1.5, 0, -0.0436401, 0)
|
||
|
|
billboard = 2
|
||
|
|
texture = ExtResource("2_s3rvm")
|
||
|
|
hframes = 12
|
||
|
|
vframes = 22
|
||
|
|
|
||
|
|
[node name="HealthBar3D" parent="EnemyB" instance=ExtResource("3_jdhd0")]
|
||
|
|
transform = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0.6, 0)
|
||
|
|
visible = false
|
||
|
|
|
||
|
|
[node name="AttackRange" type="Area3D" parent="EnemyB"]
|
||
|
|
collision_layer = 8
|
||
|
|
collision_mask = 8
|
||
|
|
|
||
|
|
[node name="CollisionShape3D" type="CollisionShape3D" parent="EnemyB/AttackRange"]
|
||
|
|
shape = SubResource("SphereShape3D_cmo2f")
|
||
|
|
debug_color = Color(0.994297, 0, 0.224345, 0.42)
|
||
|
|
|
||
|
|
[node name="AttackCooldown" type="Timer" parent="EnemyB"]
|
||
|
|
one_shot = true
|
||
|
|
|
||
|
|
[connection signal="body_entered" from="EnemyB/AttackRange" to="EnemyB" method="_on_attack_range_body_entered"]
|
||
|
|
[connection signal="body_exited" from="EnemyB/AttackRange" to="EnemyB" method="_on_attack_range_body_exited"]
|