put a number on each piece
This commit is contained in:
parent
abaa1f0991
commit
0fe5cca646
4 changed files with 23 additions and 5 deletions
|
@ -3,6 +3,13 @@ class_name Piece
|
|||
tool
|
||||
|
||||
export var size: int = 64
|
||||
var number: int = 0
|
||||
|
||||
func _draw() -> void:
|
||||
draw_rect(Rect2(0, 0, size, size), Color.yellow)
|
||||
draw_rect(Rect2(0, 0, size, size), Color.yellow)
|
||||
|
||||
func set_number(num: int) -> void:
|
||||
number = num
|
||||
|
||||
func _ready() -> void:
|
||||
$Label.text = str(number)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue