예제 #1
0
 private void OnTriggerExit2D(Collider2D other)
 {
     if (_currentShop == this)
     {
         _currentShop = null;
         _ui.HidePrompt();
     }
 }
예제 #2
0
    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");
    }