"재화 다 쓰면 지금 5개가 풀로 충전되는데 1개만 충전되고, 30초마다 1개씩 충전되서 최대 5개까지 충전되게 수정 가능할까요?
( 미니게임 패키지를 안사도 불편함이 거의 없어서 패키지를 안살거 같아서 입니다.)"
This commit is contained in:
parent
7851da177c
commit
10ef031392
|
|
@ -19062,6 +19062,10 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Sparkle_ellow
|
value: Sparkle_ellow
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4033412786151888123, guid: 49057b33ea71fbb4da4e8f02a8db9f28, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4123381426564554493, guid: 49057b33ea71fbb4da4e8f02a8db9f28, type: 3}
|
- target: {fileID: 4123381426564554493, guid: 49057b33ea71fbb4da4e8f02a8db9f28, type: 3}
|
||||||
propertyPath: m_Materials.Array.size
|
propertyPath: m_Materials.Array.size
|
||||||
value: 1
|
value: 1
|
||||||
|
|
@ -31912,8 +31916,8 @@ RectTransform:
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 495464322}
|
- {fileID: 495464322}
|
||||||
- {fileID: 1456577417}
|
- {fileID: 1456577417}
|
||||||
- {fileID: 952113712}
|
|
||||||
- {fileID: 855260481}
|
- {fileID: 855260481}
|
||||||
|
- {fileID: 952113712}
|
||||||
- {fileID: 1784439583}
|
- {fileID: 1784439583}
|
||||||
- {fileID: 662108378}
|
- {fileID: 662108378}
|
||||||
m_Father: {fileID: 1861711112}
|
m_Father: {fileID: 1861711112}
|
||||||
|
|
@ -32300,6 +32304,10 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Shine_pink
|
value: Shine_pink
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 4109064841345302812, guid: 2a409ab125c5216449bc5f005ec045f0, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 4109064841345302813, guid: 2a409ab125c5216449bc5f005ec045f0, type: 3}
|
- target: {fileID: 4109064841345302813, guid: 2a409ab125c5216449bc5f005ec045f0, type: 3}
|
||||||
propertyPath: m_LocalScale.x
|
propertyPath: m_LocalScale.x
|
||||||
value: 50
|
value: 50
|
||||||
|
|
@ -35626,6 +35634,10 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Shine_ellow
|
value: Shine_ellow
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 7938384439400024403, guid: b6e54acc881a03c4a9719b161a25a3e3, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_RemovedGameObjects: []
|
m_RemovedGameObjects: []
|
||||||
m_AddedGameObjects: []
|
m_AddedGameObjects: []
|
||||||
|
|
@ -57758,6 +57770,10 @@ PrefabInstance:
|
||||||
propertyPath: m_Name
|
propertyPath: m_Name
|
||||||
value: Shine_blue
|
value: Shine_blue
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 245581523800709616, guid: 9442d241d2d8ecc47b49f256b55325c6, type: 3}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 245581523800709617, guid: 9442d241d2d8ecc47b49f256b55325c6, type: 3}
|
- target: {fileID: 245581523800709617, guid: 9442d241d2d8ecc47b49f256b55325c6, type: 3}
|
||||||
propertyPath: m_LocalScale.x
|
propertyPath: m_LocalScale.x
|
||||||
value: 50
|
value: 50
|
||||||
|
|
@ -67213,9 +67229,7 @@ MonoBehaviour:
|
||||||
- {fileID: 278813020}
|
- {fileID: 278813020}
|
||||||
- {fileID: 2057533035}
|
- {fileID: 2057533035}
|
||||||
- {fileID: 1227751126}
|
- {fileID: 1227751126}
|
||||||
gos_minigame:
|
go_minigamechargingbtn: {fileID: 2079832695}
|
||||||
- {fileID: 168358557}
|
|
||||||
- {fileID: 2079832695}
|
|
||||||
slider_minigamecharging: {fileID: 404172103}
|
slider_minigamecharging: {fileID: 404172103}
|
||||||
t_minigamechargingtime: {fileID: 644731195}
|
t_minigamechargingtime: {fileID: 644731195}
|
||||||
m_AttandanceUI: {fileID: 388368217}
|
m_AttandanceUI: {fileID: 388368217}
|
||||||
|
|
@ -68421,7 +68435,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1}
|
m_Color: {r: 0.21960786, g: 0.21960786, b: 0.21960786, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
|
|
@ -80539,8 +80553,8 @@ MonoBehaviour:
|
||||||
- {fileID: 1988220643}
|
- {fileID: 1988220643}
|
||||||
- {fileID: 495464323}
|
- {fileID: 495464323}
|
||||||
- {fileID: 1456577418}
|
- {fileID: 1456577418}
|
||||||
- {fileID: 952113713}
|
|
||||||
- {fileID: 855260482}
|
- {fileID: 855260482}
|
||||||
|
- {fileID: 952113713}
|
||||||
- {fileID: 1044263884}
|
- {fileID: 1044263884}
|
||||||
--- !u!1 &2014651059
|
--- !u!1 &2014651059
|
||||||
GameObject:
|
GameObject:
|
||||||
|
|
@ -83046,7 +83060,7 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
m_Color: {r: 1, g: 1, b: 1, a: 1}
|
||||||
m_RaycastTarget: 1
|
m_RaycastTarget: 0
|
||||||
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
|
||||||
m_Maskable: 1
|
m_Maskable: 1
|
||||||
m_OnCullStateChanged:
|
m_OnCullStateChanged:
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ public class ADInfo : MonoBehaviourSingletonTemplate<ADInfo>,
|
||||||
// ===========================================================
|
// ===========================================================
|
||||||
public void OnUnityAdsShowComplete(string placementId, UnityAdsShowCompletionState showCompletionState)
|
public void OnUnityAdsShowComplete(string placementId, UnityAdsShowCompletionState showCompletionState)
|
||||||
{
|
{
|
||||||
if (placementId == placement_Rewarded && showCompletionState == UnityAdsShowCompletionState.COMPLETED)
|
if (showCompletionState == UnityAdsShowCompletionState.COMPLETED)
|
||||||
GetReward = 1;
|
GetReward = 1;
|
||||||
else
|
else
|
||||||
GetReward = 2;
|
GetReward = 2;
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@ using UnityEngine.UI;
|
||||||
public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
||||||
{
|
{
|
||||||
[SerializeField] TextMeshProUGUI[] texts_money; // 0 앨범 개방 재화, 1 채팅 재화, 2 뽑기 재화, 3 4 미니게임 체력
|
[SerializeField] TextMeshProUGUI[] texts_money; // 0 앨범 개방 재화, 1 채팅 재화, 2 뽑기 재화, 3 4 미니게임 체력
|
||||||
public GameObject[] gos_minigame; // 0 입장, 1 차징
|
public GameObject go_minigamechargingbtn;
|
||||||
public Slider slider_minigamecharging;
|
public Slider slider_minigamecharging;
|
||||||
public TextMeshProUGUI t_minigamechargingtime;
|
public TextMeshProUGUI t_minigamechargingtime;
|
||||||
float minigamechargingTime = 0f;
|
float minigamechargingTime = 0f;
|
||||||
|
|
@ -35,30 +35,31 @@ public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
||||||
|
|
||||||
public Image[] images_botbtn; // 0 앨범, 1 상점
|
public Image[] images_botbtn; // 0 앨범, 1 상점
|
||||||
int CurMenu = 2;
|
int CurMenu = 2;
|
||||||
|
bool bUpdate = false;
|
||||||
|
|
||||||
IEnumerator Start()
|
IEnumerator Start()
|
||||||
{
|
{
|
||||||
|
bUpdate = false;
|
||||||
|
|
||||||
yield return null;
|
yield return null;
|
||||||
if (SaveMgr.Ins.CanGet_Attandance())
|
if (SaveMgr.Ins.CanGet_Attandance())
|
||||||
m_AttandanceUI.Set();
|
m_AttandanceUI.Set();
|
||||||
ADInfo.Ins.Set_Banner(true);
|
ADInfo.Ins.Set_Banner(true);
|
||||||
m_LobbyCenterProfileUI.Set();
|
m_LobbyCenterProfileUI.Set();
|
||||||
minigamechargingTime = (float)(SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time).TotalMilliseconds * 0.001f;
|
minigamechargingTime = (float)(SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time).TotalMilliseconds * 0.001f;
|
||||||
DSUtil.InActivateGameObjects(gos_minigame, minigamechargingTime > 0f ? 1 : 0);
|
go_minigamechargingbtn.SetActive(minigamechargingTime > 0f);
|
||||||
//Act_Repeat_for1sec = () =>
|
if (minigamechargingTime <= 0f) Check_MiniGameCharging();
|
||||||
//{
|
|
||||||
// if (SaveMgr.Ins.Get_Money(eMoney.MiniGameHP) <= 0)
|
bUpdate = true;
|
||||||
// {
|
|
||||||
// var cal =
|
|
||||||
// }
|
|
||||||
//};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
{
|
{
|
||||||
base.Update();
|
base.Update();
|
||||||
|
if (!bUpdate) return;
|
||||||
|
|
||||||
var cal = SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time;
|
var cal = SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time;
|
||||||
if ((cal.TotalMilliseconds > 0 || minigamechargingTime > 0) && !SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, false))
|
if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, table_GlobalValue.Ins.Get_Int("MiniGame_TotalEnterMoney"), false))
|
||||||
{
|
{
|
||||||
minigamechargingTime -= Time.deltaTime;
|
minigamechargingTime -= Time.deltaTime;
|
||||||
t_minigamechargingtime.text = minigamechargingTime > 0f ? $"{minigamechargingTime:F2}s" : "0s";
|
t_minigamechargingtime.text = minigamechargingTime > 0f ? $"{minigamechargingTime:F2}s" : "0s";
|
||||||
|
|
@ -66,20 +67,30 @@ public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
||||||
slider_minigamecharging.value = DSUtil.Get_SliderValue(minigamechargingTime / fRefillTimeMax);
|
slider_minigamecharging.value = DSUtil.Get_SliderValue(minigamechargingTime / fRefillTimeMax);
|
||||||
|
|
||||||
if (cal.TotalSeconds <= 0 && minigamechargingTime <= 0f)
|
if (cal.TotalSeconds <= 0 && minigamechargingTime <= 0f)
|
||||||
MiniGameAllCharging();
|
MiniGameCharging();
|
||||||
}
|
}
|
||||||
else if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, false))
|
|
||||||
MiniGameAllCharging();
|
|
||||||
}
|
}
|
||||||
void MiniGameAllCharging()
|
void MiniGameCharging()
|
||||||
{
|
{
|
||||||
SaveMgr.Ins.Set_Money(eMoney.MiniGameHP, table_GlobalValue.Ins.Get_Int("MiniGame_TotalEnterMoney"));
|
SaveMgr.Ins.Add_Money(eMoney.MiniGameHP);
|
||||||
SaveMgr.Ins.Save();
|
m_ToastUI.Set($"미니게임 체력이 충전되었습니다.");
|
||||||
m_ToastUI.Set($"미니게임 체력이 모두 충전되었습니다.");
|
Check_MiniGameCharging();
|
||||||
if (CurMenu == 2)
|
|
||||||
DSUtil.InActivateGameObjects(gos_minigame, minigamechargingTime > 0f ? 1 : 0);
|
|
||||||
|
|
||||||
Set_Money();
|
Set_Money();
|
||||||
|
SaveMgr.Ins.Save();
|
||||||
|
}
|
||||||
|
void Check_MiniGameCharging()
|
||||||
|
{
|
||||||
|
if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, table_GlobalValue.Ins.Get_Int("MiniGame_TotalEnterMoney"), false))
|
||||||
|
{
|
||||||
|
var cal = SaveMgr.Ins.Get_MiniGameTime() - InternetTime.Ins.Time;
|
||||||
|
if (cal.TotalMilliseconds <= 0f)
|
||||||
|
{
|
||||||
|
SaveMgr.Ins.Set_MiniGameTime();
|
||||||
|
minigamechargingTime = table_GlobalValue.Ins.Get_Int("MiniGame_EnterMoney_Time");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (CurMenu == 2) go_minigamechargingbtn.SetActive(minigamechargingTime > 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void OnClick_Button(GameObject btn)
|
public void OnClick_Button(GameObject btn)
|
||||||
|
|
@ -161,12 +172,7 @@ public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
||||||
public void MiniGameResult()
|
public void MiniGameResult()
|
||||||
{
|
{
|
||||||
SaveMgr.Ins.Add_Money(eMoney.MiniGameHP, -1);
|
SaveMgr.Ins.Add_Money(eMoney.MiniGameHP, -1);
|
||||||
if (!SaveMgr.Ins.Check_Money(eMoney.MiniGameHP, 1, false))
|
Check_MiniGameCharging();
|
||||||
{
|
|
||||||
SaveMgr.Ins.Set_MiniGameTime();
|
|
||||||
minigamechargingTime = table_GlobalValue.Ins.Get_Int("MiniGame_EnterMoney_Time");
|
|
||||||
DSUtil.InActivateGameObjects(gos_minigame, 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Go_Home()
|
public void Go_Home()
|
||||||
|
|
@ -176,7 +182,7 @@ public class LobbyUI : MonoBehaviourSingletonTemplate<LobbyUI>
|
||||||
m_GachaUI.gameObject.SetActive(false);
|
m_GachaUI.gameObject.SetActive(false);
|
||||||
go_shop.SetActive(false);
|
go_shop.SetActive(false);
|
||||||
DSUtil.ActivateGameObjects(gos_homeBot);
|
DSUtil.ActivateGameObjects(gos_homeBot);
|
||||||
DSUtil.InActivateGameObjects(gos_minigame, minigamechargingTime > 0f ? 1 : 0);
|
go_minigamechargingbtn.SetActive(minigamechargingTime > 0f);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Go_Album(int girlid)
|
public void Go_Album(int girlid)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue