godot-docs/scenes/player.tscn

51 lines
1.5 KiB
Text
Raw Permalink Normal View History

2024-10-02 11:55:44 +02:00
[gd_scene load_steps=8 format=3 uid="uid://wo6auqcr0yy6"]
[ext_resource type="Texture2D" uid="uid://d0kmi60p357tt" path="res://assets/img/playerGrey_up1.png" id="1_0wenw"]
[ext_resource type="Script" path="res://scripts/player.gd" id="1_ols1d"]
[ext_resource type="Texture2D" uid="uid://dd5exrt8dhhjk" path="res://assets/img/playerGrey_up2.png" id="2_yxlb6"]
[ext_resource type="Texture2D" uid="uid://biap3qok1ijvk" path="res://assets/img/playerGrey_walk1.png" id="3_13gqe"]
[ext_resource type="Texture2D" uid="uid://dd5xv0s0mj36s" path="res://assets/img/playerGrey_walk2.png" id="4_45c2b"]
[sub_resource type="SpriteFrames" id="SpriteFrames_lqq30"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_0wenw")
}, {
"duration": 1.0,
"texture": ExtResource("2_yxlb6")
}],
"loop": true,
"name": &"up",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_13gqe")
}, {
"duration": 1.0,
"texture": ExtResource("4_45c2b")
}],
"loop": true,
"name": &"walk",
"speed": 5.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_wca1h"]
radius = 27.0
height = 68.0
[node name="Player" type="Area2D"]
script = ExtResource("1_ols1d")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.5, 0.5)
sprite_frames = SubResource("SpriteFrames_lqq30")
animation = &"up"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_wca1h")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]