GodotTutorial/player.tscn

71 lines
1.8 KiB
Plaintext

[gd_scene load_steps=10 format=3 uid="uid://c5njgaps6d3vn"]
[ext_resource type="Texture2D" uid="uid://bbaks8lekbw53" path="res://sprites/bazzabogan.png" id="1_6kthl"]
[ext_resource type="Script" path="res://player.gd" id="1_y8jpy"]
[sub_resource type="AtlasTexture" id="AtlasTexture_l3wuf"]
atlas = ExtResource("1_6kthl")
region = Rect2(0, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_nm0eg"]
atlas = ExtResource("1_6kthl")
region = Rect2(128, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_uadt3"]
atlas = ExtResource("1_6kthl")
region = Rect2(32, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_ewher"]
atlas = ExtResource("1_6kthl")
region = Rect2(64, 0, 32, 32)
[sub_resource type="AtlasTexture" id="AtlasTexture_gctgy"]
atlas = ExtResource("1_6kthl")
region = Rect2(96, 0, 32, 32)
[sub_resource type="SpriteFrames" id="SpriteFrames_bl6kg"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_l3wuf")
}],
"loop": true,
"name": &"idle",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_nm0eg")
}],
"loop": true,
"name": &"jump",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": SubResource("AtlasTexture_uadt3")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_ewher")
}, {
"duration": 1.0,
"texture": SubResource("AtlasTexture_gctgy")
}],
"loop": true,
"name": &"run",
"speed": 12.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_vmep3"]
height = 32.0
[node name="player" type="CharacterBody2D"]
script = ExtResource("1_y8jpy")
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
sprite_frames = SubResource("SpriteFrames_bl6kg")
animation = &"run"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_vmep3")