public void Combine(Rigidbody rb) { key = rb.GetComponent <IKey>(); if (key != null) { if (key.GetKey().Equals(requiredKey)) { unlockEvent.Invoke(); } } }