private void OnTriggerEnter(Collider other) { if (other.transform.tag == "Weapon") { m_CurrentLife -= WeaponScript.m_CurrentWeaponDmg; ClickerScript.MakePointerBlink(); m_DmgObject.SetActive(true); if (m_CurrentLife <= 0) { InGamePanel.updateScore(m_MaxLife); InGamePanel.addMoney(m_MaxLife); AudioSource.PlayClipAtPoint(m_DeathSound, transform.position, 0.25f); Destroy(gameObject); } } }
void Start() { // levelCheck is used to the check the levels made in ClickerScript. levelCheck = Brigand.GetComponent <ClickerScript>(); }