godot/demos/2d/space_shooter/asteroid.tscn
2016-04-02 14:39:08 +02:00

130 lines
3.5 KiB
Plaintext

[gd_scene load_steps=9 format=1]
[ext_resource path="res://asteroid.gd" type="Script" id=1]
[ext_resource path="res://meteorite.png" type="Texture" id=2]
[ext_resource path="res://sound_explode.wav" type="Sample" id=3]
[sub_resource type="CircleShape2D" id=1]
custom_solver_bias = 0.0
radius = 22.0
[sub_resource type="Animation" id=2]
resource/name = "explode"
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("particles:config/emitting")
tracks/0/interp = 1
tracks/0/keys = { "cont":false, "times":FloatArray( 0, 0.1 ), "transitions":FloatArray( 1, 1 ), "values":[ true, false ] }
tracks/1/type = "value"
tracks/1/path = NodePath("sprite:visibility/visible")
tracks/1/interp = 1
tracks/1/keys = { "cont":false, "times":FloatArray( 0 ), "transitions":FloatArray( 1 ), "values":[ false ] }
tracks/2/type = "method"
tracks/2/path = NodePath(".")
tracks/2/interp = 1
tracks/2/keys = { "times":FloatArray( 0.7 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] }
[sub_resource type="Animation" id=3]
length = 3.0
loop = true
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("sprite:transform/rot")
tracks/0/interp = 1
tracks/0/keys = { "cont":true, "times":FloatArray( 0, 3 ), "transitions":FloatArray( 1, 1 ), "values":[ 0.0, 360.0 ] }
[sub_resource type="ColorRamp" id=4]
offsets = FloatArray( 0, 1 )
colors = ColorArray( 1, 1, 1, 1, 1, 1, 1, 0 )
[sub_resource type="SampleLibrary" id=5]
samples/sound_explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 3 ) }
[node name="asteroid" type="Area2D"]
input/pickable = true
shapes/0/shape = SubResource( 1 )
shapes/0/transform = Matrix32( 1, 0, 0, 1, 0, 0 )
shapes/0/trigger = false
gravity_vec = Vector2( 0, 1 )
gravity = 98.0
linear_damp = 0.1
angular_damp = 1.0
script/script = ExtResource( 1 )
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
[node name="anim" type="AnimationPlayer" parent="."]
playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/explode = SubResource( 2 )
anims/spin = SubResource( 3 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = ""
[node name="collision" type="CollisionShape2D" parent="."]
shape = SubResource( 1 )
trigger = false
_update_shape_index = -1
[node name="visibility" type="VisibilityNotifier2D" parent="."]
rect = Rect2( -10, -10, 20, 20 )
[node name="particles" type="Particles2D" parent="."]
config/amount = 32
config/lifetime = 0.5
config/emitting = false
config/half_extents = Vector2( 20, 20 )
config/explosiveness = 0.1
config/texture = ExtResource( 2 )
params/direction = 0.0
params/spread = 180.0
params/linear_velocity = 200.0
params/spin_velocity = 0.0
params/orbit_velocity = 0.0
params/gravity_direction = 0.0
params/gravity_strength = 9.8
params/radial_accel = 0.0
params/tangential_accel = 0.0
params/damping = 0.0
params/initial_angle = 0.0
params/initial_size = 0.5
params/final_size = 0.2
params/hue_variation = 0.0
params/anim_speed_scale = 1.0
params/anim_initial_pos = 0.0
color/color_ramp = SubResource( 4 )
[node name="sfx" type="SamplePlayer2D" parent="."]
params/volume_db = 0.0
params/pitch_scale = 1.0
params/attenuation/min_distance = 1.0
params/attenuation/max_distance = 2048.0
params/attenuation/distance_exp = 1.0
config/polyphony = 1
config/samples = SubResource( 5 )
config/pitch_random = 0.0
[connection signal="enter_screen" from="visibility" to="." method="_on_visibility_enter_screen"]
[connection signal="exit_screen" from="visibility" to="." method="_on_visibility_exit_screen"]