생산건물 하드코딩 저장위치 변경
This commit is contained in:
parent
167fcfa910
commit
4a3eb52c92
|
|
@ -51,7 +51,7 @@ public class BuildingCtrl : MonoBehaviour
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (buildingLevel != 5)
|
if (buildingLevel != 5)
|
||||||
PlayCtrl.Instance.LevelupBuyAndSellText(150 * buildingLevel, -1);
|
PlayCtrl.Instance.LevelupBuyAndSellText(Statics.resourceBuy * buildingLevel, -1);
|
||||||
else
|
else
|
||||||
PlayCtrl.Instance.LevelupBuyAndSellText(-1, -1);
|
PlayCtrl.Instance.LevelupBuyAndSellText(-1, -1);
|
||||||
}
|
}
|
||||||
|
|
@ -91,12 +91,12 @@ public class BuildingCtrl : MonoBehaviour
|
||||||
PlayCtrl.Instance.player.buildings[wave].level[position - 1] = buildingLevel + 1;
|
PlayCtrl.Instance.player.buildings[wave].level[position - 1] = buildingLevel + 1;
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
if(150 * buildingLevel > PlayCtrl.Instance.money)
|
if(Statics.resourceBuy * buildingLevel > PlayCtrl.Instance.money)
|
||||||
{
|
{
|
||||||
Debug.Log("구매비용이 부족합니다");
|
Debug.Log("구매비용이 부족합니다");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
PlayCtrl.Instance.TextUpdate(-150 * buildingLevel);
|
PlayCtrl.Instance.TextUpdate(-Statics.resourceBuy * buildingLevel);
|
||||||
PlayCtrl.Instance.player.addMoney[wave] += 100;
|
PlayCtrl.Instance.player.addMoney[wave] += 100;
|
||||||
}
|
}
|
||||||
buildingLevel++;
|
buildingLevel++;
|
||||||
|
|
|
||||||
|
|
@ -34,4 +34,9 @@ public class Statics
|
||||||
|
|
||||||
//유저가 플레이한 쳅터 정보
|
//유저가 플레이한 쳅터 정보
|
||||||
public static int chapter;
|
public static int chapter;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
//기본 세팅 데이터
|
||||||
|
public static readonly int resourceBuy = 150;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue