示例#1
0
 public void Sell()
 {
     if (CurrencyManager.Instance.CurrentCurrency() >= cost)
     {
         CurrencyManager.Instance.RemoveCurrency(cost);
         GameObject newGun = Instantiate(gun, shopCannonBarrelEnd.position, shopCannonBarrelEnd.rotation);
         shopCannonBarrelEnd.GetComponentInParent <ShopCannon>().Shoot(newGun);
         button.CloseShop();
     }
 }