Ball.tscn 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. [gd_scene load_steps=9 format=2]
  2. [ext_resource path="res://component/entity/ball/Ball.gd" type="Script" id=1]
  3. [ext_resource path="res://component/entity/ball/ball.png" type="Texture" id=2]
  4. [ext_resource path="res://component/entity/ball/ball_particle.png" type="Texture" id=3]
  5. [sub_resource type="PhysicsMaterial" id=1]
  6. friction = 0.0
  7. bounce = 1.0
  8. [sub_resource type="CircleShape2D" id=2]
  9. radius = 5.0
  10. [sub_resource type="Curve" id=3]
  11. _data = [ Vector2( 0, 1 ), 0.0, 0.0, 0, 0, Vector2( 1, 0.290909 ), 0.0, 0.0, 0, 0 ]
  12. [sub_resource type="CurveTexture" id=4]
  13. curve = SubResource( 3 )
  14. [sub_resource type="ParticlesMaterial" id=5]
  15. flag_disable_z = true
  16. spread = 0.0
  17. gravity = Vector3( 0, 0, 0 )
  18. angular_velocity = 45.0
  19. angular_velocity_random = 1.0
  20. orbit_velocity = 0.0
  21. orbit_velocity_random = 0.0
  22. angle = 180.0
  23. angle_random = 1.0
  24. scale = 0.5
  25. scale_random = 0.5
  26. scale_curve = SubResource( 4 )
  27. [node name="Ball" type="RigidBody2D" groups=[
  28. "ball",
  29. ]]
  30. collision_mask = 14
  31. mode = 2
  32. physics_material_override = SubResource( 1 )
  33. gravity_scale = 0.0
  34. continuous_cd = 2
  35. contacts_reported = 2
  36. contact_monitor = true
  37. linear_velocity = Vector2( 100, 100 )
  38. linear_damp = 0.0
  39. script = ExtResource( 1 )
  40. interrupt_color = Color( 0.705882, 0.705882, 0.705882, 1 )
  41. [node name="Circle" type="CollisionShape2D" parent="."]
  42. shape = SubResource( 2 )
  43. [node name="Sprite" type="Sprite" parent="."]
  44. texture = ExtResource( 2 )
  45. [node name="Trail" type="Particles2D" parent="."]
  46. lifetime = 0.1
  47. local_coords = false
  48. process_material = SubResource( 5 )
  49. texture = ExtResource( 3 )
  50. [connection signal="body_exited" from="." to="." method="_on_Ball_body_exited"]