public override void OnTriggerEnter2D(Collider2D other) { if (other.CompareTag("Player") && !IsOpen) { Bubble.ChangeBubbleStatTo(true); InteractableSignal.Raise(); PlayerInRange = true; } }
public void OpenTheChest() { DialogDisplayBox.SetActive(true); Bubble.ChangeBubbleStatTo(false); DialogBox.text = ChestContents.ItemDescription; PlayerInventory.AddItem(ChestContents); PlayerInventory.ShowenItem = ChestContents; ShowFoundItem.Raise(); InteractableSignal.Raise(); IsOpen = true; ChestAnimator.SetBool("Opened", true); IsOpenInMemory.RunTimeValue = IsOpen; }