45 lines
1.5 KiB
Plaintext
45 lines
1.5 KiB
Plaintext
|
|
[gd_scene format=3 uid="uid://civli2tqcjiwh"]
|
||
|
|
|
||
|
|
[ext_resource type="Script" uid="uid://bief2jignsvig" path="res://scripts/npcController.gd" id="1_6xvi5"]
|
||
|
|
[ext_resource type="Texture2D" uid="uid://cgvt6p3a875tl" path="res://assets/npc_sprite.png" id="1_mhefn"]
|
||
|
|
|
||
|
|
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_t62y5"]
|
||
|
|
radius = 6.0
|
||
|
|
height = 14.0
|
||
|
|
|
||
|
|
[sub_resource type="AtlasTexture" id="AtlasTexture_6xvi5"]
|
||
|
|
atlas = ExtResource("1_mhefn")
|
||
|
|
region = Rect2(16, 1, 14, 14)
|
||
|
|
|
||
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_ktgr7"]
|
||
|
|
animations = [{
|
||
|
|
"frames": [{
|
||
|
|
"duration": 1.0,
|
||
|
|
"texture": SubResource("AtlasTexture_6xvi5")
|
||
|
|
}],
|
||
|
|
"loop": true,
|
||
|
|
"name": &"default",
|
||
|
|
"speed": 5.0
|
||
|
|
}]
|
||
|
|
|
||
|
|
[sub_resource type="CircleShape2D" id="CircleShape2D_6xvi5"]
|
||
|
|
radius = 18.027756
|
||
|
|
|
||
|
|
[node name="Npc" type="CharacterBody2D" unique_id=218098716]
|
||
|
|
script = ExtResource("1_6xvi5")
|
||
|
|
|
||
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="." unique_id=1128661188]
|
||
|
|
shape = SubResource("CapsuleShape2D_t62y5")
|
||
|
|
|
||
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="." unique_id=1048929834]
|
||
|
|
sprite_frames = SubResource("SpriteFrames_ktgr7")
|
||
|
|
|
||
|
|
[node name="Area2D" type="Area2D" parent="." unique_id=77830484]
|
||
|
|
|
||
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D" unique_id=747257472]
|
||
|
|
shape = SubResource("CircleShape2D_6xvi5")
|
||
|
|
debug_color = Color(0.714968, 0.26936808, 0.9850318, 0.41960785)
|
||
|
|
|
||
|
|
[connection signal="body_entered" from="Area2D" to="." method="_on_area_2d_body_entered"]
|
||
|
|
[connection signal="body_exited" from="Area2D" to="." method="_on_area_2d_body_exited"]
|