freezeи
public void OnCollisionEnter2D(Collision2D collision)
{
if(freeze = false){
TilesController script = GetComponent<TilesController>();
Debug.Log("Hit");
speed = 0;
step = 0;
SpawnManager.FindObjectOfType<SpawnManager>().SpawnPiece();
freeze = true;
}
}