게임 컨텐츠 완료

This commit is contained in:
Ino 2025-09-06 09:34:59 +09:00
parent dcd13df57d
commit a91f9f1d20
6 changed files with 181 additions and 15 deletions

View File

@ -55,6 +55,9 @@ MonoBehaviour:
i_face: {fileID: 3508626206348913560}
t_price: {fileID: 6235409697429010174}
go_lock: {fileID: 1144972893618915521}
go_buybtn: {fileID: 3789136453484296961}
go_pricedia: {fileID: 8051172841433523431}
go_priceheart: {fileID: 8361176392770920911}
mat_blur: {fileID: 2100000, guid: e457caa43c8e39a4ea1bbc7d8c7d8b5b, type: 2}
--- !u!1 &1144972893618915521
GameObject:
@ -488,7 +491,7 @@ MonoBehaviour:
m_Calls:
- m_Target: {fileID: 4055841235679152911}
m_TargetAssemblyTypeName: CollectionCard, Assembly-CSharp
m_MethodName: OnClick_CollectionCard
m_MethodName: OnClick_Buy
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
@ -633,7 +636,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 0
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
@ -692,7 +695,19 @@ MonoBehaviour:
m_TargetGraphic: {fileID: 4742576220681598097}
m_OnClick:
m_PersistentCalls:
m_Calls: []
m_Calls:
- m_Target: {fileID: 4055841235679152911}
m_TargetAssemblyTypeName: CollectionCard, Assembly-CSharp
m_MethodName: OnClick_CollectionCard
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!1 &7498769308368048537
GameObject:
m_ObjectHideFlags: 0
@ -724,6 +739,7 @@ RectTransform:
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 3619532318595060570}
- {fileID: 5281245944781004633}
- {fileID: 3140152840256599788}
m_Father: {fileID: 2703057293387824824}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -782,7 +798,7 @@ GameObject:
- component: {fileID: 5005730506415535306}
- component: {fileID: 3395729150971422294}
m_Layer: 5
m_Name: New Image
m_Name: i_price
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
@ -845,6 +861,81 @@ MonoBehaviour:
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!1 &8361176392770920911
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5281245944781004633}
- component: {fileID: 3239210636383207649}
- component: {fileID: 8725142076984076305}
m_Layer: 5
m_Name: i_price (1)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5281245944781004633
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8361176392770920911}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3423320848937281027}
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: 29.8, y: 0}
m_SizeDelta: {x: 35, y: 35}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3239210636383207649
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8361176392770920911}
m_CullTransparentMesh: 1
--- !u!114 &8725142076984076305
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8361176392770920911}
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: b6a8c7f2de072314babd4892dda62f03, 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!1 &8870768795708678106
GameObject:
m_ObjectHideFlags: 0

View File

@ -546,6 +546,11 @@ public partial class DBManager : MonoBehaviour
return _lstHuntindData[index];
}
}
public List<HuntingData> Get_HuntingDatas(int type)
{
return _lstHuntindData.FindAll(f => f.n_AlbumType == type);
}
public List<HuntingUIData> Get_AlbumDatas()
{
var rtn = new List<HuntingUIData>();

View File

@ -1,3 +1,4 @@
using CodeJay.Classes;
using TMPro;
using UnityEngine;
using UnityEngine.UI;
@ -6,16 +7,82 @@ public class CollectionCard : CardBase
{
public Image i_face;
public TextMeshProUGUI t_price;
public GameObject go_lock;
public GameObject go_lock, go_buybtn, go_pricedia, go_priceheart;
public Material mat_blur;
HuntingData m_Data;
public override void Set<T>(T _base, int iLoop = -1, int idata = -1)
{
base.Set(_base, iLoop, idata);
m_Data = _base as HuntingData;
i_face.sprite = m_Data.UnlockImage;
t_price.text = m_Data.NeedKey > 0 ? m_Data.NeedKey.ToString() : m_Data.NeedHeart.ToString();
var left = m_Data.Index % 2 == 0;
if (left) { go_pricedia.SetActive(true); go_priceheart.SetActive(false); }
else { go_pricedia.SetActive(false); go_priceheart.SetActive(true); }
var unlockTargetIndex = GameManager.DB.GetUnlockTargetIndex(left);
i_face.color = Color.white;
i_face.material = null;
go_buybtn.SetActive(false);
if (m_Data.n_Group == unlockTargetIndex)
{ // 구매 가능
go_buybtn.SetActive(true);
i_face.material = mat_blur;
go_lock.SetActive(true);
}
else if (m_Data.n_Group > unlockTargetIndex)
{ // 잠김
go_lock.SetActive(true);
i_face.color = Color.black;
}
else
{ // 열림
go_lock.SetActive(false);
}
}
public void OnClick_Buy()
{
var bCondition = false;
var left = m_Data.Index % 2 == 0;
if (left)
{
if (GameManager.DB.Key >= m_Data.NeedKey)
{
GameManager.DB.SubKey(m_Data.NeedKey, this.name);
bCondition = true;
}
else
{
GameManager.UI.ShowNStackPopup(EPopupType.KeyChargePopup);
}
}
else
{
if (GameManager.DB.Heart >= m_Data.NeedHeart)
{
GameManager.DB.SubHeart(m_Data.NeedHeart, this.name);
bCondition = true;
}
else
{
GameManager.UI.ShowNStackPopup(EPopupType.HeartChargePopup);
}
}
if (bCondition)
{
GameManager.DB.UnlockLastAIImage(left);
GameManager.DB.SaveDatas();
GameManager.Event.InvokeEvent(EEventType.OnSynchronizeAIChllengeModeAIData);
GameObject.Find("CollectionPanel").GetComponent<CollectionPanel>().Set_UI();
}
}
public void OnClick_CollectionCard()
{
if (!go_lock.activeInHierarchy && !go_buybtn.activeInHierarchy)
GameObject.Find("CollectionPanel").GetComponent<CollectionPanel>().ShowPanel(m_Data);
}
}

View File

@ -1,3 +1,4 @@
using CodeJay.Classes;
using UnityEngine;
public class CollectionPanel : uScrollViewMgr
@ -18,7 +19,7 @@ public class CollectionPanel : uScrollViewMgr
DB_HuntingListData huntingListData = DB_HuntingListData.GetEntity(curtargetindex);
TitleTMP.text = huntingListData.DBF_Title;
t_type.text = $"Type{CurAlbumType}";
Set_ScrollView(GameManager.DB.Get_AlbumDatas(CurAlbumType));
Set_ScrollView(GameManager.DB.Get_HuntingDatas(CurAlbumType));
}
public void OnClick_Arrow(int add)
@ -33,4 +34,9 @@ public class CollectionPanel : uScrollViewMgr
{
CanvasControl.Ins.Go_Album();
}
public void ShowPanel(HuntingData data)
{
m_ShowPanel.Set(data);
}
}

View File

@ -68,7 +68,8 @@ public partial class GamePanel : MonoBehaviour
{ eMainMission.All_9, 4 },
{ eMainMission.All_10, 4 },
{ eMainMission.All_11, 4 },
{ eMainMission.All_12, 4 }
{ eMainMission.All_12, 4 },
{ eMainMission.Max, 0 }
};
public Dictionary<eSubMission, int> dic_submisstionRate = new Dictionary<eSubMission, int>
{
@ -76,7 +77,8 @@ public partial class GamePanel : MonoBehaviour
{ eSubMission.YulGgeut3, 3 },
{ eSubMission.Ddee3, 3 },
{ eSubMission.Gwang3, 3 },
{ eSubMission.Be3Gwang, 2 }
{ eSubMission.Be3Gwang, 2 },
{ eSubMission.Max, 0 }
};
public eMainMission CurMission = eMainMission.Max;
bool ShowMainMissionPopup = false;

View File

@ -594,6 +594,7 @@ public class ProductSlot : CardBase
{
GameManager.DB.AddHeart(_data.rewardAmount, this.name);
GameManager.DB.MinProductAdWatchedNumber(1);
GameManager.ADS.OnCompletedRewardedAd -= OnCompletedRewardedAd;
SetData(_data);
if (GameManager.DB.ProductAdWatchedNumber <= 0 && AdButton != null)
@ -602,12 +603,6 @@ public class ProductSlot : CardBase
c.a = 0.5f;
AdButton.GetComponent<Image>().color = c;
}
if (GameManager.DB.ProductAdWatchedNumber == 0)
{
SetADSButton();
//GameManager.Timer.ActivateSimpleTimer(name, Constants.ADS_TIMER_COUNT, OnStartTimer, OnPauseTimer, OnStopTimer, OnPassedTime);
}
}
}
}