public void OnCollisionEnter2D(Collision2D col) { if (col.gameObject.tag == "Player") { pnBonus.BonusAcc(timerBonus); ts.timerFloat += 15; Destroy(gameObject); } }
void OnTriggerEnter2D(Collider2D col) { if (col.gameObject.tag == "Head") { if (pb.bonus3) { pb.BonusAcc(shield); Destroy(transform.parent.gameObject); pb.bonus3 = false; } } }