Ball.tscn 679 B

12345678910111213141516171819202122232425262728
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://image/ball.png" type="Texture" id=1]
  3. [ext_resource path="res://scripts/Ball.gd" type="Script" id=2]
  4. [sub_resource type="PhysicsMaterial" id=1]
  5. friction = 0.0
  6. bounce = 1.0
  7. [sub_resource type="CircleShape2D" id=2]
  8. radius = 5.0
  9. [node name="Ball" type="RigidBody2D" groups=[
  10. "ball",
  11. ]]
  12. mode = 2
  13. physics_material_override = SubResource( 1 )
  14. gravity_scale = 0.0
  15. contacts_reported = 1
  16. linear_velocity = Vector2( 100, 100 )
  17. linear_damp = 0.0
  18. script = ExtResource( 2 )
  19. [node name="Circle" type="CollisionShape2D" parent="."]
  20. shape = SubResource( 2 )
  21. [node name="Sprite" type="Sprite" parent="."]
  22. texture = ExtResource( 1 )