Ball.tscn 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. [gd_scene load_steps=6 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://effect/particle/trail/Trail.tscn" type="PackedScene" 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. [node name="Ball" type="RigidBody2D" groups=[
  11. "ball",
  12. ]]
  13. collision_mask = 14
  14. mode = 2
  15. physics_material_override = SubResource( 1 )
  16. gravity_scale = 0.0
  17. continuous_cd = 2
  18. contacts_reported = 2
  19. contact_monitor = true
  20. linear_velocity = Vector2( 100, 100 )
  21. linear_damp = 0.0
  22. script = ExtResource( 1 )
  23. interrupt_color = Color( 0.705882, 0.705882, 0.705882, 1 )
  24. [node name="Circle" type="CollisionShape2D" parent="."]
  25. shape = SubResource( 2 )
  26. [node name="Sprite" type="Sprite" parent="."]
  27. texture = ExtResource( 2 )
  28. [node name="Trail" parent="." instance=ExtResource( 3 )]
  29. [connection signal="body_entered" from="." to="." method="_on_Ball_body_entered"]
  30. [connection signal="body_exited" from="." to="." method="_on_Ball_body_exited"]