From 14e51610a66099af5cba7cb92876e691fe017216 Mon Sep 17 00:00:00 2001 From: Daniel Weipert Date: Sat, 31 Aug 2024 21:19:36 +0200 Subject: next commit --- Mob.tscn | 37 +++++++++++++++++++++++++------------ 1 file changed, 25 insertions(+), 12 deletions(-) (limited to 'Mob.tscn') diff --git a/Mob.tscn b/Mob.tscn index c209adb..95274ac 100644 --- a/Mob.tscn +++ b/Mob.tscn @@ -1,15 +1,18 @@ -[gd_scene load_steps=6 format=3 uid="uid://cslaufgh6ber3"] +[gd_scene load_steps=7 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="Texture2D" uid="uid://dsy7k2v5fhh6v" path="res://Assets/Mobs/angesnow-front.png" id="2_rxqq1"] [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_1cqix"] +size = Vector2(3, 3) [sub_resource type="RectangleShape2D" id="RectangleShape2D_iaxxs"] size = Vector2(8, 8) +[sub_resource type="RectangleShape2D" id="RectangleShape2D_o5ax3"] +size = Vector2(16, 16) + [node name="Mob" type="CharacterBody2D"] y_sort_enabled = true collision_mask = 4 @@ -18,13 +21,12 @@ 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 +scale = Vector2(0.5, 0.5) +texture = ExtResource("2_rxqq1") region_rect = Rect2(480, 880, 96, 64) [node name="CollisionShape2D" type="CollisionShape2D" parent="."] -shape = SubResource("CircleShape2D_rsrm7") +shape = SubResource("RectangleShape2D_1cqix") [node name="NavigationBase" type="Area2D" parent="." groups=["mob_navigation_base"]] collision_mask = 2 @@ -40,14 +42,25 @@ 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 +visible = false +offset_left = -9.0 +offset_top = 12.0 +offset_right = 10.0 +offset_bottom = 24.0 theme_override_font_sizes/font_size = 8 +text = "1000" +horizontal_alignment = 1 + +[node name="SelectionArea" type="Area2D" parent="."] + +[node name="CollisionShape2D" type="CollisionShape2D" parent="SelectionArea"] +shape = SubResource("RectangleShape2D_o5ax3") [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"] +[connection signal="input_event" from="SelectionArea" to="." method="_on_selection_area_input_event"] +[connection signal="mouse_entered" from="SelectionArea" to="." method="_on_selection_area_mouse_entered"] +[connection signal="mouse_exited" from="SelectionArea" to="." method="_on_selection_area_mouse_exited"] -- cgit v1.2.3