미니 게임 모드에서는 토스트 메시지 위치를 해당 영역까지 내려주시면 좋겠습니다.
This commit is contained in:
parent
dda6f5aa45
commit
fe1c2e06ca
|
|
@ -160,7 +160,8 @@ TextureImporter:
|
||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable: {}
|
nameFileIdTable:
|
||||||
|
Yellow btn_0: -8223418744081684699
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,8 @@ TextureImporter:
|
||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable: {}
|
nameFileIdTable:
|
||||||
|
money_gacha_0: -2564784036462105596
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,8 @@ TextureImporter:
|
||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable: {}
|
nameFileIdTable:
|
||||||
|
shop money icon 11_shop_0: -1600953111491908714
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,8 @@ TextureImporter:
|
||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable: {}
|
nameFileIdTable:
|
||||||
|
shop money icon 1_shop_0: 2323692047724358990
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,8 @@ TextureImporter:
|
||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable: {}
|
nameFileIdTable:
|
||||||
|
shop money icon 2_shop_0: -4648769833049646530
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|
|
||||||
|
|
@ -160,7 +160,8 @@ TextureImporter:
|
||||||
secondaryTextures: []
|
secondaryTextures: []
|
||||||
spriteCustomMetadata:
|
spriteCustomMetadata:
|
||||||
entries: []
|
entries: []
|
||||||
nameFileIdTable: {}
|
nameFileIdTable:
|
||||||
|
shop money icon 3_shop_0: -2795311806911105304
|
||||||
mipmapLimitGroupName:
|
mipmapLimitGroupName:
|
||||||
pSDRemoveMatte: 0
|
pSDRemoveMatte: 0
|
||||||
userData:
|
userData:
|
||||||
|
|
|
||||||
|
|
@ -781,11 +781,11 @@ MonoBehaviour:
|
||||||
m_Calls:
|
m_Calls:
|
||||||
- m_Target: {fileID: 1703079399}
|
- m_Target: {fileID: 1703079399}
|
||||||
m_TargetAssemblyTypeName: LobbyUI, Assembly-CSharp
|
m_TargetAssemblyTypeName: LobbyUI, Assembly-CSharp
|
||||||
m_MethodName: OnClick_Button
|
m_MethodName: Go_Home
|
||||||
m_Mode: 2
|
m_Mode: 1
|
||||||
m_Arguments:
|
m_Arguments:
|
||||||
m_ObjectArgument: {fileID: 21832900}
|
m_ObjectArgument: {fileID: 0}
|
||||||
m_ObjectArgumentAssemblyTypeName: UnityEngine.GameObject, UnityEngine
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
m_IntArgument: 0
|
m_IntArgument: 0
|
||||||
m_FloatArgument: 0
|
m_FloatArgument: 0
|
||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
|
|
@ -52953,10 +52953,10 @@ RectTransform:
|
||||||
- {fileID: 1902189015}
|
- {fileID: 1902189015}
|
||||||
m_Father: {fileID: 817765913}
|
m_Father: {fileID: 817765913}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
m_AnchorMin: {x: 0, y: 0}
|
m_AnchorMin: {x: 0, y: 0.5}
|
||||||
m_AnchorMax: {x: 1, y: 1}
|
m_AnchorMax: {x: 1, y: 0.5}
|
||||||
m_AnchoredPosition: {x: 0, y: 163}
|
m_AnchoredPosition: {x: 0, y: 162}
|
||||||
m_SizeDelta: {x: 0, y: 0}
|
m_SizeDelta: {x: 0, y: 1920}
|
||||||
m_Pivot: {x: 0.5, y: 0.5}
|
m_Pivot: {x: 0.5, y: 0.5}
|
||||||
--- !u!114 &1357839140
|
--- !u!114 &1357839140
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
public bool Check_Money(eMoney money, int amount, bool showToast = true)
|
public bool Check_Money(eMoney money, int amount, bool showToast = true, float toasty = 0f)
|
||||||
{
|
{
|
||||||
var enough = Get_Money(money) >= amount;
|
var enough = Get_Money(money) >= amount;
|
||||||
if (!enough && showToast)
|
if (!enough && showToast)
|
||||||
|
|
@ -175,22 +175,22 @@ public class SaveMgr : MonoBehaviourSingletonTemplate<SaveMgr>
|
||||||
switch (money)
|
switch (money)
|
||||||
{
|
{
|
||||||
case eMoney.AlbumOpen:
|
case eMoney.AlbumOpen:
|
||||||
LobbyUI.Ins.m_ToastUI.Set("하트가 부족합니다.");
|
LobbyUI.Ins.m_ToastUI.Set("하트가 부족합니다.", toasty);
|
||||||
break;
|
break;
|
||||||
case eMoney.Chat:
|
case eMoney.Chat:
|
||||||
LobbyUI.Ins.m_ToastUI.Set("채팅 코인이 부족합니다.");
|
LobbyUI.Ins.m_ToastUI.Set("채팅 코인이 부족합니다.", toasty);
|
||||||
break;
|
break;
|
||||||
case eMoney.Gacha:
|
case eMoney.Gacha:
|
||||||
LobbyUI.Ins.m_ToastUI.Set("뽑기 재화가 부족합니다.");
|
LobbyUI.Ins.m_ToastUI.Set("뽑기 재화가 부족합니다.", toasty);
|
||||||
break;
|
break;
|
||||||
case eMoney.Lucky:
|
case eMoney.Lucky:
|
||||||
LobbyUI.Ins.m_ToastUI.Set("럭키 포인트가 부족합니다.");
|
LobbyUI.Ins.m_ToastUI.Set("럭키 포인트가 부족합니다.", toasty);
|
||||||
break;
|
break;
|
||||||
case eMoney.MiniGameHP:
|
case eMoney.MiniGameHP:
|
||||||
case eMoney.ItemBomb:
|
case eMoney.ItemBomb:
|
||||||
case eMoney.ItemUmbrella:
|
case eMoney.ItemUmbrella:
|
||||||
case eMoney.ItemDildo:
|
case eMoney.ItemDildo:
|
||||||
LobbyUI.Ins.m_ToastUI.Set("재화가 부족합니다.");
|
LobbyUI.Ins.m_ToastUI.Set("재화가 부족합니다.", toasty);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,7 @@ public class GachaUI : uScrollViewMgr
|
||||||
public Slider slider_charge;
|
public Slider slider_charge;
|
||||||
|
|
||||||
DateTime GachaAutoRefillTime;
|
DateTime GachaAutoRefillTime;
|
||||||
float fRefillTime;
|
float fRefillTime, ToastY = -400f;
|
||||||
List<(eMoney, int)> list_log = new List<(eMoney, int)>();
|
List<(eMoney, int)> list_log = new List<(eMoney, int)>();
|
||||||
Coroutine co_sliderupdate;
|
Coroutine co_sliderupdate;
|
||||||
|
|
||||||
|
|
@ -45,7 +45,7 @@ public class GachaUI : uScrollViewMgr
|
||||||
{
|
{
|
||||||
SaveMgr.Ins.Add_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAutoRefill_Amount"));
|
SaveMgr.Ins.Add_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAutoRefill_Amount"));
|
||||||
SaveMgr.Ins.Save();
|
SaveMgr.Ins.Save();
|
||||||
LobbyUI.Ins.m_ToastUI.Set($"뽑기 재화 {table_GlobalValue.Ins.Get_Int("GachaAutoRefill_Amount")}개가 충전되었습니다.");
|
LobbyUI.Ins.m_ToastUI.Set($"뽑기 재화 {table_GlobalValue.Ins.Get_Int("GachaAutoRefill_Amount")}개가 충전되었습니다.", ToastY);
|
||||||
|
|
||||||
Set_Money();
|
Set_Money();
|
||||||
}
|
}
|
||||||
|
|
@ -149,7 +149,7 @@ public class GachaUI : uScrollViewMgr
|
||||||
|
|
||||||
public void OnClick_Lucky()
|
public void OnClick_Lucky()
|
||||||
{
|
{
|
||||||
if (SaveMgr.Ins.Check_Money(eMoney.Lucky, table_GlobalValue.Ins.Get_Int("LuckyPoint")))
|
if (SaveMgr.Ins.Check_Money(eMoney.Lucky, table_GlobalValue.Ins.Get_Int("LuckyPoint"), true, ToastY))
|
||||||
{
|
{
|
||||||
Init_GachaAnim();
|
Init_GachaAnim();
|
||||||
SaveMgr.Ins.Add_Money(eMoney.Lucky, -table_GlobalValue.Ins.Get_Int("LuckyPoint"));
|
SaveMgr.Ins.Add_Money(eMoney.Lucky, -table_GlobalValue.Ins.Get_Int("LuckyPoint"));
|
||||||
|
|
@ -166,7 +166,7 @@ public class GachaUI : uScrollViewMgr
|
||||||
ADInfo.Ins.Show_AD(false, () =>
|
ADInfo.Ins.Show_AD(false, () =>
|
||||||
{
|
{
|
||||||
SaveMgr.Ins.Add_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAD_Reward"));
|
SaveMgr.Ins.Add_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAD_Reward"));
|
||||||
LobbyUI.Ins.m_ToastUI.Set($"뽑기 재화 {table_GlobalValue.Ins.Get_Int("GachaAD_Reward")}개를 획득했습니다.");
|
LobbyUI.Ins.m_ToastUI.Set($"뽑기 재화 {table_GlobalValue.Ins.Get_Int("GachaAD_Reward")}개를 획득했습니다.", ToastY);
|
||||||
Set_Money();
|
Set_Money();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -174,7 +174,7 @@ public class GachaUI : uScrollViewMgr
|
||||||
|
|
||||||
public void OnClick_Gacha()
|
public void OnClick_Gacha()
|
||||||
{
|
{
|
||||||
if (!isGacha && SaveMgr.Ins.Check_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAmount")))
|
if (!isGacha && SaveMgr.Ins.Check_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAmount"), true, ToastY))
|
||||||
StartCoroutine(Co_Gacha());
|
StartCoroutine(Co_Gacha());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,12 +6,23 @@ public class ToastUI : MonoBehaviour
|
||||||
public RectTransform rt_bg;
|
public RectTransform rt_bg;
|
||||||
public TextMeshProUGUI t_mgs;
|
public TextMeshProUGUI t_mgs;
|
||||||
|
|
||||||
public void Set(string text)
|
Vector2 basePos; // 기준 위치 저장용
|
||||||
|
|
||||||
|
private void Awake()
|
||||||
|
{
|
||||||
|
basePos = (transform as RectTransform).anchoredPosition;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void Set(string text, float y = 0f)
|
||||||
{
|
{
|
||||||
gameObject.SetActive(true);
|
gameObject.SetActive(true);
|
||||||
t_mgs.text = text;
|
t_mgs.text = text;
|
||||||
rt_bg.sizeDelta = new Vector2(rt_bg.sizeDelta.x, t_mgs.preferredHeight + 50);
|
rt_bg.sizeDelta = new Vector2(rt_bg.sizeDelta.x, t_mgs.preferredHeight + 50);
|
||||||
|
|
||||||
|
// 위치 조정 (y값 있으면 기준 위치에서 더함)
|
||||||
|
var rt = transform as RectTransform;
|
||||||
|
rt.anchoredPosition = basePos + new Vector2(0f, y);
|
||||||
|
|
||||||
if (IsInvoking()) CancelInvoke();
|
if (IsInvoking()) CancelInvoke();
|
||||||
Invoke("Off", 3f);
|
Invoke("Off", 3f);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue