private void OnTriggerEnter(Collider other) { OrbBase orbBase = other.gameObject.GetComponent <OrbBase>(); if (orbBase != null) { Destroy(other.gameObject); shield.Miss(orbBase.Colour); } }
private void OnTriggerEnter(Collider other) { OrbBase orbBase = other.gameObject.GetComponent <OrbBase>(); if (orbBase != null) { if (orbBase.Colour == Colour) { Correct(orbBase.Colour); } else { //Subtract fuction Miss(orbBase.Colour); } Destroy(other.gameObject); } }