// Start is called before the first frame update private void OnTriggerEnter2D(Collider2D collision) { if (collision.gameObject.CompareTag("Hamster")) { LinkedItem?.Toggle(); } }
public virtual void ConsumedBehaviour() { lockedDoor.Toggle(true); Destroy(gameObject); }