private void OnTriggerExit2D(Collider2D collision) { PushPuzzleBlock block = collision.GetComponent <PushPuzzleBlock>(); if (block != null) { if (block.isSolutionBlock && isSolutionTile) { block.touchingEndTiles--; } } }
public void dumb() { PushPuzzleBlock[] blocks = FindObjectsOfType <PushPuzzleBlock>(); foreach (PushPuzzleBlock block in blocks) { block.AdjustSize(); } foreach (Transform child in transform) { if (child.name.Contains("Square")) { child.GetComponent <SpriteRenderer>().enabled = false; } PushPuzzleBlock block = child.GetComponent <PushPuzzleBlock>(); if (block != null) { block.AdjustSize(); } } Instantiate(backGroundKasten, transform); }