Ball.tscn 929 B

1234567891011121314151617181920212223242526
  1. [gd_scene load_steps=5 format=3 uid="uid://82mseyru28tc"]
  2. [ext_resource type="Texture2D" uid="uid://bfhetobgi7o6j" path="res://slides/204/physics_demo/firefox-logo.png" id="1"]
  3. [ext_resource type="Script" uid="uid://ccwphojv6ic0" path="res://slides/204/physics_demo/Ball.gd" id="2"]
  4. [sub_resource type="PhysicsMaterial" id="2"]
  5. friction = 0.61
  6. bounce = 0.26
  7. [sub_resource type="CircleShape2D" id="1"]
  8. radius = 32.0
  9. [node name="Ball" type="RigidBody2D"]
  10. physics_material_override = SubResource("2")
  11. script = ExtResource("2")
  12. [node name="FirefoxSprite" type="Sprite2D" parent="."]
  13. scale = Vector2(0.512, 0.512)
  14. texture = ExtResource("1")
  15. [node name="RoundFixture" type="CollisionShape2D" parent="."]
  16. shape = SubResource("1")
  17. [node name="VisibilityNotifier2D" type="VisibleOnScreenNotifier2D" parent="."]
  18. [connection signal="screen_exited" from="VisibilityNotifier2D" to="." method="_on_VisibilityNotifier2D_screen_exited"]