Wheel.tscn 983 B

123456789101112131415161718192021222324252627282930313233
  1. [gd_scene load_steps=5 format=2]
  2. [ext_resource path="res://component/entity/wheel/BikeWheel.png" type="Texture" id=1]
  3. [ext_resource path="res://component/entity/wheel/Wheel.gd" type="Script" id=2]
  4. [sub_resource type="PhysicsMaterial" id=2]
  5. rough = true
  6. bounce = 0.9
  7. [sub_resource type="CircleShape2D" id=1]
  8. radius = 33.1812
  9. [node name="Wheel" type="RigidBody2D" groups=["wheel"]]
  10. collision_mask = 3
  11. mass = 0.5
  12. physics_material_override = SubResource( 2 )
  13. angular_damp = 0.0
  14. script = ExtResource( 2 )
  15. min_linear_speed = 200
  16. max_linear_speed = 325
  17. max_angular_speed = 18.85
  18. [node name="Shape" type="CollisionShape2D" parent="."]
  19. shape = SubResource( 1 )
  20. [node name="Sprite" type="Sprite" parent="."]
  21. scale = Vector2( 2, 2 )
  22. texture = ExtResource( 1 )
  23. [node name="VisibilityNotifier2D" type="VisibilityNotifier2D" parent="."]
  24. rect = Rect2( -32, -32, 64, 64 )
  25. [connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]