public void SetColor(SweetsColorType colorType) { if (CanChangeColor()) { ColorComponent.SetColor(colorType); } }
public void SetColor() { if (CanChangeColor()) { ColorComponent.SetColor(); } }
public void Init(int _x, int _y, GridManager _grid, GridManager.PieceType _type) { data.x = _x; data.y = _y; GridRef = _grid; Type = _type; if (Type != GridManager.PieceType.EMPTY) { ColorComponent.SetColor((ColorPiece.ColorType)Random.Range(0, ColorComponent.NumColors)); } }