private void OnBrickDestroyed(BrickType type) { BrickDestroyed?.Invoke(type); blocksCount--; if (blocksCount == 0) { AllBricksDestroyed?.Invoke(); } }
private void DestroyBrick() { BrickDestroyed?.Invoke(this); Destroy(gameObject); }
private void OnDestroy() { BrickDestroyed?.Invoke(this); }