Player.tscn 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. [gd_scene load_steps=13 format=2]
  2. [ext_resource path="res://Player.gd" type="Script" id=1]
  3. [ext_resource path="res://art/playerGrey_walk1.png" type="Texture" id=2]
  4. [ext_resource path="res://art/playerGrey_walk2.png" type="Texture" id=3]
  5. [ext_resource path="res://art/playerGrey_up1.png" type="Texture" id=4]
  6. [ext_resource path="res://art/playerGrey_up2.png" type="Texture" id=5]
  7. [sub_resource type="SpriteFrames" id=1]
  8. animations = [ {
  9. "frames": [ ExtResource( 2 ), ExtResource( 3 ) ],
  10. "loop": true,
  11. "name": "right",
  12. "speed": 5.0
  13. }, {
  14. "frames": [ ExtResource( 4 ), ExtResource( 5 ) ],
  15. "loop": true,
  16. "name": "up",
  17. "speed": 5.0
  18. } ]
  19. [sub_resource type="CapsuleShape2D" id=2]
  20. custom_solver_bias = 0.0
  21. radius = 26.5155
  22. height = 13.8847
  23. [sub_resource type="Gradient" id=3]
  24. offsets = PoolRealArray( 0, 1 )
  25. colors = PoolColorArray( 1, 1, 1, 0.523804, 1, 1, 1, 0 )
  26. [sub_resource type="GradientTexture" id=4]
  27. flags = 4
  28. gradient = SubResource( 3 )
  29. width = 2048
  30. [sub_resource type="Curve" id=5]
  31. min_value = 0.0
  32. max_value = 1.0
  33. bake_resolution = 100
  34. _data = [ Vector2( 0, 0.446289 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.306641 ), 0.0, 0.0, 0, 0 ]
  35. [sub_resource type="CurveTexture" id=6]
  36. flags = 4
  37. width = 2048
  38. curve = SubResource( 5 )
  39. [sub_resource type="ParticlesMaterial" id=7]
  40. render_priority = 0
  41. trail_divisor = 1
  42. emission_shape = 0
  43. flag_align_y = false
  44. flag_rotate_y = false
  45. flag_disable_z = true
  46. spread = 45.0
  47. flatness = 0.0
  48. gravity = Vector3( 0, 0, 0 )
  49. initial_velocity = 1.0
  50. initial_velocity_random = 0.0
  51. angular_velocity = 1.56945e-43
  52. angular_velocity_random = 0.0
  53. orbit_velocity = 0.0
  54. orbit_velocity_random = 0.0
  55. linear_accel = 0.0
  56. linear_accel_random = 0.0
  57. radial_accel = 0.0
  58. radial_accel_random = 0.0
  59. tangential_accel = 0.0
  60. tangential_accel_random = 0.0
  61. damping = 0.0
  62. damping_random = 0.0
  63. angle = 0.0
  64. angle_random = 0.0
  65. scale = 1.0
  66. scale_random = 0.0
  67. scale_curve = SubResource( 6 )
  68. color_ramp = SubResource( 4 )
  69. hue_variation = 0.0
  70. hue_variation_random = 0.0
  71. anim_speed = 0.0
  72. anim_speed_random = 0.0
  73. anim_offset = 0.0
  74. anim_offset_random = 0.0
  75. anim_loop = false
  76. _sections_unfolded = [ "Color", "Gravity", "Scale" ]
  77. [node name="Player" type="Area2D"]
  78. input_pickable = true
  79. gravity_vec = Vector2( 0, 1 )
  80. gravity = 98.0
  81. linear_damp = 0.1
  82. angular_damp = 1.0
  83. audio_bus_override = false
  84. audio_bus_name = "Master"
  85. script = ExtResource( 1 )
  86. _sections_unfolded = [ "Transform" ]
  87. __meta__ = {
  88. "_edit_group_": true
  89. }
  90. SPEED = 400
  91. [node name="AnimatedSprite" type="AnimatedSprite" parent="." index="0"]
  92. scale = Vector2( 0.5, 0.5 )
  93. frames = SubResource( 1 )
  94. animation = "right"
  95. _sections_unfolded = [ "Region", "Transform", "Z" ]
  96. [node name="Collision" type="CollisionShape2D" parent="." index="1"]
  97. shape = SubResource( 2 )
  98. [node name="Trail" type="Particles2D" parent="." index="2"]
  99. show_behind_parent = true
  100. emitting = true
  101. amount = 10
  102. lifetime = 1.0
  103. one_shot = false
  104. preprocess = 0.0
  105. speed_scale = 2.0
  106. explosiveness = 0.0
  107. randomness = 0.0
  108. fixed_fps = 0
  109. fract_delta = true
  110. visibility_rect = Rect2( -100, -100, 200, 200 )
  111. local_coords = false
  112. draw_order = 0
  113. process_material = SubResource( 7 )
  114. texture = ExtResource( 4 )
  115. normal_map = null
  116. h_frames = 1
  117. v_frames = 1
  118. _sections_unfolded = [ "Drawing", "Process Material", "Textures", "Time", "Transform", "Visibility" ]
  119. [connection signal="body_entered" from="." to="." method="_on_Player_body_entered"]