diff --git a/Client/Assets/0_Scenes/Play.unity b/Client/Assets/0_Scenes/Play.unity index cc0c35c8..55812ca7 100644 --- a/Client/Assets/0_Scenes/Play.unity +++ b/Client/Assets/0_Scenes/Play.unity @@ -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 diff --git a/Client/Assets/1_Script/Info/BuildingCtrl.cs b/Client/Assets/1_Script/Info/BuildingCtrl.cs index 68b08ab3..1ab8f03e 100644 --- a/Client/Assets/1_Script/Info/BuildingCtrl.cs +++ b/Client/Assets/1_Script/Info/BuildingCtrl.cs @@ -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); diff --git a/Client/Assets/1_Script/PlayCtrl.cs b/Client/Assets/1_Script/PlayCtrl.cs index 455463a5..18571b0f 100644 --- a/Client/Assets/1_Script/PlayCtrl.cs +++ b/Client/Assets/1_Script/PlayCtrl.cs @@ -23,6 +23,8 @@ public class PlayCtrl : SingletonMonoBehaviour 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 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 } /* ÇÊ¿ä ÀÛ¾÷»çÇ× - 1. À¯´Ö »ý¼º ÀÚ¿ø - 2. °­È­ Á¶°Ç Á¤Çϱâ - 3. °Ç¹° ö°Å ¹ÝȯÀÚ¿ø Á¶°Ç Á¤Çϱâ + //1. À¯´Ö »ý¼º ÀÚ¿ø + //2. °­È­ Á¶°Ç Á¤Çϱâ + //3. °Ç¹° ö°Å ¹ÝȯÀÚ¿ø Á¶°Ç Á¤Çϱâ 4. UIÀû¿ë */ \ No newline at end of file