public void SetWeaponInfo(WeaponInfo weaponInfo) { this.weaponInfo = weaponInfo; image.sprite = weaponInfo.sprite; title.text = weaponInfo.displayName; damageText.SetWith(weaponInfo.damage); delayText.SetWith(weaponInfo.repeatDelay); bool canBuy = playerScoreInfo.CanBuyWeapon(weaponInfo); priceText.SetWith(canBuy ? buyText : cannotBuyText, weaponInfo.scoreWorth); button.interactable = canBuy; }
public void PurchaseWeaponItem(WeaponInfo weaponInfo) { Debug.Assert(playerScoreInfo.CanBuyWeapon(weaponInfo)); weaponBeingPurchased = weaponInfo; ShowSelectSlot(); }