void OnTriggerExit(Collider other) { if (other.gameObject.tag.Equals(Constants.KeyTag)) { Assert.IsNotNull(_trackedKey); _trackedKey = null; } ; }
void OnTriggerEnter(Collider other) { if (other.gameObject.tag.Equals(Constants.KeyTag)) { Assert.IsNull(_trackedKey); var key = other.gameObject.GetComponent <KeyScriptOC>(); Assert.IsNotNull(key); _trackedKey = key; } ; }