Пример #1
0
    private void OnDestroy()
    {
        var args = new CoinCollectedArgs();

        args.Amount = this.coinValue;
        OnCoinCollected?.Invoke(this, args);
    }
Пример #2
0
 private void OnNewCoin(object sender, CoinCollectedArgs coin)
 {
     this.collectedCoins++;
     this.SetCoinamountText();
 }
Пример #3
0
 /// <summary>
 /// Adds the collectibles score value to the total score
 /// </summary>
 /// <param name="col">Sender object</param>
 /// <param name="_">event args</param>
 private void CallbackCoinCollected(object col, CoinCollectedArgs _)
 {
     this.levelScore += ((Collectable)col).ScoreValue;
     UpdateScore(this.levelScore);
 }