상점 구매 에러 추가
This commit is contained in:
parent
112c30d005
commit
feba571684
|
|
@ -1,6 +1,5 @@
|
|||
using UnityEngine;
|
||||
using TMPro;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public class MainCtrl : MonoBehaviour
|
||||
|
|
@ -51,11 +50,11 @@ public class MainCtrl : MonoBehaviour
|
|||
loginButton.SetActive(true);
|
||||
}
|
||||
}
|
||||
if(is_On)
|
||||
if (is_On)
|
||||
{
|
||||
if(title_Text.color.a >= 1)
|
||||
if (title_Text.color.a >= 1)
|
||||
{
|
||||
if(dtime > 1f)
|
||||
if (dtime > 1f)
|
||||
{
|
||||
is_On = !is_On;
|
||||
dtime = 0;
|
||||
|
|
@ -82,7 +81,7 @@ public class MainCtrl : MonoBehaviour
|
|||
}
|
||||
}
|
||||
}
|
||||
//#if UNITY_EDITOR
|
||||
//#if UNITY_EDITOR
|
||||
public void GestLogin()
|
||||
{
|
||||
gestLoginButton.SetActive(true);
|
||||
|
|
@ -95,7 +94,7 @@ public class MainCtrl : MonoBehaviour
|
|||
gameStartButton.SetActive(true);
|
||||
|
||||
}
|
||||
//#endif
|
||||
//#endif
|
||||
|
||||
public void FireBaseLogin()
|
||||
{
|
||||
|
|
@ -118,7 +117,7 @@ public class MainCtrl : MonoBehaviour
|
|||
resp.Request(req, (data) =>
|
||||
{
|
||||
//로그인 성공시
|
||||
if(data.status.Equals(200))
|
||||
if (data.status.Equals(200))
|
||||
{
|
||||
PlayerPrefs.SetString("uuid", data.uuid);
|
||||
Statics.uuid = data.uuid;
|
||||
|
|
@ -133,13 +132,13 @@ public class MainCtrl : MonoBehaviour
|
|||
Statics.gold = data.gold;
|
||||
Statics.cash = data.cash;
|
||||
|
||||
if(data.new_user) //½Å±Ô À¯Àú
|
||||
if (data.new_user) //½Å±Ô À¯Àú
|
||||
GameManager.Instance.NextScene(GameManager.eScene.Play);
|
||||
else
|
||||
GameManager.Instance.NextScene(GameManager.eScene.Game);
|
||||
|
||||
//상점 데이터
|
||||
foreach(var item in Statics.excelDatas.shopItemData)
|
||||
foreach (var item in Statics.excelDatas.shopItemData)
|
||||
{
|
||||
item.Value.id = -1;
|
||||
Statics.shopItems.Add(item.Key, item.Value);
|
||||
|
|
@ -149,7 +148,7 @@ public class MainCtrl : MonoBehaviour
|
|||
if (Statics.shopItems[data.shop_item[n].shop_item_data_id].buy_count == -1)
|
||||
continue;
|
||||
Statics.shopItems[data.shop_item[n].shop_item_data_id].buy_count--;
|
||||
if(Statics.shopItems[data.shop_item[n].shop_item_data_id].buy_count == 0)
|
||||
if (Statics.shopItems[data.shop_item[n].shop_item_data_id].buy_count == 0)
|
||||
{
|
||||
Statics.shopItems.Remove(data.shop_item[n].shop_item_data_id);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue