diff --git a/Assets/ResWork/Table/Export/GlobalValue.json b/Assets/ResWork/Table/Export/GlobalValue.json index 9d1d98c..a026c77 100644 --- a/Assets/ResWork/Table/Export/GlobalValue.json +++ b/Assets/ResWork/Table/Export/GlobalValue.json @@ -1 +1 @@ -[{"s_ID": "LuckyPoint", "n_Value": "100", "exception": "럭키 포인트 100% 필요량"}, {"s_ID": "LuckyBlockWithdMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (가로)"}, {"s_ID": "LuckyBlockWithdMax", "n_Value": "251", "exception": "럭키 블록 최대 크기 (가로)"}, {"s_ID": "LuckyBlockHeightMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (세로)"}, {"s_ID": "LuckyBlockHeightMax", "n_Value": "100", "exception": "럭키 블록 최대 크기 (세로)"}, {"s_ID": "LuckyBlockSpeedMin", "n_Value": "150", "exception": "럭키 블록 최소 스피드"}, {"s_ID": "LuckyBlockSpeedMax", "n_Value": "250", "exception": "럭키 블록 최대 스피드"}, {"s_ID": "GachaAmount", "n_Value": "5", "exception": "가챠에 필요한 가챠 코인 개수"}, {"s_ID": "GachaAD_Reward", "n_Value": "5", "exception": "가챠 광고 가챠 코인 보상 개수"}, {"s_ID": "ADSec_Gacha", "n_Value": "600", "exception": "가챠 광고 시간 (초)"}, {"s_ID": "ADSec_Shop", "n_Value": "600", "exception": "상점 광고 시간 (초)"}, {"s_ID": "MiniGameHP", "n_Value": "10", "exception": "미니 게임 HP"}, {"s_ID": "MiniGameSpeedMin", "n_Value": "0.2", "exception": "미니 게임 방해물 최소 속도"}, {"s_ID": "MiniGameSpeedMax", "n_Value": "1", "exception": "미니 게임 방해물 최대 속도"}, {"s_ID": "MiniGameWeight_White", "n_Value": "100", "exception": "미니 게임 흰 액체 등장 확률"}, {"s_ID": "MiniGameWeight_Red", "n_Value": "50", "exception": "미니 게임 빨간 액체 등장 확률"}, {"s_ID": "MiniGameWeight_HpHeal", "n_Value": "5", "exception": "미니 게임 체력 회복 등장 확률"}, {"s_ID": "MiniGameWeight_AlbumOpen", "n_Value": "5", "exception": "미니 게임 앨범 오픈 재화 등장 확률"}, {"s_ID": "MiniGameWeight_ChatCoin", "n_Value": "5", "exception": "미니 게임 채팅 코인 등장 확률"}, {"s_ID": "MiniGameWeight_GachaCoin", "n_Value": "5", "exception": "미니 게임 가챠 코인 등장 확률"}, {"s_ID": "MiniGameWeight_ItemBomb", "n_Value": "1", "exception": "미니 게임 폭탄 아이템 등장 확률"}, {"s_ID": "MiniGameWeight_ItemUmbrella", "n_Value": "1", "exception": "미니 게임 우산 아이템 등장 확률"}, {"s_ID": "MiniGameWeight_ItemDildo", "n_Value": "1", "exception": "미니 게임 딜도 아이템 등장 확률"}, {"s_ID": "MiniGamePCSpeed", "n_Value": "500", "exception": "미니 게임 PC 스피드"}, {"s_ID": "MiniGame_White_DMG", "n_Value": "1", "exception": "미니 게임 흰 액체 데미지"}, {"s_ID": "MiniGame_Red_DMG", "n_Value": "2", "exception": "미니 게임 빨간 액체 데미지"}, {"s_ID": "MiniGame_Heal", "n_Value": "1", "exception": "미니 게임 체력 회복량"}, {"s_ID": "MiniGame_Heart_Amount", "n_Value": "1", "exception": "미니 게임 앨범 오픈 재화 획득량"}, {"s_ID": "MiniGame_ChatCoin_Amount", "n_Value": "1", "exception": "미니 게임 채팅 코인 획득량"}, {"s_ID": "MiniGame_GachaCoin_Amount", "n_Value": "1", "exception": "미니 게임 가챠 코인 획득량"}, {"s_ID": "MiniGame_Obtacle_Create_Gap", "n_Value": "0.5", "exception": "1. 최초 생성 시간 (초)"}, {"s_ID": "MiniGame_Obtacle_Gap_Reduce", "n_Value": "0.05", "exception": "2. 생성시간 감소 값 (초)"}, {"s_ID": "MiniGame_Obtacle_Gap_Time", "n_Value": "10", "exception": "3. 생성 시간 감소 주기 (초)"}, {"s_ID": "MiniGame_Obtacle_Gap_LimitTime", "n_Value": "0.05", "exception": "4. 최대 생성 제한 시간 (초)"}, {"s_ID": "MiniGame_TotalEnterMoney", "n_Value": "5", "exception": "미니게임 체력 총 개수"}, {"s_ID": "MiniGame_EnterMoney_Time", "n_Value": "1200", "exception": "미니게임 체력 재충전 시간 (초)"}, {"s_ID": "ShieldTime", "n_Value": "10", "exception": "미니게임 우산 보호막 시간 (초)"}] \ No newline at end of file +[{"s_ID": "LuckyPoint", "n_Value": "100", "exception": "럭키 포인트 100% 필요량"}, {"s_ID": "LuckyBlockWithdMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (가로)"}, {"s_ID": "LuckyBlockWithdMax", "n_Value": "251", "exception": "럭키 블록 최대 크기 (가로)"}, {"s_ID": "LuckyBlockHeightMin", "n_Value": "100", "exception": "럭키 블록 최소 크기 (세로)"}, {"s_ID": "LuckyBlockHeightMax", "n_Value": "100", "exception": "럭키 블록 최대 크기 (세로)"}, {"s_ID": "LuckyBlockSpeedMin", "n_Value": "150", "exception": "럭키 블록 최소 스피드"}, {"s_ID": "LuckyBlockSpeedMax", "n_Value": "250", "exception": "럭키 블록 최대 스피드"}, {"s_ID": "GachaAmount", "n_Value": "5", "exception": "가챠에 필요한 가챠 코인 개수"}, {"s_ID": "GachaAD_Reward", "n_Value": "1", "exception": "가챠 광고 가챠 코인 보상 개수"}, {"s_ID": "GachaAD_DelayTime", "n_Value": "10", "exception": "가챠 광고 딜레이 시간 (초)"}, {"s_ID": "ADSec_Gacha", "n_Value": "600", "exception": "가챠 광고 시간 (초)"}, {"s_ID": "ADSec_Shop", "n_Value": "600", "exception": "상점 광고 시간 (초)"}, {"s_ID": "MiniGameHP", "n_Value": "10", "exception": "미니 게임 HP"}, {"s_ID": "MiniGameSpeedMin", "n_Value": "0.2", "exception": "미니 게임 방해물 최소 속도"}, {"s_ID": "MiniGameSpeedMax", "n_Value": "1", "exception": "미니 게임 방해물 최대 속도"}, {"s_ID": "MiniGameWeight_White", "n_Value": "100", "exception": "미니 게임 흰 액체 등장 확률"}, {"s_ID": "MiniGameWeight_Red", "n_Value": "50", "exception": "미니 게임 빨간 액체 등장 확률"}, {"s_ID": "MiniGameWeight_HpHeal", "n_Value": "5", "exception": "미니 게임 체력 회복 등장 확률"}, {"s_ID": "MiniGameWeight_AlbumOpen", "n_Value": "5", "exception": "미니 게임 앨범 오픈 재화 등장 확률"}, {"s_ID": "MiniGameWeight_ChatCoin", "n_Value": "5", "exception": "미니 게임 채팅 코인 등장 확률"}, {"s_ID": "MiniGameWeight_GachaCoin", "n_Value": "5", "exception": "미니 게임 가챠 코인 등장 확률"}, {"s_ID": "MiniGameWeight_ItemBomb", "n_Value": "1", "exception": "미니 게임 폭탄 아이템 등장 확률"}, {"s_ID": "MiniGameWeight_ItemUmbrella", "n_Value": "1", "exception": "미니 게임 우산 아이템 등장 확률"}, {"s_ID": "MiniGameWeight_ItemDildo", "n_Value": "1", "exception": "미니 게임 딜도 아이템 등장 확률"}, {"s_ID": "MiniGamePCSpeed", "n_Value": "500", "exception": "미니 게임 PC 스피드"}, {"s_ID": "MiniGame_White_DMG", "n_Value": "1", "exception": "미니 게임 흰 액체 데미지"}, {"s_ID": "MiniGame_Red_DMG", "n_Value": "2", "exception": "미니 게임 빨간 액체 데미지"}, {"s_ID": "MiniGame_Heal", "n_Value": "1", "exception": "미니 게임 체력 회복량"}, {"s_ID": "MiniGame_Heart_Amount", "n_Value": "1", "exception": "미니 게임 앨범 오픈 재화 획득량"}, {"s_ID": "MiniGame_ChatCoin_Amount", "n_Value": "1", "exception": "미니 게임 채팅 코인 획득량"}, {"s_ID": "MiniGame_GachaCoin_Amount", "n_Value": "1", "exception": "미니 게임 가챠 코인 획득량"}, {"s_ID": "MiniGame_Obtacle_Create_Gap", "n_Value": "0.5", "exception": "1. 최초 생성 시간 (초)"}, {"s_ID": "MiniGame_Obtacle_Gap_Reduce", "n_Value": "0.05", "exception": "2. 생성시간 감소 값 (초)"}, {"s_ID": "MiniGame_Obtacle_Gap_Time", "n_Value": "10", "exception": "3. 생성 시간 감소 주기 (초)"}, {"s_ID": "MiniGame_Obtacle_Gap_LimitTime", "n_Value": "0.05", "exception": "4. 최대 생성 제한 시간 (초)"}, {"s_ID": "MiniGame_TotalEnterMoney", "n_Value": "5", "exception": "미니게임 체력 총 개수"}, {"s_ID": "MiniGame_EnterMoney_Time", "n_Value": "1200", "exception": "미니게임 체력 재충전 시간 (초)"}, {"s_ID": "ShieldTime", "n_Value": "10", "exception": "미니게임 우산 보호막 시간 (초)"}] \ No newline at end of file diff --git a/Assets/ResWork/Table/SheGotWet.xlsm b/Assets/ResWork/Table/SheGotWet.xlsm index c605de1..a9357cc 100644 Binary files a/Assets/ResWork/Table/SheGotWet.xlsm and b/Assets/ResWork/Table/SheGotWet.xlsm differ diff --git a/Assets/Scenes/SampleScene.unity b/Assets/Scenes/SampleScene.unity index bdaad41..2792f0b 100644 --- a/Assets/Scenes/SampleScene.unity +++ b/Assets/Scenes/SampleScene.unity @@ -8618,6 +8618,81 @@ CanvasRenderer: m_PrefabAsset: {fileID: 0} m_GameObject: {fileID: 301452043} m_CullTransparentMesh: 1 +--- !u!1 &303838225 +GameObject: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + serializedVersion: 6 + m_Component: + - component: {fileID: 303838226} + - component: {fileID: 303838228} + - component: {fileID: 303838227} + m_Layer: 5 + m_Name: New Image + m_TagString: Untagged + m_Icon: {fileID: 0} + m_NavMeshLayer: 0 + m_StaticEditorFlags: 0 + m_IsActive: 1 +--- !u!224 &303838226 +RectTransform: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 303838225} + m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} + m_LocalPosition: {x: 0, y: 0, z: 0} + m_LocalScale: {x: 0.5, y: 0.5, z: 0.5} + m_ConstrainProportionsScale: 1 + m_Children: [] + m_Father: {fileID: 1005841923} + m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} + m_AnchorMin: {x: 0, y: 0} + m_AnchorMax: {x: 0, y: 0} + m_AnchoredPosition: {x: 110, y: 51} + m_SizeDelta: {x: 112, y: 114} + m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &303838227 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 303838225} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} + m_Name: + m_EditorClassIdentifier: + m_Material: {fileID: 0} + m_Color: {r: 1, g: 1, b: 1, a: 1} + m_RaycastTarget: 0 + m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} + m_Maskable: 1 + m_OnCullStateChanged: + m_PersistentCalls: + m_Calls: [] + m_Sprite: {fileID: 21300000, guid: 32a7825797de0fb4a8f0cbf27f95ea48, type: 3} + m_Type: 0 + m_PreserveAspect: 0 + m_FillCenter: 1 + m_FillMethod: 4 + m_FillAmount: 1 + m_FillClockwise: 1 + m_FillOrigin: 0 + m_UseSpriteMesh: 0 + m_PixelsPerUnitMultiplier: 1 +--- !u!222 &303838228 +CanvasRenderer: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 303838225} + m_CullTransparentMesh: 1 --- !u!1 &306046132 GameObject: m_ObjectHideFlags: 0 @@ -24391,6 +24466,7 @@ RectTransform: m_Children: - {fileID: 1425722740} - {fileID: 1250211779} + - {fileID: 303838226} m_Father: {fileID: 1898552898} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_AnchorMin: {x: 0.5, y: 0} @@ -30918,9 +30994,9 @@ RectTransform: m_Children: [] m_Father: {fileID: 1005841923} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0.5} - m_AnchorMax: {x: 0, y: 0.5} - m_AnchoredPosition: {x: 86.2, y: 3.8} + m_AnchorMin: {x: 0.5, y: 1} + m_AnchorMax: {x: 0.5, y: 1} + m_AnchoredPosition: {x: 0, y: -46.2} m_SizeDelta: {x: 70, y: 46} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1250211780 @@ -35176,7 +35252,7 @@ GameObject: - component: {fileID: 1425722742} - component: {fileID: 1425722741} m_Layer: 5 - m_Name: btnName + m_Name: t_adrewardamount m_TagString: Untagged m_Icon: {fileID: 0} m_NavMeshLayer: 0 @@ -35196,10 +35272,10 @@ RectTransform: m_Children: [] m_Father: {fileID: 1005841923} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 35.800003, y: 2.0999985} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 1, y: 0} + m_AnchorMax: {x: 1, y: 0} + m_AnchoredPosition: {x: -160.7, y: 51.9} + m_SizeDelta: {x: 393, y: 158} m_Pivot: {x: 0.5, y: 0.5} --- !u!114 &1425722741 MonoBehaviour: @@ -35221,7 +35297,7 @@ MonoBehaviour: m_OnCullStateChanged: m_PersistentCalls: m_Calls: [] - m_text: "\uC7AC\uD654 \uCDA9\uC804" + m_text: "x00 \uCDA9\uC804" m_isRightToLeft: 0 m_fontAsset: {fileID: 11400000, guid: 3055b5c28f94e6c4ea6b9a379bb315a5, type: 2} m_sharedMaterial: {fileID: -3574565475228871172, guid: 3055b5c28f94e6c4ea6b9a379bb315a5, type: 2} @@ -49122,6 +49198,7 @@ MonoBehaviour: - {fileID: 1604923547} texts: - {fileID: 1754370771} + - {fileID: 1425722741} texts_luckypoint: - {fileID: 1038951387} - {fileID: 1589332541} diff --git a/Assets/Scripts/UI/GachaUI.cs b/Assets/Scripts/UI/GachaUI.cs index f7e0768..38186f6 100644 --- a/Assets/Scripts/UI/GachaUI.cs +++ b/Assets/Scripts/UI/GachaUI.cs @@ -1,8 +1,10 @@ +using System; using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; +using Random = UnityEngine.Random; public class GachaUI : uScrollViewMgr { @@ -11,12 +13,19 @@ public class GachaUI : uScrollViewMgr public Image[] images_slider; // 알파 슬라이더 이미지들 public GameObject[] gos_sliderhandle; public TextMeshProUGUI[] texts_money; // 0 앨범 오픈 재화, 1 챗 코인, 2 가챠 코인 - public TextMeshProUGUI[] texts; // 0 럭키 % + public TextMeshProUGUI[] texts; // 0 럭키 %, 1 광고 충전량, 2 가챠 필요량 public TextMeshProUGUI[] texts_luckypoint; // 획득한 럭키 포인트들 public GameObject go_CanEnterLuckyGame; + DateTime GachaADDelayTime; List<(eMoney, int)> list_log = new List<(eMoney, int)>(); + private void Start() + { + texts[1].text = $"x{table_GlobalValue.Ins.Get_Float("GachaAD_Reward")} 충전"; + texts[2].text = $"x{table_GlobalValue.Ins.Get_Float("GachaAmount")}"; + } + public void Set() { gameObject.SetActive(true); @@ -121,16 +130,19 @@ public class GachaUI : uScrollViewMgr public void OnClick_AD() { - if (SaveMgr.Ins.CanShowGachaAD()) + var cal = GachaADDelayTime - InternetTime.Ins.Time; + if (SaveMgr.Ins.CanShowGachaAD() && cal.TotalSeconds <= 0) { ADInfo.Ins.Show_AD(false, () => { + GachaADDelayTime = InternetTime.Ins.Time.AddSeconds(table_GlobalValue.Ins.Get_Int("GachaAD_DelayTime")); SaveMgr.Ins.Add_Money(eMoney.Gacha, table_GlobalValue.Ins.Get_Int("GachaAD_Reward")); - SaveMgr.Ins.Add_GachaADTime(table_GlobalValue.Ins.Get_Int("ADSec_Gacha")); LobbyUI.Ins.m_ToastUI.Set($"가챠 코인 {table_GlobalValue.Ins.Get_Int("GachaAD_Reward")}개를 획득했습니다."); Set_Money(); }); } + else + LobbyUI.Ins.m_ToastUI.Set($"{cal} 남음"); } public void OnClick_Gacha() @@ -158,15 +170,16 @@ public class GachaUI : uScrollViewMgr SaveMgr.Ins.Add_Money(eMoney.Lucky, reward.Item3); SaveMgr.Ins.Save(); list_log.Add((reward.Item1, reward.Item2)); - for (int i = 0; i < texts_luckypoint.Length; i++) - { - if (texts_luckypoint[i].alpha <= 0f) + if (reward.Item3 > 0) + for (int i = 0; i < texts_luckypoint.Length; i++) { - texts_luckypoint[i].text = reward.Item3.ToString(); - texts_luckypoint[i].GetComponent().Play(); - break; + if (texts_luckypoint[i].alpha <= 0f) + { + texts_luckypoint[i].text = reward.Item3.ToString(); + texts_luckypoint[i].GetComponent().Play(); + break; + } } - } //list_log.Add((eMoney.Lucky, reward.Item3)); Set_ScrollView(list_log); Set_Vertical_ScrollEnd(0);