diff options
Diffstat (limited to 'scenes')
-rw-r--r-- | scenes/basketball.tscn | 25 | ||||
-rw-r--r-- | scenes/hoop.tscn | 31 | ||||
-rw-r--r-- | scenes/level.tscn | 30 |
3 files changed, 86 insertions, 0 deletions
diff --git a/scenes/basketball.tscn b/scenes/basketball.tscn new file mode 100644 index 0000000..457da83 --- /dev/null +++ b/scenes/basketball.tscn @@ -0,0 +1,25 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://textures/basketball.png" type="Texture" id=1] +[ext_resource path="res://scripts/basketball.gd" type="Script" id=2] + +[sub_resource type="PhysicsMaterial" id=2] +bounce = 0.5 + +[sub_resource type="CircleShape2D" id=1] +radius = 40.0 + +[node name="Basketball" type="RigidBody2D"] +position = Vector2( 71, 541 ) +physics_material_override = SubResource( 2 ) +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 ) diff --git a/scenes/hoop.tscn b/scenes/hoop.tscn new file mode 100644 index 0000000..eee6bc2 --- /dev/null +++ b/scenes/hoop.tscn @@ -0,0 +1,31 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://textures/hoop_fore.png" type="Texture" id=1] +[ext_resource path="res://textures/hoop_back.png" type="Texture" id=2] + +[sub_resource type="SegmentShape2D" id=1] +a = Vector2( 3.8, -24.8 ) +b = Vector2( -1, 12.4 ) + +[sub_resource type="SegmentShape2D" id=2] +a = Vector2( 1.8, 0 ) +b = Vector2( -1.4, 9.6 ) + +[node name="Hoop" type="StaticBody2D"] +scale = Vector2( 5, 5 ) + +[node name="BackgroundSprite" type="Sprite" parent="."] +light_mask = 4 +texture = ExtResource( 2 ) + +[node name="ForegroundSprite" type="Sprite" parent="."] +position = Vector2( -12, 16 ) +texture = ExtResource( 1 ) + +[node name="RightCollider" type="CollisionShape2D" parent="."] +position = Vector2( 1.6, 1 ) +shape = SubResource( 1 ) + +[node name="LeftCollider" type="CollisionShape2D" parent="."] +position = Vector2( -22, 1 ) +shape = SubResource( 2 ) diff --git a/scenes/level.tscn b/scenes/level.tscn new file mode 100644 index 0000000..0b7b9e3 --- /dev/null +++ b/scenes/level.tscn @@ -0,0 +1,30 @@ +[gd_scene load_steps=5 format=2] + +[ext_resource path="res://icon.png" type="Texture" id=1] +[ext_resource path="res://scenes/hoop.tscn" type="PackedScene" id=2] +[ext_resource path="res://scenes/basketball.tscn" type="PackedScene" id=3] + +[sub_resource type="RectangleShape2D" id=1] +extents = Vector2( 512, 10 ) + +[node name="Node2D" type="Node2D"] + +[node name="Hoop" parent="." instance=ExtResource( 2 )] +position = Vector2( 721, 409 ) + +[node name="Basketball" parent="." instance=ExtResource( 3 )] +position = Vector2( 71, 536 ) + +[node name="StaticBody2D" type="StaticBody2D" parent="."] +position = Vector2( 512, 590 ) +__meta__ = { +"_edit_group_": true +} + +[node name="Sprite" type="Sprite" parent="StaticBody2D"] +position = Vector2( -3.05176e-05, 2.52724e-05 ) +scale = Vector2( 16, 0.3125 ) +texture = ExtResource( 1 ) + +[node name="CollisionShape2D" type="CollisionShape2D" parent="StaticBody2D"] +shape = SubResource( 1 ) |