summaryrefslogtreecommitdiff
path: root/Mob.tscn
blob: c209adbf07588aa8f8ea3f0dab9796023df43fb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
[gd_scene load_steps=6 format=3 uid="uid://cslaufgh6ber3"]

[ext_resource type="Script" path="res://Mob.gd" id="1_bbcew"]
[ext_resource type="Texture2D" uid="uid://b1b18rd0tqbar" path="res://core_outdoor.png" id="2_xcu8u"]
[ext_resource type="PackedScene" uid="uid://bjcrf4o4a80iv" path="res://HPBar.tscn" id="3_e777u"]

[sub_resource type="CircleShape2D" id="CircleShape2D_rsrm7"]
radius = 3.0

[sub_resource type="RectangleShape2D" id="RectangleShape2D_iaxxs"]
size = Vector2(8, 8)

[node name="Mob" type="CharacterBody2D"]
y_sort_enabled = true
collision_mask = 4
input_pickable = true
script = ExtResource("1_bbcew")

[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
scale = Vector2(0.25, 0.25)
texture = ExtResource("2_xcu8u")
region_enabled = true
region_rect = Rect2(480, 880, 96, 64)

[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_rsrm7")

[node name="NavigationBase" type="Area2D" parent="." groups=["mob_navigation_base"]]
collision_mask = 2

[node name="CollisionShape2D" type="CollisionShape2D" parent="NavigationBase"]
shape = SubResource("RectangleShape2D_iaxxs")

[node name="HPBar" parent="." instance=ExtResource("3_e777u")]
unique_name_in_owner = true
offset_left = -10.0
offset_top = -11.0
offset_right = 10.0
offset_bottom = -9.0

[node name="Label" type="Label" parent="."]
offset_left = -3.0
offset_top = 7.0
offset_right = 3.0
offset_bottom = 19.0
theme_override_font_sizes/font_size = 8

[connection signal="input_event" from="." to="." method="_on_input_event"]
[connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"]
[connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"]
[connection signal="tree_exiting" from="." to="." method="_on_tree_exiting"]
[connection signal="area_entered" from="NavigationBase" to="." method="_on_navigation_base_area_entered"]