End of lesson 31

This commit is contained in:
2025-04-18 20:46:02 -03:00
parent f4e4de59f5
commit ffbbfd455e
8 changed files with 416 additions and 18 deletions

View File

@@ -1,4 +1,4 @@
[gd_scene load_steps=21 format=3 uid="uid://d3e5mg0gk8u7r"]
[gd_scene load_steps=22 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"]
@@ -20,6 +20,7 @@
[ext_resource type="Texture2D" uid="uid://b2068kd1mmpsh" path="res://gfx/game/maps/entities/player/WalkUp/Untitled-2_3.png" id="17_7e337"]
[sub_resource type="SpriteFrames" id="SpriteFrames_5m0ve"]
resource_local_to_scene = true
animations = [{
"frames": [{
"duration": 1.0,
@@ -125,6 +126,9 @@ animations = [{
[sub_resource type="RectangleShape2D" id="RectangleShape2D_mu6cs"]
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")]
script = ExtResource("1_mu6cs")
animator = NodePath("AnimatedSprite2D")
@@ -134,20 +138,29 @@ collisionRay_2 = NodePath("CollisionRayCast_2")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(8, 8)
sprite_frames = SubResource("SpriteFrames_5m0ve")
animation = &"Walk Up"
frame = 3
frame_progress = 0.497982
animation = &"Idle Down"
[node name="CollisionRayCast_1" type="RayCast2D" parent="."]
position = Vector2(8, 8)
target_position = Vector2(0, 16)
collision_mask = 5
[node name="CollisionRayCast_2" type="RayCast2D" parent="."]
position = Vector2(8, 8)
target_position = Vector2(0, 16)
collision_mask = 5
[node name="Area2D" type="Area2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
position = Vector2(8, 8)
shape = SubResource("RectangleShape2D_mu6cs")
[node name="RigidBody2D" type="RigidBody2D" parent="."]
collision_layer = 6
collision_mask = 6
freeze = true
[node name="CollisionShape2D" type="CollisionShape2D" parent="RigidBody2D"]
position = Vector2(8, 8)
shape = SubResource("RectangleShape2D_tvinw")