virtualx-engine/demos/2d/space_shooter/enemy2.tscn
2016-04-02 14:39:08 +02:00

98 lines
2.9 KiB
Text

[gd_scene load_steps=8 format=1]
[ext_resource path="res://enemy2.gd" type="Script" id=1]
[ext_resource path="res://enemy2.png" type="Texture" id=2]
[ext_resource path="res://explosion.tscn" type="PackedScene" id=3]
[ext_resource path="res://sound_explode.wav" type="Sample" id=4]
[sub_resource type="ConvexPolygonShape2D" id=1]
custom_solver_bias = 0.0
points = Vector2Array( -31.9306, -11.1163, 15.748, -16.1351, 32.2383, -3.94662, 25.7856, 13.6192, -20.4591, 16.1286 )
[sub_resource type="Animation" id=2]
length = 1.0
loop = false
step = 0.1
tracks/0/type = "value"
tracks/0/path = NodePath("explosion: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.9 ), "transitions":FloatArray( 1 ), "values":[ { "args":[ ], "method":"queue_free" } ] }
[sub_resource type="SampleLibrary" id=3]
samples/sound_explode = { "db":0.0, "pitch":1.0, "sample":ExtResource( 4 ) }
[node name="enemy2" 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="collision" type="CollisionPolygon2D" parent="."]
build_mode = 0
polygon = Vector2Array( -31.9306, -11.1163, 15.748, -16.1351, 32.2383, -3.94662, 25.7856, 13.6192, -20.4591, 16.1286 )
shape_range = Vector2( -1, -1 )
trigger = false
[node name="sprite" type="Sprite" parent="."]
texture = ExtResource( 2 )
[node name="explosion" parent="." instance=ExtResource( 3 )]
transform/rot = -91.1436
config/explosiveness = 0.1
params/gravity_strength = 9.8
[node name="anim" type="AnimationPlayer" parent="."]
playback/process_mode = 1
playback/default_blend_time = 0.0
root/root = NodePath("..")
anims/explode = SubResource( 2 )
playback/active = true
playback/speed = 1.0
blend_times = [ ]
autoplay = ""
[node name="visibility" type="VisibilityNotifier2D" parent="."]
rect = Rect2( -10, -10, 20, 20 )
[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( 3 )
config/pitch_random = 0.0
[node name="shoot_from" type="Position2D" parent="."]
transform/pos = Vector2( -84.6027, 0.358482 )
[connection signal="enter_screen" from="visibility" to="." method="_on_visibility_enter_screen"]
[connection signal="exit_screen" from="visibility" to="." method="_on_visibility_exit_screen"]