2025-05-17 16:42:54 +00:00
|
|
|
[gd_scene load_steps=15 format=3 uid="uid://tpe1cb4ucx0b"]
|
2025-05-17 15:50:12 +00:00
|
|
|
|
|
|
|
[ext_resource type="Texture2D" uid="uid://b8l378t64365q" path="res://playerSprite.png" id="1_4flbx"]
|
2025-05-17 16:42:54 +00:00
|
|
|
[ext_resource type="Texture2D" uid="uid://cgls65agualgs" path="res://playerSprites/playerSprite_0001.png" id="2_nvl01"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://bmh0heje40ykd" path="res://playerSprites/playerSprite_0002.png" id="3_ivps1"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://bao85imrx0f03" path="res://playerSprites/playerSprite_0003.png" id="4_urp6f"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://c6cl0gxxi0qit" path="res://playerSprites/playerSprite_0004.png" id="5_bwjto"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://b17ier27c0rl3" path="res://playerSprites/playerSprite_0005.png" id="6_606se"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://conrfwtlx2efh" path="res://playerSprites/playerSprite_0006.png" id="7_u1c27"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://dr02wvaqua2bn" path="res://playerSprites/playerSprite_0007.png" id="8_op7ga"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://d6fs7c2vhkrp" path="res://playerSprites/playerSprite_0008.png" id="9_q13i1"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://drob7tjjr8w2g" path="res://playerSprites/playerSprite_0009.png" id="10_pylmc"]
|
|
|
|
[ext_resource type="Texture2D" uid="uid://c4aoelxphmcvo" path="res://playerSprites/playerSprite_0010.png" id="11_pbfsw"]
|
2025-05-17 15:50:12 +00:00
|
|
|
|
|
|
|
[sub_resource type="GDScript" id="GDScript_4flbx"]
|
|
|
|
resource_name = "movementScript"
|
|
|
|
script/source = "extends CharacterBody2D
|
|
|
|
|
|
|
|
|
2025-05-17 16:42:54 +00:00
|
|
|
const SPEED = 3.0
|
2025-05-17 15:50:12 +00:00
|
|
|
|
|
|
|
|
|
|
|
func _physics_process(delta: float) -> void:
|
|
|
|
# Get the input direction and handle the movement/deceleration.
|
|
|
|
# As good practice, you should replace UI actions with custom gameplay actions.
|
|
|
|
var direction := Input.get_vector(\"moveLeft\", \"moveRight\", \"moveUp\", \"moveDown\")
|
2025-05-17 16:25:57 +00:00
|
|
|
move_and_collide(direction * SPEED)
|
2025-05-17 15:50:12 +00:00
|
|
|
"
|
|
|
|
|
|
|
|
[sub_resource type="SpriteFrames" id="SpriteFrames_onrkg"]
|
|
|
|
animations = [{
|
|
|
|
"frames": [{
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("1_4flbx")
|
2025-05-17 16:42:54 +00:00
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("2_nvl01")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("3_ivps1")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("4_urp6f")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("5_bwjto")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("6_606se")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("7_u1c27")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("8_op7ga")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("9_q13i1")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("10_pylmc")
|
|
|
|
}, {
|
|
|
|
"duration": 1.0,
|
|
|
|
"texture": ExtResource("11_pbfsw")
|
2025-05-17 15:50:12 +00:00
|
|
|
}],
|
|
|
|
"loop": true,
|
|
|
|
"name": &"default",
|
2025-05-17 16:42:54 +00:00
|
|
|
"speed": 10.0
|
2025-05-17 15:50:12 +00:00
|
|
|
}]
|
|
|
|
|
|
|
|
[sub_resource type="RectangleShape2D" id="RectangleShape2D_i3pqv"]
|
2025-05-17 16:25:57 +00:00
|
|
|
size = Vector2(22, 22)
|
2025-05-17 15:07:45 +00:00
|
|
|
|
|
|
|
[node name="CharacterBody2D" type="CharacterBody2D"]
|
2025-05-17 16:25:57 +00:00
|
|
|
collision_mask = 2
|
2025-05-17 15:50:12 +00:00
|
|
|
script = SubResource("GDScript_4flbx")
|
2025-05-17 15:07:45 +00:00
|
|
|
|
|
|
|
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
|
2025-05-17 15:50:12 +00:00
|
|
|
sprite_frames = SubResource("SpriteFrames_onrkg")
|
2025-05-17 16:42:54 +00:00
|
|
|
autoplay = "default"
|
|
|
|
frame_progress = 0.796774
|
2025-05-17 15:07:45 +00:00
|
|
|
|
|
|
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
2025-05-17 15:50:12 +00:00
|
|
|
shape = SubResource("RectangleShape2D_i3pqv")
|
|
|
|
|
|
|
|
[node name="Camera2D" type="Camera2D" parent="."]
|
2025-05-17 16:42:54 +00:00
|
|
|
position_smoothing_enabled = true
|
|
|
|
position_smoothing_speed = 10.0
|