35 lines
917 B
GDScript
35 lines
917 B
GDScript
extends Node
|
|
|
|
var points = 0
|
|
|
|
enum SPEED {MIN= 5, MAX= 12}
|
|
|
|
var currentSpeed := SPEED.MIN
|
|
|
|
var hasSelectedSpeed = false
|
|
|
|
const GRID := 64
|
|
|
|
enum BLOCKTYPES {LIGHT=1, HEAVY=3}
|
|
|
|
const BLOCKSPATTERS : Dictionary = {
|
|
"Z": "res://scenes/Blocks/Patterns/Z/Z_block_pattern.tscn",
|
|
"L": "res://scenes/Blocks/Patterns/L/L_block_pattern.tscn",
|
|
"L-Reverse": "res://scenes/Blocks/Patterns/L-Reverse/L-Reverse_block_pattern.tscn",
|
|
"Z-Reverse": "res://scenes/Blocks/Patterns/Z-Reverse/Z-Reverse_block_pattern.tscn",
|
|
"2x2": "res://scenes/Blocks/Patterns/2x2/2x2_block_pattern.tscn",
|
|
"T": "res://scenes/Blocks/Patterns/T/T_block_pattern.tscn",
|
|
#"I": "res://scenes/Blocks/Patterns/I/I_block_pattern.tscn",
|
|
"1x3": "res://scenes/Blocks/Patterns/1x3/1x3_block_pattern.tscn"
|
|
}
|
|
enum Direction {BOTTOM, LEFT, RIGHT, TOP}
|
|
|
|
var lastUID = 1
|
|
|
|
var currentUID = lastUID
|
|
|
|
var time = 0
|
|
|
|
func getNewUID() -> int:
|
|
lastUID += 1
|
|
return lastUID
|