]> Untitled Git - catris.git/blob - script/cell.gd
Basic tetris behavior with 1 cell piece
[catris.git] / script / cell.gd
1 @tool
2 extends Node2D
3 class_name Cell
4
5
6 @export var block_size: int = 10:
7         set(s):
8                 block_size = s
9                 _set_size_to_block_size()
10
11
12 func _ready() -> void:
13         _set_size_to_block_size()
14
15
16 func _set_size_to_block_size():
17         if get_node_or_null("TextureRect"):
18                 $TextureRect.size = Vector2(block_size, block_size)