diff options
author | cflip <cflip@cflip.net> | 2022-09-23 17:23:06 -0600 |
---|---|---|
committer | cflip <cflip@cflip.net> | 2022-09-23 17:23:06 -0600 |
commit | ed3b37f6fa7b37429f79a7d229e1134ae316ed7e (patch) | |
tree | e8424d06ac364327c32e18899bc7d837d042bb66 /basketball.tscn | |
parent | c46bb2fca39de21df9c4abbdc9cbbf2262e8ace0 (diff) |
Replace the basketball sprite object with a RigidBody2D
This way we don't have to implement all of the physics ourselves.
Diffstat (limited to 'basketball.tscn')
-rw-r--r-- | basketball.tscn | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/basketball.tscn b/basketball.tscn index 2c8edf4..c7203d2 100644 --- a/basketball.tscn +++ b/basketball.tscn @@ -1,10 +1,21 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=4 format=2] [ext_resource path="res://ballforbasketing.png" type="Texture" id=1] -[ext_resource path="res://Sprite.gd" type="Script" id=2] +[ext_resource path="res://Basketball.gd" type="Script" id=2] -[node name="Sprite" type="Sprite"] -position = Vector2( 114, 478 ) +[sub_resource type="CircleShape2D" id=1] +radius = 40.0 + +[node name="Basketball" type="RigidBody2D"] +position = Vector2( 71, 541 ) +script = ExtResource( 2 ) +__meta__ = { +"_edit_group_": true +} + +[node name="CollisionShape2D" type="CollisionShape2D" parent="."] +shape = SubResource( 1 ) + +[node name="Sprite" type="Sprite" parent="."] scale = Vector2( 5, 5 ) texture = ExtResource( 1 ) -script = ExtResource( 2 ) |