Esempio n. 1
0
        void OnTriggerEnter2D(Collider2D col)
        {
            if (col.gameObject.tag == "Player")
            {
                if (m_enableCoin)
                {
                    PlayerScore score = col.gameObject.GetComponent <PlayerScore>();
                    if (score != null)
                    {
                        score.AddScorePoints(m_value);
                    }

                    DisableCoin();

                    if (CoinEvent != null)
                    {
                        CoinEvent();
                    }
                }
            }
        }
Esempio n. 2
0
 private void OnWinCoins(uint p_amount)
 {
     m_score.AddScorePoints(p_amount);
 }