player.tscn 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. [gd_scene load_steps=13 format=3 uid="uid://4vwrqjegqwpj"]
  2. [ext_resource type="Script" path="res://player.gd" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://ftkxr8r4qghp" path="res://art/playerGrey_walk1.png" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://couyhcegeihme" path="res://art/playerGrey_walk2.png" id="3"]
  5. [ext_resource type="Texture2D" uid="uid://b4yyoafu8bi0q" path="res://art/playerGrey_up1.png" id="4"]
  6. [ext_resource type="Texture2D" uid="uid://bko65a0nd66st" path="res://art/playerGrey_up2.png" id="5"]
  7. [sub_resource type="SpriteFrames" id="1"]
  8. animations = [{
  9. "frames": [{
  10. "duration": 1.0,
  11. "texture": ExtResource("2")
  12. }, {
  13. "duration": 1.0,
  14. "texture": ExtResource("3")
  15. }],
  16. "loop": true,
  17. "name": &"right",
  18. "speed": 5.0
  19. }, {
  20. "frames": [{
  21. "duration": 1.0,
  22. "texture": ExtResource("4")
  23. }, {
  24. "duration": 1.0,
  25. "texture": ExtResource("5")
  26. }],
  27. "loop": true,
  28. "name": &"up",
  29. "speed": 5.0
  30. }]
  31. [sub_resource type="CapsuleShape2D" id="2"]
  32. radius = 27.0
  33. height = 68.0
  34. [sub_resource type="Gradient" id="3"]
  35. colors = PackedColorArray(1, 1, 1, 0.501961, 1, 1, 1, 0)
  36. [sub_resource type="GradientTexture1D" id="4"]
  37. gradient = SubResource("3")
  38. [sub_resource type="Curve" id="5"]
  39. _data = [Vector2(0.00501098, 0.5), 0.0, 0.0, 0, 0, Vector2(0.994989, 0.324), 0.0, 0.0, 0, 0]
  40. point_count = 2
  41. [sub_resource type="CurveTexture" id="6"]
  42. curve = SubResource("5")
  43. [sub_resource type="ParticleProcessMaterial" id="7"]
  44. gravity = Vector3(0, 0, 0)
  45. scale_curve = SubResource("6")
  46. color_ramp = SubResource("4")
  47. [node name="Player" type="Area2D"]
  48. z_index = 10
  49. script = ExtResource("1")
  50. [node name="AnimatedSprite2D" type="AnimatedSprite2D" parent="."]
  51. scale = Vector2(0.5, 0.5)
  52. sprite_frames = SubResource("1")
  53. animation = &"right"
  54. [node name="CollisionShape2D" type="CollisionShape2D" parent="."]
  55. shape = SubResource("2")
  56. [node name="Trail" type="GPUParticles2D" parent="."]
  57. z_index = -1
  58. amount = 10
  59. process_material = SubResource("7")
  60. texture = ExtResource("2")
  61. speed_scale = 2.0
  62. [connection signal="body_entered" from="." to="." method="_on_body_entered"]