apply animation to other pieces

This commit is contained in:
Fabien Freling 2019-12-03 13:50:42 +01:00
parent ce3b060487
commit 6753848c8f
4 changed files with 48 additions and 20 deletions

View file

@ -2,14 +2,14 @@ extends Node2D
class_name Piece
tool
export var size: int = 64
export var size: int = 160
var number: int = 0
var taquin_position = Vector2(0, 0)
var piece_scale = Vector2(0.25, 0.25)
func _ready() -> void:
$ColorRect.rect_size.x = size
$ColorRect.rect_size.y = size
$ColorRect.rect_size = Vector2(size, size)
$ColorRect/Label.text = str(number)
# We need a dedicated material to have separate uniform,