Player.tscn 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. [gd_scene load_steps=11 format=4 uid="uid://u1nbrhmt1vqu"]
  2. [ext_resource type="Script" path="res://Player.cs" id="1"]
  3. [ext_resource type="Texture2D" uid="uid://bevol1mted15l" path="res://art/playerGrey_walk1.png" id="2"]
  4. [ext_resource type="Texture2D" uid="uid://0sl7rvmm0hy8" path="res://art/playerGrey_walk2.png" id="3"]
  5. [ext_resource type="Texture2D" uid="uid://ddykfjshfswbs" path="res://art/playerGrey_up1.png" id="4"]
  6. [ext_resource type="Texture2D" uid="uid://03fwq5c2p4k3" 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, 0.5), 0.0, 0.0, 0, 0, Vector2(1, 0.333333), 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. show_behind_parent = true
  58. z_index = -1
  59. amount = 10
  60. process_material = SubResource("7")
  61. texture = ExtResource("2")
  62. speed_scale = 2.0
  63. [connection signal="body_entered" from="." to="." method="OnBodyEntered"]