Example #1
0
    public override void Interact()
    {
        // If toolbox is already enabled there is no reason the replay the sound
        if (!toolboxHUD.isActiveAndEnabled)
        {
            PlaySound(interactSound);
        }

        toolboxHUD.gameObject.SetActive(true);
        inventoryHUD.ToggleButtons(true);
        toolboxHUD.ToggleButtons(true);
    }
 public Toolbox(Sprite sprite, Vector2 position, InventoryHUD playerInventory, InventoryHUD toolboxInventory)
     : base(sprite, position)
 {
     _playerInventory  = playerInventory;
     _toolboxInventory = toolboxInventory;
     _playerInventory.ToggleButtons(false);
     _toolboxInventory.SetActive(false);
 }
 public override void Cancel()
 {
     _toolboxInventory.SetActive(false);
     _playerInventory.ToggleButtons(false);
 }