示例#1
0
    private void CollectableWasTaken()
    {
        _amountCollected++;

        UpdateLabel();

        // TODO: move this logic to a Game Manager
        if (_amountCollected == _collectables.Length)
        {
            if (GameEventsManager.OnAllCollectablesWereTaken != null)
            {
                GameEventsManager.OnAllCollectablesWereTaken();
            }
        }
    }