Added tetris-game. /JL
This commit is contained in:
7
tetris-game/scenes/board.tscn
Normal file
7
tetris-game/scenes/board.tscn
Normal file
@@ -0,0 +1,7 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://d0rk850ey8e0g"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://yc60e2spsmjh" path="res://scripts/board.gd" id="1_p0ybc"]
|
||||
|
||||
[node name="Board" type="Node2D"]
|
||||
position = Vector2(100, 0)
|
||||
script = ExtResource("1_p0ybc")
|
||||
69
tetris-game/scenes/game_over.tscn
Normal file
69
tetris-game/scenes/game_over.tscn
Normal file
@@ -0,0 +1,69 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dkspo8vx4qcvb"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://dq8ifo7mfpflr" path="res://scripts/game_over.gd" id="1_xeevv"]
|
||||
|
||||
[node name="GameOver" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
scale = Vector2(2, 2)
|
||||
size_flags_horizontal = 4
|
||||
size_flags_vertical = 4
|
||||
script = ExtResource("1_xeevv")
|
||||
|
||||
[node name="CenterContainer" type="CenterContainer" parent="."]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Panel" type="Panel" parent="CenterContainer"]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="CenterContainer/Panel"]
|
||||
layout_mode = 1
|
||||
anchors_preset = 8
|
||||
anchor_left = 0.5
|
||||
anchor_top = 0.5
|
||||
anchor_right = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -67.0
|
||||
offset_top = -69.5
|
||||
offset_right = 67.0
|
||||
offset_bottom = 69.5
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="LabelTitle" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
text = "GAME OVER"
|
||||
|
||||
[node name="LabelScore" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="LabelHighScore" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="LabelLines" type="Label" parent="CenterContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="CenterContainer/Panel/VBoxContainer"]
|
||||
layout_mode = 2
|
||||
size_flags_horizontal = 4
|
||||
|
||||
[node name="ButtonAgain" type="Button" parent="CenterContainer/Panel/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Play Again"
|
||||
|
||||
[node name="ButtonQuit" type="Button" parent="CenterContainer/Panel/VBoxContainer/HBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Quit"
|
||||
40
tetris-game/scenes/hud_left.tscn
Normal file
40
tetris-game/scenes/hud_left.tscn
Normal file
@@ -0,0 +1,40 @@
|
||||
[gd_scene format=3 uid="uid://ds6jmtmpkvtxp"]
|
||||
|
||||
[node name="HUDLeft" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 4
|
||||
anchor_top = 0.5
|
||||
anchor_bottom = 0.5
|
||||
offset_top = -20.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 20.0
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="LabelScoreTitle" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Score"
|
||||
|
||||
[node name="LabelScoreValue" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
|
||||
[node name="LabelHighScoreTitle" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Highscore"
|
||||
|
||||
[node name="LabelHighScoreValue" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
|
||||
[node name="LabelLinesTitle" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Lines"
|
||||
|
||||
[node name="LabelLinesValue" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "0"
|
||||
22
tetris-game/scenes/hud_right.tscn
Normal file
22
tetris-game/scenes/hud_right.tscn
Normal file
@@ -0,0 +1,22 @@
|
||||
[gd_scene load_steps=2 format=3 uid="uid://dsc4ofx4h3gos"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://d0wlixgjpcnyc" path="res://scripts/next_preview.gd" id="1_hyjpj"]
|
||||
|
||||
[node name="HUDRight" type="Control"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 0
|
||||
offset_left = 350.0
|
||||
offset_right = 390.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="."]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
|
||||
[node name="LabelNextTitle" type="Label" parent="VBoxContainer"]
|
||||
layout_mode = 2
|
||||
text = "Next"
|
||||
|
||||
[node name="NextPreview" type="Node2D" parent="VBoxContainer"]
|
||||
script = ExtResource("1_hyjpj")
|
||||
51
tetris-game/scenes/main.tscn
Normal file
51
tetris-game/scenes/main.tscn
Normal file
@@ -0,0 +1,51 @@
|
||||
[gd_scene load_steps=7 format=3 uid="uid://ckvfgxn4jyoi6"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://ctadm2gu04xgn" path="res://scripts/main.gd" id="1_tbgi4"]
|
||||
[ext_resource type="PackedScene" uid="uid://d0rk850ey8e0g" path="res://scenes/board.tscn" id="2_tefeu"]
|
||||
[ext_resource type="PackedScene" uid="uid://ds6jmtmpkvtxp" path="res://scenes/hud_left.tscn" id="3_o6xl0"]
|
||||
[ext_resource type="PackedScene" uid="uid://dsc4ofx4h3gos" path="res://scenes/hud_right.tscn" id="4_tipki"]
|
||||
[ext_resource type="Shader" uid="uid://ct7v5mfajkvir" path="res://shaders/blur_overlay.gdshader" id="5_85g3d"]
|
||||
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_lquwl"]
|
||||
shader = ExtResource("5_85g3d")
|
||||
shader_parameter/blur_radius = 8.00000038
|
||||
shader_parameter/samples = 7
|
||||
shader_parameter/blur_strength = 0.70000003325
|
||||
shader_parameter/dim_amount = 0.150000007125
|
||||
|
||||
[node name="Main" type="Node2D"]
|
||||
script = ExtResource("1_tbgi4")
|
||||
|
||||
[node name="GameRoot" type="Node2D" parent="."]
|
||||
|
||||
[node name="Board" parent="GameRoot" instance=ExtResource("2_tefeu")]
|
||||
|
||||
[node name="HUDLeft" parent="GameRoot" instance=ExtResource("3_o6xl0")]
|
||||
offset_top = 150.0
|
||||
offset_bottom = 190.0
|
||||
|
||||
[node name="HUDRight" parent="GameRoot" instance=ExtResource("4_tipki")]
|
||||
offset_top = 24.0
|
||||
offset_bottom = 64.0
|
||||
|
||||
[node name="UILayer" type="CanvasLayer" parent="GameRoot"]
|
||||
|
||||
[node name="UIRoot" type="Control" parent="GameRoot/UILayer"]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
metadata/_edit_use_anchors_ = true
|
||||
|
||||
[node name="BlurOverlay" type="ColorRect" parent="GameRoot/UILayer/UIRoot"]
|
||||
visible = false
|
||||
material = SubResource("ShaderMaterial_lquwl")
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
Reference in New Issue
Block a user