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(); } } } }
private void OnWinCoins(uint p_amount) { m_score.AddScorePoints(p_amount); }