TETRIS3000/source/Main.tscn
2019-01-29 11:11:05 +01:00

286 lines
9.1 KiB
Plaintext

[gd_scene load_steps=22 format=2]
[ext_resource path="res://Environment.tres" type="Environment" id=1]
[ext_resource path="res://Main.gd" type="Script" id=2]
[ext_resource path="res://aperture-vintage-472251-unsplash.jpg" type="Texture" id=3]
[ext_resource path="res://Tetrominos/Mino/MinoLibrary.tres" type="MeshLibrary" id=4]
[ext_resource path="res://GridMap.gd" type="Script" id=5]
[ext_resource path="res://Tetrominos/Mino/drop_trail.png" type="Texture" id=6]
[ext_resource path="res://midi/MidiPlayer.tscn" type="PackedScene" id=7]
[ext_resource path="res://MidiPlayer.gd" type="Script" id=8]
[ext_resource path="res://FlashText.gd" type="Script" id=9]
[ext_resource path="res://fonts/525-ROUN.TTF" type="DynamicFontData" id=10]
[ext_resource path="res://Stats.tscn" type="PackedScene" id=11]
[ext_resource path="res://controls.tscn" type="PackedScene" id=12]
[ext_resource path="res://Start.tscn" type="PackedScene" id=13]
[ext_resource path="res://fonts/Gamer.ttf" type="DynamicFontData" id=14]
[ext_resource path="res://Tetrominos/Ghost.tscn" type="PackedScene" id=15]
[sub_resource type="SpatialMaterial" id=1]
flags_transparent = true
params_blend_mode = 1
albedo_color = Color( 0.601563, 0.775878, 1, 0.00784314 )
metallic_specular = 0.0
roughness = 0.46
proximity_fade_enable = true
proximity_fade_distance = 1.0
[sub_resource type="CubeMesh" id=2]
material = SubResource( 1 )
size = Vector3( 1, 1, 1 )
[sub_resource type="CubeMesh" id=3]
material = SubResource( 1 )
size = Vector3( 1, 1, 1 )
[sub_resource type="DynamicFont" id=4]
size = 50
font_data = ExtResource( 10 )
[sub_resource type="Animation" id=5]
resource_name = "Flash"
tracks/0/type = "value"
tracks/0/path = NodePath("Label:custom_fonts/font:size")
tracks/0/interp = 1
tracks/0/loop_wrap = true
tracks/0/imported = false
tracks/0/enabled = true
tracks/0/keys = {
"times": PoolRealArray( 0, 0.1, 0.9, 1 ),
"transitions": PoolRealArray( 1, 0, 1, 1 ),
"update": 0,
"values": [ 30, 30, 30, 50 ]
}
tracks/1/type = "value"
tracks/1/path = NodePath("Label:custom_colors/font_color")
tracks/1/interp = 1
tracks/1/loop_wrap = true
tracks/1/imported = false
tracks/1/enabled = true
tracks/1/keys = {
"times": PoolRealArray( 0, 0.1, 0.9, 1 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Color( 0.445404, 0.710476, 0.820313, 0 ), Color( 0.445404, 0.710476, 0.820313, 0.533765 ), Color( 0.445404, 0.710476, 0.820313, 0.533765 ), Color( 0.445404, 0.710476, 0.820313, 0 ) ]
}
tracks/2/type = "value"
tracks/2/path = NodePath("Label:rect_position")
tracks/2/interp = 1
tracks/2/loop_wrap = true
tracks/2/imported = false
tracks/2/enabled = true
tracks/2/keys = {
"times": PoolRealArray( 0, 0.1, 0.9, 1 ),
"transitions": PoolRealArray( 1, 1, 1, 1 ),
"update": 0,
"values": [ Vector2( 0, 110 ), Vector2( 0, -50 ), Vector2( 0, -60 ), Vector2( 0, -100 ) ]
}
[sub_resource type="DynamicFont" id=6]
size = 20
extra_spacing_bottom = 5
font_data = ExtResource( 14 )
[node name="Main" type="WorldEnvironment"]
environment = ExtResource( 1 )
script = ExtResource( 2 )
[node name="Background" type="Sprite3D" parent="."]
transform = Transform( 12.8, 0, 0, 0, 8.53, 0, 0, 0, 1, 4.5, 28.8, -34 )
modulate = Color( 0.334808, 0.343253, 0.359375, 0 )
transparent = false
double_sided = false
texture = ExtResource( 3 )
[node name="Camera" type="Camera" parent="."]
transform = Transform( 1, 0, 0, 0, 0.939693, -0.34202, 0, 0.34202, 0.939693, 4.5, 2, 19 )
current = true
fov = 60.3
far = 500.0
[node name="DirectionalLight" type="DirectionalLight" parent="."]
transform = Transform( 0.332668, 0.771982, -0.541642, 0.579657, 0.285656, 0.763151, 0.743861, -0.567843, -0.352456, 5, 30, 0 )
light_energy = 3.0
[node name="Matrix" type="MeshInstance" parent="."]
transform = Transform( 10, 0, 0, 0, 20, 0, 0, 0, 1, 4.5, 9.5, 0 )
visible = false
mesh = SubResource( 2 )
material/0 = null
[node name="GridMap" type="GridMap" parent="Matrix"]
transform = Transform( 0.1, 0, 0, 0, 0.05, 0, 0, 0, 1, -0.45, -0.475, 0 )
mesh_library = ExtResource( 4 )
cell_size = Vector3( 1, 1, 1 )
cell_center_x = false
cell_center_y = false
cell_center_z = false
data = {
"cells": PoolIntArray( )
}
script = ExtResource( 5 )
__meta__ = {
"_editor_clip_": 1,
"_editor_floor_": Vector3( 0, -2, 0 )
}
[node name="Position3D" type="Position3D" parent="Matrix"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 5, 20, 0 )
[node name="DropTrail" type="Spatial" parent="Matrix"]
editor/display_folded = true
transform = Transform( 0.1, 0, 0, 0, 0.05, 0, 0, 0, 1, -0.45, -0.475, 0 )
visible = false
[node name="0" type="Spatial" parent="Matrix/DropTrail"]
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/0"]
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
opacity = 0.1
texture = ExtResource( 6 )
[node name="1" type="Spatial" parent="Matrix/DropTrail"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -1, 0, 0 )
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/1"]
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
opacity = 0.1
texture = ExtResource( 6 )
[node name="2" type="Spatial" parent="Matrix/DropTrail"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 1, 0, 0 )
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/2"]
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
opacity = 0.1
texture = ExtResource( 6 )
[node name="3" type="Spatial" parent="Matrix/DropTrail"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 )
[node name="Sprite" type="Sprite3D" parent="Matrix/DropTrail/3"]
transform = Transform( 1.5, 0, 0, 0, 5, 0, 0, 0, 1, 0, 8, 0 )
opacity = 0.1
texture = ExtResource( 6 )
[node name="Delay" type="Timer" parent="Matrix/DropTrail"]
wait_time = 0.06
one_shot = true
[node name="Hold" type="MeshInstance" parent="."]
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 1, -5, 16, 0 )
visible = false
mesh = SubResource( 3 )
material/0 = null
[node name="Position3D" type="Position3D" parent="Hold"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, -5, 16, 0 )
[node name="Next" type="MeshInstance" parent="."]
transform = Transform( 7, 0, 0, 0, 7, 0, 0, 0, 1, 14, 16, 0 )
visible = false
mesh = SubResource( 3 )
material/0 = null
[node name="Position3D" type="Position3D" parent="Next"]
transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 13, 16, 0 )
[node name="DropTimer" type="Timer" parent="."]
[node name="LockDelay" type="Timer" parent="."]
wait_time = 0.5
one_shot = true
[node name="AutoShiftDelay" type="Timer" parent="."]
wait_time = 0.2
one_shot = true
[node name="AutoShiftTimer" type="Timer" parent="."]
wait_time = 0.03
[node name="MidiPlayer" parent="." instance=ExtResource( 7 )]
editor/display_folded = true
script = ExtResource( 8 )
file = "res://midi/music-a-dance-remix-.mid"
volume_db = -24
loop = true
soundfont = "res://midi/TimGM6mb.sf2"
[node name="LineCLearTimer" type="Timer" parent="MidiPlayer"]
wait_time = 1.41
one_shot = true
[node name="FlashText" type="Control" parent="."]
anchor_left = 0.5
anchor_top = 0.5
anchor_right = 0.5
anchor_bottom = 0.5
margin_left = -250.0
margin_top = -300.0
margin_right = 250.0
margin_bottom = 200.0
script = ExtResource( 9 )
[node name="Label" type="Label" parent="FlashText"]
margin_top = -100.0
margin_right = 500.0
margin_bottom = 400.0
custom_fonts/font = SubResource( 4 )
custom_colors/font_color = Color( 0.445404, 0.710476, 0.820313, 0 )
align = 1
valign = 1
[node name="AnimationPlayer" type="AnimationPlayer" parent="FlashText"]
anims/Flash = SubResource( 5 )
[node name="Stats" parent="." instance=ExtResource( 11 )]
visible = false
anchor_left = 0.0
anchor_top = 1.0
anchor_right = 0.0
anchor_bottom = 1.0
margin_left = 30.0
margin_top = -220.0
margin_right = 140.0
margin_bottom = -25.0
[node name="controls_ui" parent="." instance=ExtResource( 12 )]
visible = false
[node name="Start" parent="." instance=ExtResource( 13 )]
[node name="ReplayButton" type="Button" parent="."]
visible = false
anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
margin_left = -170.0
margin_top = -90.0
margin_right = -45.0
margin_bottom = -50.0
custom_fonts/font = SubResource( 6 )
custom_colors/font_color = Color( 1, 1, 1, 1 )
text = "play again"
[node name="Ghost" parent="." instance=ExtResource( 15 )]
visible = false
[connection signal="timeout" from="Matrix/DropTrail/Delay" to="." method="_on_DropTrailDelay_timeout"]
[connection signal="timeout" from="DropTimer" to="." method="_on_DropTimer_timeout"]
[connection signal="timeout" from="LockDelay" to="." method="_on_LockDelay_timeout"]
[connection signal="timeout" from="AutoShiftDelay" to="." method="_on_AutoShiftDelay_timeout"]
[connection signal="timeout" from="AutoShiftTimer" to="." method="_on_AutoShiftTimer_timeout"]
[connection signal="timeout" from="MidiPlayer/LineCLearTimer" to="MidiPlayer" method="_on_LineCLearTimer_timeout"]
[connection signal="animation_finished" from="FlashText/AnimationPlayer" to="FlashText" method="_on_AnimationPlayer_animation_finished"]
[connection signal="flash_text" from="Stats" to="FlashText" method="print"]
[connection signal="level_up" from="Stats" to="." method="new_level"]
[connection signal="start" from="Start" to="." method="new_game"]
[connection signal="pressed" from="ReplayButton" to="." method="_on_ReplayButton_pressed"]