summaryrefslogtreecommitdiff
path: root/demos/2d/tetris
diff options
context:
space:
mode:
Diffstat (limited to 'demos/2d/tetris')
-rw-r--r--demos/2d/tetris/grid.gd219
-rw-r--r--demos/2d/tetris/grid.xml252
-rw-r--r--demos/2d/tetris/tetris.xml252
3 files changed, 401 insertions, 322 deletions
diff --git a/demos/2d/tetris/grid.gd b/demos/2d/tetris/grid.gd
index 8708d168e4..75fabb4210 100644
--- a/demos/2d/tetris/grid.gd
+++ b/demos/2d/tetris/grid.gd
@@ -1,82 +1,76 @@
-
extends Control
# Simple Tetris-like demo, (c) 2012 Juan Linietsky
# Implemented by using a regular Control and drawing on it during the _draw() callback.
# The drawing surface is updated only when changes happen (by calling update())
-
+# Member variables
var score = 0
-var score_label=null
+var score_label = null
const MAX_SHAPES = 7
var block = preload("block.png")
-var block_colors=[
- Color(1,0.5,0.5),
- Color(0.5,1,0.5),
- Color(0.5,0.5,1),
- Color(0.8,0.4,0.8),
- Color(0.8,0.8,0.4),
- Color(0.4,0.8,0.8),
- Color(0.7,0.7,0.7)]
-
-var block_shapes=[
- [ Vector2(0,-1),Vector2(0,0),Vector2(0,1),Vector2(0,2) ], # I
- [ Vector2(0,0),Vector2(1,0),Vector2(1,1),Vector2(0,1) ], # O
- [ Vector2(-1,1),Vector2(0,1),Vector2(0,0),Vector2(1,0) ], # S
- [ Vector2(1,1),Vector2(0,1),Vector2(0,0),Vector2(-1,0) ], # Z
- [ Vector2(-1,1),Vector2(-1,0),Vector2(0,0),Vector2(1,0) ], # L
- [ Vector2(1,1),Vector2(1,0),Vector2(0,0),Vector2(-1,0) ], # J
- [ Vector2(0,1),Vector2(1,0),Vector2(0,0),Vector2(-1,0) ]] # T
-
+var block_colors = [
+ Color(1, 0.5, 0.5),
+ Color(0.5, 1, 0.5),
+ Color(0.5, 0.5, 1),
+ Color(0.8, 0.4, 0.8),
+ Color(0.8, 0.8, 0.4),
+ Color(0.4, 0.8, 0.8),
+ Color(0.7, 0.7, 0.7)]
-var block_rotations=[
- Matrix32( Vector2(1,0),Vector2(0,1), Vector2() ),
- Matrix32( Vector2(0,1),Vector2(-1,0), Vector2() ),
- Matrix32( Vector2(-1,0),Vector2(0,-1), Vector2() ),
- Matrix32( Vector2(0,-1),Vector2(1,0), Vector2() )
-]
-
+var block_shapes = [
+ [ Vector2(0, -1), Vector2(0, 0), Vector2(0, 1), Vector2(0, 2) ], # I
+ [ Vector2(0, 0), Vector2(1, 0), Vector2(1, 1), Vector2(0, 1) ], # O
+ [ Vector2(-1, 1), Vector2(0, 1), Vector2(0, 0), Vector2(1, 0) ], # S
+ [ Vector2(1, 1), Vector2(0, 1), Vector2(0, 0), Vector2(-1, 0) ], # Z
+ [ Vector2(-1, 1), Vector2(-1, 0), Vector2(0, 0), Vector2(1, 0) ], # L
+ [ Vector2(1, 1), Vector2(1, 0), Vector2(0, 0), Vector2(-1, 0) ], # J
+ [ Vector2(0, 1), Vector2(1, 0), Vector2(0, 0), Vector2(-1, 0) ]] # T
-var width=0
-var height=0
+var block_rotations = [
+ Matrix32(Vector2(1, 0), Vector2(0, 1), Vector2()),
+ Matrix32(Vector2(0, 1), Vector2(-1, 0), Vector2()),
+ Matrix32(Vector2(-1, 0), Vector2(0, -1), Vector2()),
+ Matrix32(Vector2(0, -1), Vector2(1, 0), Vector2())]
-var cells={}
+var width = 0
+var height = 0
-var piece_active=false
-var piece_shape=0
-var piece_pos=Vector2()
-var piece_rot=0
+var cells = {}
+var piece_active = false
+var piece_shape = 0
+var piece_pos = Vector2()
+var piece_rot = 0
-func piece_cell_xform(p,er=0):
- var r = (4+er+piece_rot)%4
- return piece_pos+block_rotations[r].xform(p)
-func _draw():
+func piece_cell_xform(p, er = 0):
+ var r = (4 + er + piece_rot) % 4
+ return piece_pos + block_rotations[r].xform(p)
+
- var sb = get_stylebox("bg","Tree") # use line edit bg
- draw_style_box(sb,Rect2(Vector2(),get_size()).grow(3))
+func _draw():
+ var sb = get_stylebox("bg", "Tree") # Use line edit bg
+ draw_style_box(sb, Rect2(Vector2(), get_size()).grow(3))
var bs = block.get_size()
for y in range(height):
for x in range(width):
- if (Vector2(x,y) in cells):
- draw_texture_rect(block,Rect2(Vector2(x,y)*bs,bs),false,block_colors[cells[Vector2(x,y)]])
-
+ if (Vector2(x, y) in cells):
+ draw_texture_rect(block, Rect2(Vector2(x, y)*bs, bs), false, block_colors[cells[Vector2(x, y)]])
+
if (piece_active):
-
for c in block_shapes[piece_shape]:
- draw_texture_rect(block,Rect2(piece_cell_xform(c)*bs,bs),false,block_colors[piece_shape])
-
+ draw_texture_rect(block, Rect2(piece_cell_xform(c)*bs, bs), false, block_colors[piece_shape])
-func piece_check_fit(ofs,er=0):
+func piece_check_fit(ofs, er = 0):
for c in block_shapes[piece_shape]:
- var pos = piece_cell_xform(c,er)+ofs
+ var pos = piece_cell_xform(c, er) + ofs
if (pos.x < 0):
return false
if (pos.y < 0):
@@ -88,130 +82,113 @@ func piece_check_fit(ofs,er=0):
if (pos in cells):
return false
- return true
+ return true
-func new_piece():
- piece_shape = randi() % MAX_SHAPES
- piece_pos = Vector2(width/2,0)
- piece_active=true
- piece_rot=0
- if (piece_shape==0):
- piece_pos.y+=1
-
+func new_piece():
+ piece_shape = randi() % MAX_SHAPES
+ piece_pos = Vector2(width/2, 0)
+ piece_active = true
+ piece_rot = 0
+ if (piece_shape == 0):
+ piece_pos.y += 1
+
if (not piece_check_fit(Vector2())):
- #game over
- #print("GAME OVER!")
+ # Game over
game_over()
-
- update()
-
+ update()
+
+
func test_collapse_rows():
- var accum_down=0
+ var accum_down = 0
for i in range(height):
var y = height - i - 1
var collapse = true
for x in range(width):
- if (Vector2(x,y) in cells):
+ if (Vector2(x, y) in cells):
if (accum_down):
- cells[ Vector2(x,y+accum_down) ] = cells[Vector2(x,y)]
+ cells[Vector2(x, y + accum_down)] = cells[Vector2(x, y)]
else:
- collapse=false
+ collapse = false
if (accum_down):
- cells.erase( Vector2(x,y+accum_down) )
-
- if (collapse):
- accum_down+=1
+ cells.erase(Vector2(x, y + accum_down))
-
- score+=accum_down*100
+ if (collapse):
+ accum_down += 1
+
+ score += accum_down*100
score_label.set_text(str(score))
-
-
+
+
func game_over():
+ piece_active = false
+ get_node("gameover").set_text("Game over!")
+ update()
+
- piece_active=false
- get_node("gameover").set_text("Game Over")
- update()
-
-
func restart_pressed():
+ score = 0
+ score_label.set_text("0")
+ cells.clear()
+ get_node("gameover").set_text("")
+ piece_active = true
+ get_node("../restart").release_focus()
+ update()
- score=0
- score_label.set_text("0")
- cells.clear()
- get_node("gameover").set_text("")
- piece_active=true
- get_node("../restart").release_focus()
- update()
-
-
func piece_move_down():
-
if (!piece_active):
return
- if (piece_check_fit(Vector2(0,1))):
- piece_pos.y+=1
- update()
+ if (piece_check_fit(Vector2(0, 1))):
+ piece_pos.y += 1
+ update()
else:
-
for c in block_shapes[piece_shape]:
var pos = piece_cell_xform(c)
- cells[pos]=piece_shape
+ cells[pos] = piece_shape
test_collapse_rows()
new_piece()
-
-func piece_rotate():
+func piece_rotate():
var adv = 1
- if (not piece_check_fit(Vector2(),1)):
+ if (not piece_check_fit(Vector2(), 1)):
return
piece_rot = (piece_rot + adv) % 4
update()
-
-
-
-func _input(ie):
+func _input(ie):
if (not piece_active):
return
if (!ie.is_pressed()):
return
if (ie.is_action("move_left")):
- if (piece_check_fit(Vector2(-1,0))):
- piece_pos.x-=1
+ if (piece_check_fit(Vector2(-1, 0))):
+ piece_pos.x -= 1
update()
elif (ie.is_action("move_right")):
- if (piece_check_fit(Vector2(1,0))):
- piece_pos.x+=1
+ if (piece_check_fit(Vector2(1, 0))):
+ piece_pos.x += 1
update()
elif (ie.is_action("move_down")):
piece_move_down()
elif (ie.is_action("rotate")):
piece_rotate()
-
-
-func setup(w,h):
- width=w
- height=h
- set_size( Vector2(w,h)*block.get_size() )
+
+
+func setup(w, h):
+ width = w
+ height = h
+ set_size(Vector2(w, h)*block.get_size())
new_piece()
get_node("timer").start()
-
-func _ready():
- # Initalization here
- setup(10,20)
+func _ready():
+ setup(10, 20)
score_label = get_node("../score")
-
+
set_process_input(true)
-
-
-
-
diff --git a/demos/2d/tetris/grid.xml b/demos/2d/tetris/grid.xml
index 072ffb5e75..49ad4ccc41 100644
--- a/demos/2d/tetris/grid.xml
+++ b/demos/2d/tetris/grid.xml
@@ -1,153 +1,209 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="2" version="0.99" version_name="Godot Engine v0.99.3037-pre-beta">
- <ext_resource path="res://grid.gd" type="GDScript"></ext_resource>
+<resource_file type="PackedScene" subresource_count="2" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://grid.gd" type="Script" index="0"></ext_resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 1 </int>
+ <string> "conns" </string>
+ <int_array len="6"> 1, 0, 30, 29, 2, 0 </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="57">
+ <string_array len="31">
<string> "Grid" </string>
- <string> "Control" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "anchor/left" </string>
- <string> "anchor/top" </string>
- <string> "anchor/right" </string>
- <string> "anchor/bottom" </string>
- <string> "margin/left" </string>
- <string> "margin/top" </string>
<string> "margin/right" </string>
<string> "margin/bottom" </string>
- <string> "hint/tooltip" </string>
- <string> "focus_neighbour/left" </string>
- <string> "focus_neighbour/top" </string>
- <string> "focus_neighbour/right" </string>
- <string> "focus_neighbour/bottom" </string>
<string> "focus/ignore_mouse" </string>
<string> "focus/stop_mouse" </string>
<string> "size_flags/horizontal" </string>
<string> "size_flags/vertical" </string>
- <string> "size_flags/stretch_ratio" </string>
<string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "Control" </string>
<string> "timer" </string>
- <string> "Timer" </string>
+ <string> "process_mode" </string>
<string> "wait_time" </string>
<string> "one_shot" </string>
<string> "autostart" </string>
+ <string> "Timer" </string>
<string> "gameover" </string>
- <string> "Label" </string>
+ <string> "anchor/right" </string>
+ <string> "anchor/bottom" </string>
<string> "custom_colors/font_color" </string>
+ <string> "custom_colors/font_color_shadow" </string>
<string> "custom_constants/shadow_offset_x" </string>
<string> "custom_constants/shadow_offset_y" </string>
- <string> "range/min" </string>
- <string> "range/max" </string>
- <string> "range/step" </string>
- <string> "range/page" </string>
- <string> "range/value" </string>
- <string> "range/exp_edit" </string>
- <string> "rounded_values" </string>
- <string> "text" </string>
<string> "align" </string>
<string> "valign" </string>
- <string> "autowrap" </string>
+ <string> "percent_visible" </string>
+ <string> "lines_skipped" </string>
+ <string> "max_lines_visible" </string>
+ <string> "Label" </string>
<string> "piece_move_down" </string>
<string> "timeout" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 1 </int>
<string> "node_count" </string>
<int> 3 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="73"> -1, -1, 9, 0, -1, 8, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 8, 5, 0, 0, 0, 15, 10, -1, 4, 11, 6, 12, 7, 13, 1, 14, 1, 0, 0, 0, 28, 16, -1, 14, 17, 6, 18, 6, 3, 2, 4, 2, 5, 3, 19, 8, 20, 9, 21, 6, 22, 6, 23, 6, 24, 6, 25, 7, 26, 10, 27, 11, 0 </int_array>
<string> "variants" </string>
- <array len="14">
+ <array len="12" shared="false">
+ <real> 40 </real>
<bool> False </bool>
- <int> 0 </int>
<bool> True </bool>
- <real> 1 </real>
- <real> 0 </real>
- <real> 40 </real>
- <string> "" </string>
- <node_path> "" </node_path>
<int> 2 </int>
- <resource resource_type="GDScript" path="res://grid.gd"> </resource>
- <dictionary>
+ <resource external="0"> </resource>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
- <string> "Script" </string>
- <dictionary>
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1">
- <string> "res://grid.gd" </string>
- </array>
- </dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
+ <dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -229.129, -80 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 1 </real>
- <string> "ofs" </string>
- <vector2> -69, -22 </vector2>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "Script" </string>
</dictionary>
- <resource name=""></resource> <int> 1 </int>
+ <int> 1 </int>
+ <real> 1 </real>
+ <color> 1, 1, 1, 1 </color>
<color> 0, 0, 0, 1 </color>
+ <int> 0 </int>
+ <int> -1 </int>
</array>
- <string> "nodes" </string>
- <int_array len="193"> -1, -1, 1, 0, -1, 32, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 4, 19, 4, 20, 5, 21, 5, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 0, 28, 2, 29, 8, 30, 8, 31, 3, 32, 9, 33, 10, 0, 0, 0, 35, 34, -1, 9, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 36, 3, 37, 0, 38, 0, 32, 11, 0, 0, 0, 40, 39, -1, 45, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 12, 17, 12, 18, 4, 19, 4, 20, 4, 21, 4, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 2, 28, 2, 29, 8, 30, 1, 31, 3, 41, 13, 42, 12, 43, 12, 44, 4, 45, 3, 46, 3, 47, 3, 48, 4, 49, 0, 50, 0, 51, 6, 52, 12, 53, 12, 54, 0, 32, 11, 0 </int_array>
- <string> "conns" </string>
- <int_array len="6"> 1, 0, 56, 55, 2, 0 </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file
diff --git a/demos/2d/tetris/tetris.xml b/demos/2d/tetris/tetris.xml
index 1b5e5afeb0..a8e47a8ae4 100644
--- a/demos/2d/tetris/tetris.xml
+++ b/demos/2d/tetris/tetris.xml
@@ -1,147 +1,192 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<resource_file type="PackedScene" subresource_count="2" version="0.99" version_name="Godot Engine v0.99.3037-pre-beta">
- <ext_resource path="res://grid.xml" type="PackedScene"></ext_resource>
+<resource_file type="PackedScene" subresource_count="2" version="2.0" version_name="Godot Engine v2.0.alpha.custom_build">
+ <ext_resource path="res://grid.xml" type="PackedScene" index="0"></ext_resource>
<main_resource>
- <string name="resource/name"> "" </string>
- <dictionary name="_bundled">
+ <dictionary name="_bundled" shared="false">
+ <string> "conn_count" </string>
+ <int> 1 </int>
+ <string> "conns" </string>
+ <int_array len="6"> 4, 1, 23, 22, 2, 0 </int_array>
+ <string> "editable_instances" </string>
+ <array len="0" shared="false">
+ </array>
<string> "names" </string>
- <string_array len="59">
+ <string_array len="24">
<string> "Tetris" </string>
- <string> "Panel" </string>
- <string> "process/process" </string>
- <string> "process/fixed_process" </string>
- <string> "process/input" </string>
- <string> "process/unhandled_input" </string>
- <string> "process/mode" </string>
- <string> "visibility/visible" </string>
- <string> "visibility/toplevel" </string>
- <string> "visibility/opacity" </string>
- <string> "visibility/self_opacity" </string>
- <string> "visibility/on_top" </string>
- <string> "visibility/blend_mode" </string>
- <string> "transform/notify" </string>
- <string> "anchor/left" </string>
- <string> "anchor/top" </string>
- <string> "anchor/right" </string>
- <string> "anchor/bottom" </string>
- <string> "margin/left" </string>
- <string> "margin/top" </string>
<string> "margin/right" </string>
<string> "margin/bottom" </string>
- <string> "hint/tooltip" </string>
- <string> "focus_neighbour/left" </string>
- <string> "focus_neighbour/top" </string>
- <string> "focus_neighbour/right" </string>
- <string> "focus_neighbour/bottom" </string>
<string> "focus/ignore_mouse" </string>
<string> "focus/stop_mouse" </string>
<string> "size_flags/horizontal" </string>
<string> "size_flags/vertical" </string>
- <string> "size_flags/stretch_ratio" </string>
- <string> "script/script" </string>
<string> "__meta__" </string>
+ <string> "Panel" </string>
<string> "Grid" </string>
- <string> "Control" </string>
+ <string> "margin/left" </string>
+ <string> "margin/top" </string>
<string> "Label" </string>
- <string> "range/min" </string>
- <string> "range/max" </string>
- <string> "range/step" </string>
- <string> "range/page" </string>
- <string> "range/value" </string>
- <string> "range/exp_edit" </string>
- <string> "rounded_values" </string>
<string> "text" </string>
- <string> "align" </string>
- <string> "valign" </string>
- <string> "autowrap" </string>
+ <string> "percent_visible" </string>
+ <string> "lines_skipped" </string>
+ <string> "max_lines_visible" </string>
<string> "score" </string>
<string> "restart" </string>
- <string> "Button" </string>
- <string> "disabled" </string>
<string> "toggle_mode" </string>
- <string> "click_on_press" </string>
- <string> "icon" </string>
<string> "flat" </string>
- <string> "clip_text" </string>
+ <string> "Button" </string>
<string> "restart_pressed" </string>
<string> "pressed" </string>
</string_array>
- <string> "version" </string>
- <int> 1 </int>
- <string> "conn_count" </string>
- <int> 1 </int>
<string> "node_count" </string>
<int> 5 </int>
+ <string> "node_paths" </string>
+ <array len="0" shared="false">
+ </array>
+ <string> "nodes" </string>
+ <int_array len="123"> -1, -1, 8, 0, -1, 7, 1, 0, 2, 0, 3, 1, 4, 2, 5, 3, 6, 3, 7, 4, 0, 0, 0, 2147483647, 9, 5, 4, 10, 6, 11, 7, 1, 8, 2, 9, 0, 0, 0, 12, 12, -1, 11, 10, 10, 11, 11, 1, 12, 2, 13, 3, 2, 4, 2, 5, 3, 13, 14, 14, 15, 15, 16, 16, 17, 0, 0, 0, 12, 17, -1, 11, 10, 18, 11, 19, 1, 20, 2, 21, 3, 2, 4, 2, 5, 3, 13, 22, 14, 15, 15, 16, 16, 17, 0, 0, 0, 21, 18, -1, 11, 10, 10, 11, 23, 1, 24, 2, 25, 3, 1, 4, 2, 5, 3, 6, 3, 19, 1, 13, 26, 20, 1, 0 </int_array>
<string> "variants" </string>
- <array len="30">
+ <array len="27" shared="false">
+ <real> 400 </real>
<bool> False </bool>
- <int> 0 </int>
<bool> True </bool>
- <real> 1 </real>
- <real> 0 </real>
- <real> 400 </real>
- <string> "" </string>
- <node_path> "" </node_path>
<int> 2 </int>
- <resource name=""></resource> <dictionary>
+ <dictionary shared="false">
+ <string> "__editor_plugin_screen__" </string>
+ <string> "2D" </string>
<string> "__editor_plugin_states__" </string>
- <dictionary>
- <string> "Script" </string>
- <dictionary>
- <string> "current" </string>
- <int> 0 </int>
- <string> "sources" </string>
- <array len="1">
- <string> "res://grid.gd" </string>
- </array>
- </dictionary>
+ <dictionary shared="false">
<string> "2D" </string>
- <dictionary>
+ <dictionary shared="false">
+ <string> "ofs" </string>
+ <vector2> -229.129, -54.344 </vector2>
+ <string> "snap_grid" </string>
+ <bool> False </bool>
+ <string> "snap_offset" </string>
+ <vector2> 0, 0 </vector2>
+ <string> "snap_pixel" </string>
+ <bool> False </bool>
+ <string> "snap_relative" </string>
+ <bool> False </bool>
+ <string> "snap_rotation" </string>
+ <bool> False </bool>
+ <string> "snap_rotation_offset" </string>
+ <real> 0 </real>
+ <string> "snap_rotation_step" </string>
+ <real> 0.261799 </real>
+ <string> "snap_show_grid" </string>
+ <bool> False </bool>
+ <string> "snap_step" </string>
+ <vector2> 10, 10 </vector2>
<string> "zoom" </string>
<real> 1.360374 </real>
- <string> "ofs" </string>
- <vector2> -44.5757, -54.344 </vector2>
</dictionary>
<string> "3D" </string>
- <dictionary>
- <string> "zfar" </string>
- <real> 500 </real>
+ <dictionary shared="false">
+ <string> "ambient_light_color" </string>
+ <color> 0.15, 0.15, 0.15, 1 </color>
+ <string> "default_light" </string>
+ <bool> True </bool>
+ <string> "default_srgb" </string>
+ <bool> False </bool>
+ <string> "deflight_rot_x" </string>
+ <real> 0.942478 </real>
+ <string> "deflight_rot_y" </string>
+ <real> 0.628319 </real>
<string> "fov" </string>
<real> 45 </real>
- <string> "window_mode" </string>
- <int> 0 </int>
- <string> "window_0" </string>
- <dictionary>
- <string> "distance" </string>
- <real> 4 </real>
- <string> "default_light" </string>
- <bool> True </bool>
- <string> "x_rot" </string>
- <real> 0.337 </real>
- <string> "y_rot" </string>
- <real> -0.575 </real>
- <string> "show_grid" </string>
- <bool> True </bool>
- <string> "show_origin" </string>
- <bool> True </bool>
- <string> "pos" </string>
- <vector3> 0, 0, 0 </vector3>
- </dictionary>
+ <string> "show_grid" </string>
+ <bool> True </bool>
+ <string> "show_origin" </string>
+ <bool> True </bool>
+ <string> "viewport_mode" </string>
+ <int> 1 </int>
+ <string> "viewports" </string>
+ <array len="4" shared="false">
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> True </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ <dictionary shared="false">
+ <string> "distance" </string>
+ <real> 4 </real>
+ <string> "listener" </string>
+ <bool> False </bool>
+ <string> "pos" </string>
+ <vector3> 0, 0, 0 </vector3>
+ <string> "use_environment" </string>
+ <bool> False </bool>
+ <string> "use_orthogonal" </string>
+ <bool> False </bool>
+ <string> "x_rot" </string>
+ <real> 0 </real>
+ <string> "y_rot" </string>
+ <real> 0 </real>
+ </dictionary>
+ </array>
+ <string> "zfar" </string>
+ <real> 500 </real>
<string> "znear" </string>
<real> 0.1 </real>
</dictionary>
+ <string> "Anim" </string>
+ <dictionary shared="false">
+ <string> "visible" </string>
+ <bool> False </bool>
+ </dictionary>
</dictionary>
<string> "__editor_run_settings__" </string>
- <dictionary>
+ <dictionary shared="false">
<string> "custom_args" </string>
<string> "-l $scene" </string>
<string> "run_mode" </string>
<int> 0 </int>
</dictionary>
- <string> "__editor_plugin_screen__" </string>
- <string> "2D" </string>
</dictionary>
- <resource resource_type="PackedScene" path="res://grid.xml"> </resource>
+ <resource external="0"> </resource>
<real> 40 </real>
<real> 35 </real>
<real> 80 </real>
@@ -151,6 +196,9 @@
<real> 283 </real>
<real> 49 </real>
<string> "Score:" </string>
+ <real> 1 </real>
+ <int> 0 </int>
+ <int> -1 </int>
<real> 252 </real>
<real> 55 </real>
<real> 293 </real>
@@ -161,11 +209,9 @@
<real> 311 </real>
<string> "Restart" </string>
</array>
- <string> "nodes" </string>
- <int_array len="351"> -1, -1, 1, 0, -1, 32, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 4, 19, 4, 20, 5, 21, 5, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 0, 28, 2, 29, 8, 30, 8, 31, 3, 32, 9, 33, 10, 0, 0, 0, 35, 34, 11, 4, 18, 12, 19, 13, 20, 14, 21, 15, 0, 0, 0, 36, 36, -1, 42, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 16, 19, 17, 20, 18, 21, 19, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 2, 28, 2, 29, 8, 30, 1, 31, 3, 37, 4, 38, 3, 39, 3, 40, 3, 41, 4, 42, 0, 43, 0, 44, 20, 45, 1, 46, 1, 47, 0, 32, 9, 0, 0, 0, 36, 48, -1, 42, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 21, 19, 22, 20, 23, 21, 24, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 2, 28, 2, 29, 8, 30, 1, 31, 3, 37, 4, 38, 3, 39, 3, 40, 3, 41, 4, 42, 0, 43, 0, 44, 25, 45, 1, 46, 1, 47, 0, 32, 9, 0, 0, 0, 50, 49, -1, 38, 2, 0, 3, 0, 4, 0, 5, 0, 6, 1, 7, 2, 8, 0, 9, 3, 10, 3, 11, 2, 12, 1, 13, 0, 14, 1, 15, 1, 16, 1, 17, 1, 18, 16, 19, 26, 20, 27, 21, 28, 22, 6, 23, 7, 24, 7, 25, 7, 26, 7, 27, 0, 28, 2, 29, 8, 30, 8, 31, 3, 51, 0, 52, 0, 53, 0, 44, 29, 54, 9, 55, 0, 56, 0, 32, 9, 0 </int_array>
- <string> "conns" </string>
- <int_array len="6"> 4, 1, 58, 57, 2, 0 </int_array>
+ <string> "version" </string>
+ <int> 2 </int>
</dictionary>
- <resource name="script/script"></resource>
+
</main_resource>
</resource_file> \ No newline at end of file