示例#1
0
 private void Update()
 {
     if (Input.GetKeyDown(GameManagerComponent.Instance.InteractionKey) && _currentShop == this)
     {
         if (_player.CanBuy(_cost))
         {
             _player.AddMoney(-_cost);
             Instantiate(_effect, Vector3.zero, Quaternion.identity);
         }
     }
 }
 private void Update()
 {
     if (Input.GetKeyDown(KeyCode.Q) && _currentShop == this)
     {
         if (_player.Money >= _cost)
         {
             _player.AddMoney(-_cost);
             Instantiate(_effect, Vector3.zero, Quaternion.identity);
         }
     }
 }