From dba6523581cb1f9da2eaa85b8468010574afb52e Mon Sep 17 00:00:00 2001 From: kittyegg Date: Fri, 22 May 2026 16:37:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A2=D0=B5=D0=BF=D0=B5=D1=80=D1=8C=20=D0=BF?= =?UTF-8?q?=D1=80=D0=BE=D0=B4=D0=B0=D0=B6=D0=B0=20=D0=BF=D1=80=D0=BE=D0=BA?= =?UTF-8?q?=D0=B0=D1=87=D0=B5=D0=BD=D0=BD=D1=8B=D1=85=20=D1=82=D1=83=D1=80?= =?UTF-8?q?=D1=80=D0=B5=D0=BB=D0=B5=D0=B9=20=D1=81=D1=82=D0=B0=D0=BB=D0=B0?= =?UTF-8?q?=20=D0=B2=D1=8B=D0=B3=D0=BE=D0=B4=D0=BD=D0=B5=D0=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Assets/Scripts/Turret.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Assets/Scripts/Turret.cs b/Assets/Scripts/Turret.cs index b6cf4f3..16f7518 100644 --- a/Assets/Scripts/Turret.cs +++ b/Assets/Scripts/Turret.cs @@ -22,10 +22,12 @@ public class Turret : MonoBehaviour private float _baseDamage; private float _baseDistance; + private float _currentPrice; + public int Price => _price; public float Damage => _damage; public float Distance => _distance; - public int SellPrice => Mathf.RoundToInt(_price * _sellingMultiplier); + public int SellPrice => Mathf.RoundToInt(_currentPrice * _sellingMultiplier); public int UpgradeCost { get @@ -48,6 +50,7 @@ public class Turret : MonoBehaviour _baseReloadTime = _reloadTime; _baseDamage = _damage; _baseDistance = _distance; + _currentPrice = _price; } public void Upgrade() @@ -77,6 +80,8 @@ public class Turret : MonoBehaviour if (upgrade.UpgradeReloadTimeMultiplier != -1) _reloadTime = _baseReloadTime * upgrade.UpgradeReloadTimeMultiplier; + + _currentPrice += _price * 0.25f; } private void Update()