Player.tscn 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. [gd_scene load_steps=8 format=3 uid="uid://crjb0i1rbk4uc"]
  2. [ext_resource type="Script" path="res://Scripts/Player.gd" id="1_4wya0"]
  3. [ext_resource type="Texture2D" uid="uid://nds5sm5auoqq" path="res://Assets/Art/playerGrey_up1.png" id="1_imnpc"]
  4. [ext_resource type="Texture2D" uid="uid://cd3g16yyhsjl5" path="res://Assets/Art/playerGrey_up2.png" id="2_s3d58"]
  5. [ext_resource type="Texture2D" uid="uid://cwtobikm2wo88" path="res://Assets/Art/playerGrey_walk1.png" id="3_pj2oi"]
  6. [ext_resource type="Texture2D" uid="uid://b5bi75t4sll0q" path="res://Assets/Art/playerGrey_walk2.png" id="4_oefjy"]
  7. [sub_resource type="SpriteFrames" id="SpriteFrames_5pe4i"]
  8. animations = [{
  9. "frames": [{
  10. "duration": 1.0,
  11. "texture": ExtResource("1_imnpc")
  12. }, {
  13. "duration": 1.0,
  14. "texture": ExtResource("2_s3d58")
  15. }],
  16. "loop": true,
  17. "name": &"up",
  18. "speed": 5.0
  19. }, {
  20. "frames": [{
  21. "duration": 1.0,
  22. "texture": ExtResource("3_pj2oi")
  23. }, {
  24. "duration": 1.0,
  25. "texture": ExtResource("4_oefjy")
  26. }],
  27. "loop": true,
  28. "name": &"walk",
  29. "speed": 5.0
  30. }]
  31. [sub_resource type="CapsuleShape2D" id="CapsuleShape2D_8ityq"]
  32. radius = 27.0
  33. height = 68.0
  34. [node name="Player" type="Area2D"]
  35. script = ExtResource("1_4wya0")
  36. metadata/_edit_group_ = true
  37. [node name="Sprite" type="AnimatedSprite2D" parent="."]
  38. scale = Vector2(0.5, 0.5)
  39. sprite_frames = SubResource("SpriteFrames_5pe4i")
  40. animation = &"walk"
  41. frame_progress = 0.556076
  42. [node name="Shape" type="CollisionShape2D" parent="."]
  43. shape = SubResource("CapsuleShape2D_8ityq")
  44. [connection signal="body_entered" from="." to="." method="_on_body_entered"]