private void OnTriggerExit2D(Collider2D other) { if (_currentShop == this) { _currentShop = null; _ui.HidePrompt(); } }
private void OnTriggerEnter2D(Collider2D other) { if (!other.GetComponentInParent <PlayerControllerComponent>()) { return; } _currentShop = this; var cost = _cost.ToString("###,###,##0"); _ui.SetPrompt($"Buy: {_item}: (${cost})\nPess '{GameManagerComponent.Instance.InteractionKey}' to buy"); }