semi-idle-arpg/scenes/enemy.tscn

64 lines
1.9 KiB
Plaintext

[gd_scene load_steps=4 format=3 uid="uid://55qfhbliodhn"]
[ext_resource type="Script" path="res://scripts/NPCEnemy.gd" id="1_ec4cy"]
[ext_resource type="Texture2D" uid="uid://b10c1776j6j60" path="res://assets/icon.svg" id="2_twdr5"]
[ext_resource type="Theme" uid="uid://clhh3c3gxotjg" path="res://assets/healthbar.tres" id="3_tceil"]
[node name="NPCEnemy" type="CharacterBody2D"]
script = ExtResource("1_ec4cy")
attack_base = 0
npcDifficulty = 1
[node name="CollisionShape2D" type="CollisionPolygon2D" parent="."]
position = Vector2(-100, -86)
polygon = PackedVector2Array(0, 0, 100, -43, 200, 0, 100, 43)
[node name="Sprite2D" type="Sprite2D" parent="."]
texture = ExtResource("2_twdr5")
[node name="MarginContainer" type="MarginContainer" parent="Sprite2D"]
z_index = 2
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -91.0
offset_top = -94.0
offset_right = -36.0
offset_bottom = -57.0
grow_horizontal = 2
grow_vertical = 2
[node name="Nameplate" type="VBoxContainer" parent="Sprite2D/MarginContainer"]
layout_mode = 2
[node name="Healthbar" type="ProgressBar" parent="Sprite2D/MarginContainer/Nameplate"]
unique_name_in_owner = true
custom_minimum_size = Vector2(0, 16)
layout_mode = 2
theme = ExtResource("3_tceil")
max_value = 10.0
step = 1.0
value = 10.0
[node name="TitleBox" type="HBoxContainer" parent="Sprite2D/MarginContainer/Nameplate"]
layout_mode = 2
[node name="TierLabel" type="Label" parent="Sprite2D/MarginContainer/Nameplate/TitleBox"]
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
text = "I"
[node name="NameLabel" type="Label" parent="Sprite2D/MarginContainer/Nameplate/TitleBox"]
unique_name_in_owner = true
layout_mode = 2
size_flags_horizontal = 4
size_flags_vertical = 0
text = "Enemy"
[node name="AttackTimer" type="Timer" parent="."]
wait_time = 4.0
autostart = true
[connection signal="timeout" from="AttackTimer" to="." method="_on_attack_timer_timeout"]