godot-first-2d-game/player.tscn

51 lines
1.5 KiB
Plaintext

[gd_scene load_steps=8 format=3 uid="uid://8jqt5klugv5b"]
[ext_resource type="Texture2D" uid="uid://n5dd7i26k7ap" path="res://art/playerGrey_up1.png" id="1_an4l2"]
[ext_resource type="Script" path="res://player.gd" id="1_tyfii"]
[ext_resource type="Texture2D" uid="uid://ghkfrqu3bs05" path="res://art/playerGrey_up2.png" id="2_wryyq"]
[ext_resource type="Texture2D" uid="uid://berd8c2m0u7fe" path="res://art/playerGrey_walk1.png" id="3_f1e80"]
[ext_resource type="Texture2D" uid="uid://diw4hn8vv8vaw" path="res://art/playerGrey_walk2.png" id="4_cjaqb"]
[sub_resource type="SpriteFrames" id="SpriteFrames_cfdt6"]
animations = [{
"frames": [{
"duration": 1.0,
"texture": ExtResource("1_an4l2")
}, {
"duration": 1.0,
"texture": ExtResource("2_wryyq")
}],
"loop": true,
"name": &"up",
"speed": 5.0
}, {
"frames": [{
"duration": 1.0,
"texture": ExtResource("3_f1e80")
}, {
"duration": 1.0,
"texture": ExtResource("4_cjaqb")
}],
"loop": true,
"name": &"walk",
"speed": 5.0
}]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_hn6ot"]
radius = 27.0
height = 68.0
[node name="Player" type="Area2D"]
script = ExtResource("1_tyfii")
metadata/_edit_group_ = true
[node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
scale = Vector2(0.5, 0.5)
sprite_frames = SubResource("SpriteFrames_cfdt6")
animation = &"walk"
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_hn6ot")
[connection signal="body_entered" from="." to="." method="_on_body_entered"]