pegchamp/Ball/Ball.tscn
2021-09-08 11:41:09 +02:00

64 lines
1.8 KiB
Text

[gd_scene load_steps=6 format=2]
[ext_resource path="res://Ball/sprite.png" type="Texture" id=1]
[ext_resource path="res://Ball/Ball.gd" type="Script" id=2]
[ext_resource path="res://Ball/Ball.tres" type="PhysicsMaterial" id=3]
[ext_resource path="res://Ball/BallCollision.tscn" type="PackedScene" id=4]
[sub_resource type="Animation" id=1]
resource_name = "reset"
length = 1.5
step = 0.05
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( 1.5 ),
"transitions": PoolRealArray( 1 ),
"values": [ {
"args": [ ],
"method": "reset_done"
} ]
}
tracks/1/type = "bezier"
tracks/1/path = NodePath("Sprite:position:y")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"points": PoolRealArray( -10, -0.25, 0, 0.25, 0, 0, -0.25, 0, 0.25, 0 ),
"times": PoolRealArray( 0, 1.5 )
}
[node name="Ball" type="RigidBody2D"]
collision_layer = 4
collision_mask = 5
mass = 90.0
physics_material_override = ExtResource( 3 )
continuous_cd = 2
contacts_reported = 4
contact_monitor = true
linear_velocity = Vector2( 0, -10 )
script = ExtResource( 2 )
[node name="CameraTransform" type="RemoteTransform2D" parent="."]
remote_path = NodePath("../../../Camera2D")
[node name="Sprite" type="Sprite" parent="."]
position = Vector2( 0, -10 )
texture = ExtResource( 1 )
[node name="BallCollision" parent="." instance=ExtResource( 4 )]
visible = true
[node name="TrajectoryTimer" type="Timer" parent="."]
wait_time = 0.1
[node name="AnimationPlayer" type="AnimationPlayer" parent="."]
anims/reset = SubResource( 1 )
[connection signal="timeout" from="TrajectoryTimer" to="." method="_on_TrajectoryTimer_timeout"]