구매,판매 UI작업 완료
This commit is contained in:
parent
db0d9b651a
commit
43545b3fc0
|
|
@ -1010,6 +1010,8 @@ MonoBehaviour:
|
|||
- {fileID: 21300000, guid: 19212e068479324499fd9c2df695e1a5, type: 3}
|
||||
- {fileID: 21300000, guid: 9a5fe966de57a3a4084292167498822b, type: 3}
|
||||
- {fileID: 21300000, guid: b4d800f3867055b488a2005b95086ec9, type: 3}
|
||||
buyText: {fileID: 663203141}
|
||||
sellText: {fileID: 1782769547}
|
||||
moneyText: {fileID: 13568456}
|
||||
player: {fileID: 0}
|
||||
enemy: {fileID: 0}
|
||||
|
|
@ -2646,7 +2648,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
isEnemy: 0
|
||||
campHp: 0
|
||||
unit: {fileID: 3138165653453361519, guid: e1d051ae38295a04a96d0ad555c11500, type: 3}
|
||||
addMoney:
|
||||
--- !u!61 &317772272
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -8010,7 +8012,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 0
|
||||
m_IsActive: 1
|
||||
--- !u!224 &1396764733
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -9274,7 +9276,7 @@ MonoBehaviour:
|
|||
m_EditorClassIdentifier:
|
||||
isEnemy: 1
|
||||
campHp: 0
|
||||
unit: {fileID: 3138165653453361519, guid: e1d051ae38295a04a96d0ad555c11500, type: 3}
|
||||
addMoney:
|
||||
--- !u!61 &1578748164
|
||||
BoxCollider2D:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -10622,7 +10624,7 @@ GameObject:
|
|||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
m_IsActive: 0
|
||||
--- !u!224 &1785205478
|
||||
RectTransform:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
|
|||
|
|
@ -33,6 +33,13 @@ public class BuildingCtrl : MonoBehaviour
|
|||
{
|
||||
if(isProduction || buildingLevel != 0)//생산건물 이거나 일반건물 레벨업
|
||||
{
|
||||
int sell = 0;
|
||||
for (int n = 0; n < buildingLevel; n++)
|
||||
{
|
||||
sell += unitInfo.unit.buy[n];
|
||||
}
|
||||
sell /= 3;
|
||||
PlayCtrl.Instance.LevelupBuyAndSellText(unitInfo.unit.buy[buildingLevel], sell);
|
||||
PlayCtrl.Instance.buildingLevelupUI.SetActive(true);
|
||||
PlayCtrl.Instance.newBuildingUI.SetActive(false);
|
||||
PlayCtrl.Instance.backButton.SetActive(true);
|
||||
|
|
|
|||
|
|
@ -23,6 +23,8 @@ public class PlayCtrl : SingletonMonoBehaviour<PlayCtrl>
|
|||
public GameObject backButton;
|
||||
public UnitCtrl[] units;
|
||||
public Sprite[] unitImages;
|
||||
public TMP_Text buyText;
|
||||
public TMP_Text sellText;
|
||||
public TMP_Text moneyText;
|
||||
|
||||
public SummonsUnit player;
|
||||
|
|
@ -116,6 +118,12 @@ public class PlayCtrl : SingletonMonoBehaviour<PlayCtrl>
|
|||
uiExit();
|
||||
}
|
||||
|
||||
public void LevelupBuyAndSellText(int buy, int sell)
|
||||
{
|
||||
buyText.text = $"강화({buy})";
|
||||
sellText.text = $"건물 제거({sell})";
|
||||
}
|
||||
|
||||
public void TextUpdate(int addMoney)
|
||||
{
|
||||
if (money != int.Parse(moneyText.text))
|
||||
|
|
@ -130,8 +138,8 @@ public class PlayCtrl : SingletonMonoBehaviour<PlayCtrl>
|
|||
}
|
||||
/*
|
||||
필요 작업사항
|
||||
1. 유닛 생성 자원
|
||||
2. 강화 조건 정하기
|
||||
3. 건물 철거 반환자원 조건 정하기
|
||||
//1. 유닛 생성 자원
|
||||
//2. 강화 조건 정하기
|
||||
//3. 건물 철거 반환자원 조건 정하기
|
||||
4. UI적용
|
||||
*/
|
||||
Loading…
Reference in New Issue