Beginning of lesson 33. House polygon working and we are able to speak with NPC at world map, but not in starter town.

This commit is contained in:
2025-04-18 21:53:50 -03:00
parent ffbbfd455e
commit b0c7c3d3ff
13 changed files with 219 additions and 23 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=22 format=3 uid="uid://d3e5mg0gk8u7r"]
[gd_scene load_steps=23 format=3 uid="uid://d3e5mg0gk8u7r"]
[ext_resource type="Texture2D" uid="uid://byx166hd5b3as" path="res://gfx/game/maps/entities/player/Idle/Untitled-0_0.png" id="1_li2a0"]
[ext_resource type="Script" uid="uid://bo0had2vq4r7h" path="res://scripts/game/maps/entities/mob.gd" id="1_mu6cs"]
@@ -129,11 +129,15 @@ size = Vector2(4, 4)
[sub_resource type="RectangleShape2D" id="RectangleShape2D_tvinw"]
size = Vector2(16, 16)
[node name="Mob" type="Node2D" node_paths=PackedStringArray("animator", "collisionRay_1", "collisionRay_2")]
[sub_resource type="CircleShape2D" id="CircleShape2D_mu6cs"]
radius = 8.0
[node name="Mob" type="Node2D" node_paths=PackedStringArray("animator", "collisionRay_1", "collisionRay_2", "speechCollider")]
script = ExtResource("1_mu6cs")
animator = NodePath("AnimatedSprite2D")
collisionRay_1 = NodePath("CollisionRayCast_1")
collisionRay_2 = NodePath("CollisionRayCast_2")
speechCollider = NodePath("SpeachRadius")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(8, 8)
@@ -150,17 +154,25 @@ position = Vector2(8, 8)
target_position = Vector2(0, 16)
collision_mask = 5
[node name="Area2D" type="Area2D" parent="."]
[node name="MapTriggerCollider" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="MapTriggerCollider"]
position = Vector2(8, 8)
shape = SubResource("RectangleShape2D_mu6cs")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
[node name="Collider" type="RigidBody2D" parent="."]
collision_layer = 6
collision_mask = 6
freeze = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Collider"]
position = Vector2(8, 8)
shape = SubResource("RectangleShape2D_tvinw")
[node name="SpeachRadius" type="Area2D" parent="."]
collision_layer = 4
collision_mask = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="SpeachRadius"]
position = Vector2(8, 8)
shape = SubResource("CircleShape2D_mu6cs")