-
Notifications
You must be signed in to change notification settings - Fork 1
/
Ball.tscn
148 lines (109 loc) · 3.14 KB
/
Ball.tscn
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
[gd_scene load_steps=9 format=2]
[ext_resource path="res://BallArea.gd" type="Script" id=1]
[ext_resource path="res://Sounds/goal.ogg" type="AudioStream" id=2]
[ext_resource path="res://ball.png" type="Texture" id=3]
[sub_resource type="GDScript" id=1]
script/source = "extends RigidBody2D
#func _physics_process(delta):
#func _on_Ball_area_entered(area):
###$BallArea.goal = true
#pass # replace with function body
"
[sub_resource type="CircleShape2D" id=2]
custom_solver_bias = 0.0
radius = 33.6122
[sub_resource type="CircleShape2D" id=3]
custom_solver_bias = 0.0
radius = 37.0115
[sub_resource type="Animation" id=4]
resource_name = "success"
length = 4.0
loop = false
step = 0.1
tracks/0/type = "method"
tracks/0/path = NodePath(".")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 4 ),
"transitions": PoolRealArray( 1, 1 ),
"values": [ {
"args": [ ],
"method": "play"
}, {
"args": [ ],
"method": "stop"
} ]
}
[sub_resource type="OccluderPolygon2D" id=5]
closed = true
cull_mode = 0
polygon = PoolVector2Array( )
[node name="Ball" type="RigidBody2D"]
input_pickable = false
collision_layer = 1
collision_mask = 1
mode = 2
mass = 3.0
friction = 0.2
bounce = 0.4
gravity_scale = 1.5
custom_integrator = false
continuous_cd = 0
contacts_reported = 0
contact_monitor = false
sleeping = false
can_sleep = true
linear_velocity = Vector2( 0, 0 )
linear_damp = -1.0
angular_velocity = 0.0
angular_damp = -1.0
script = SubResource( 1 )
[node name="CollisionShape2D" type="CollisionShape2D" parent="." index="0"]
position = Vector2( -17.8609, -17.3395 )
scale = Vector2( 0.500724, 0.500671 )
shape = SubResource( 2 )
_sections_unfolded = [ "Transform" ]
[node name="BallArea" type="Area2D" parent="." index="1" groups=[
"ball",
]]
position = Vector2( -18.1623, -17.0688 )
scale = Vector2( 0.432427, 0.4465 )
input_pickable = true
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
audio_bus_override = false
audio_bus_name = "Master"
script = ExtResource( 1 )
[node name="CollisionShape2D2" type="CollisionShape2D" parent="BallArea" index="0"]
shape = SubResource( 3 )
[node name="goal" type="AudioStreamPlayer" parent="BallArea" index="1"]
stream = ExtResource( 2 )
volume_db = 0.0
autoplay = false
mix_target = 0
bus = "Master"
[node name="anim" type="AnimationPlayer" parent="BallArea/goal" index="0"]
root_node = NodePath("..")
autoplay = ""
playback_process_mode = 1
playback_default_blend_time = 0.0
playback_speed = 1.0
anims/success = SubResource( 4 )
blend_times = [ ]
_sections_unfolded = [ "Playback Options" ]
[node name="Sprite" type="Sprite" parent="." index="2"]
position = Vector2( -17.7726, -17.6108 )
scale = Vector2( 0.492212, 0.496835 )
texture = ExtResource( 3 )
[node name="LightOccluder2D" type="LightOccluder2D" parent="." index="3"]
position = Vector2( -16, -15 )
scale = Vector2( 0.5, 0.46875 )
occluder = SubResource( 5 )
light_mask = 1
[connection signal="body_entered" from="." to="." method="_on_Ball_body_entered"]
[connection signal="area_entered" from="BallArea" to="BallArea" method="_on_BallArea_area_entered"]