Exemple #1
0
    private void OnBrickDestroyed(BrickType type)
    {
        BrickDestroyed?.Invoke(type);

        blocksCount--;
        if (blocksCount == 0)
        {
            AllBricksDestroyed?.Invoke();
        }
    }
Exemple #2
0
 private void DestroyBrick()
 {
     BrickDestroyed?.Invoke(this);
     Destroy(gameObject);
 }
Exemple #3
0
 private void OnDestroy()
 {
     BrickDestroyed?.Invoke(this);
 }