생산건물 하드코딩 저장위치 변경

This commit is contained in:
김판돌 2024-03-03 20:13:41 +09:00
parent 167fcfa910
commit 4a3eb52c92
2 changed files with 8 additions and 3 deletions

View File

@ -51,7 +51,7 @@ public class BuildingCtrl : MonoBehaviour
else
{
if (buildingLevel != 5)
PlayCtrl.Instance.LevelupBuyAndSellText(150 * buildingLevel, -1);
PlayCtrl.Instance.LevelupBuyAndSellText(Statics.resourceBuy * buildingLevel, -1);
else
PlayCtrl.Instance.LevelupBuyAndSellText(-1, -1);
}
@ -91,12 +91,12 @@ public class BuildingCtrl : MonoBehaviour
PlayCtrl.Instance.player.buildings[wave].level[position - 1] = buildingLevel + 1;
} else
{
if(150 * buildingLevel > PlayCtrl.Instance.money)
if(Statics.resourceBuy * buildingLevel > PlayCtrl.Instance.money)
{
Debug.Log("구매비용이 부족합니다");
return;
}
PlayCtrl.Instance.TextUpdate(-150 * buildingLevel);
PlayCtrl.Instance.TextUpdate(-Statics.resourceBuy * buildingLevel);
PlayCtrl.Instance.player.addMoney[wave] += 100;
}
buildingLevel++;

View File

@ -34,4 +34,9 @@ public class Statics
//유저가 플레이한 쳅터 정보
public static int chapter;
//기본 세팅 데이터
public static readonly int resourceBuy = 150;
}