Files
retromariogodot/scenes/player.tscn
T
2024-07-28 19:07:05 +02:00

87 lines
2.1 KiB
Plaintext

[gd_scene load_steps=11 format=3 uid="uid://dk1aby88pygtr"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_lm7ix"]
[ext_resource type="Texture2D" uid="uid://dhw3lpuskbvku" path="res://assets/mario-luigi-4.png" id="1_w3chr"]
[sub_resource type="AtlasTexture" id="AtlasTexture_l22ll"]
atlas = ExtResource("1_w3chr")
region = Rect2(182, 34, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_rku65"]
atlas = ExtResource("1_w3chr")
region = Rect2(80, 34, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_dmbgr"]
atlas = ExtResource("1_w3chr")
region = Rect2(165, 34, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_jb1pe"]
atlas = ExtResource("1_w3chr")
region = Rect2(97, 34, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_fgp3y"]
atlas = ExtResource("1_w3chr")
region = Rect2(114, 34, 16, 16)
[sub_resource type="AtlasTexture" id="AtlasTexture_25ryr"]
atlas = ExtResource("1_w3chr")
region = Rect2(131, 34, 16, 16)
[sub_resource type="SpriteFrames" id="SpriteFrames_l5s58"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_l22ll")
}],
"loop": true,
"name": &"fall",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_rku65")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_dmbgr")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_jb1pe")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_fgp3y")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_25ryr")
}],
"loop": true,
"name": &"run",
"speed": 10.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_4sl4a"]
radius = 6.0
height = 16.0
[node name="player" type="CharacterBody2D"]
position = Vector2(0, -10)
script = ExtResource("1_lm7ix")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
position = Vector2(0, 2)
sprite_frames = SubResource("SpriteFrames_l5s58")
animation = &"jump"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
position = Vector2(0, 2)
shape = SubResource("CapsuleShape2D_4sl4a")