랭킹 리팩토링
This commit is contained in:
parent
113811aca8
commit
0141357405
|
|
@ -53,15 +53,17 @@ messageinfo 엄청 느린 버그
|
|||
|
||||
수상한 미궁
|
||||
- 맵 벽과 플레이 사이 더 멀게 만들자 (카메라가 벽 밖에 안 나가게)
|
||||
- 매월 초기화 후 보상 우편으로 지급
|
||||
- 매월 1일 랭킹 초기화 후 보상 우편으로 지급
|
||||
- 입장권 추가 구매 구현 필요
|
||||
- 결과 화면 (보상 지급)
|
||||
- 랭킹 15분마다 갱신
|
||||
|
||||
악몽의 시련
|
||||
- 결과 화면 (보상 지급)
|
||||
- 매일 랭킹 초기화 후 보상 우편으로 지급
|
||||
- 입장권 추가 구매 구현 필요
|
||||
- 난이도에 따른 패널티
|
||||
- 랭킹 15분마다 갱신
|
||||
|
||||
- 시작 시 입장권 차감
|
||||
- 랭킹 UI 통합(랭킹 및 랭킹 보상이 기본)
|
||||
|
|
|
|||
|
|
@ -5606,6 +5606,7 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2905522599481568448}
|
||||
- component: {fileID: 7752323174804030052}
|
||||
m_Layer: 5
|
||||
m_Name: Ranking
|
||||
m_TagString: Untagged
|
||||
|
|
@ -5637,6 +5638,22 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &7752323174804030052
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 564235503569457949}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 0288db02082f0be458aaea44114c3db2, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ScrollRect: {fileID: 6604571758126327100}
|
||||
m_Content: {fileID: 0}
|
||||
go_card: {fileID: 710708825502186299, guid: 3dcc0fd4e474fee4a89712ec369fb040, type: 3}
|
||||
myRank: {fileID: 8413171323054707053}
|
||||
--- !u!1 &567412856604436246
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -53337,9 +53354,9 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 42808435850860132}
|
||||
- component: {fileID: 2235358054737525818}
|
||||
- component: {fileID: 8875568081737074834}
|
||||
m_Layer: 5
|
||||
m_Name: Rank_Maze
|
||||
m_Name: RankingUI
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
|
|
@ -53366,7 +53383,7 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &2235358054737525818
|
||||
--- !u!114 &8875568081737074834
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -53375,17 +53392,12 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 4791435642623592046}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 708d9be4171d4554d8a7e7bce201b88f, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: f5bcc68bd7d98b84b83128cf9be7f9e7, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ScrollRect: {fileID: 6604571758126327100}
|
||||
m_Content: {fileID: 6884217557492167859}
|
||||
go_card: {fileID: 710708825502186299, guid: 3dcc0fd4e474fee4a89712ec369fb040, type: 3}
|
||||
m_Tab: {fileID: 2949788278511274615}
|
||||
myRank: {fileID: 8413171323054707053}
|
||||
gos:
|
||||
- {fileID: 564235503569457949}
|
||||
- {fileID: 6884217557492167859}
|
||||
m_Rank: {fileID: 7752323174804030052}
|
||||
m_Reward: {fileID: 242524178656213461}
|
||||
--- !u!1 &4791490540812428574
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -55397,8 +55409,7 @@ MonoBehaviour:
|
|||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
go_Camera: {fileID: 0}
|
||||
rankings:
|
||||
- {fileID: 2235358054737525818}
|
||||
m_RankingUI: {fileID: 8875568081737074834}
|
||||
--- !u!1 &4944573237779459871
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
|
|
@ -58877,7 +58888,7 @@ MonoBehaviour:
|
|||
m_OnClick:
|
||||
m_PersistentCalls:
|
||||
m_Calls:
|
||||
- m_Target: {fileID: 2235358054737525818}
|
||||
- m_Target: {fileID: 0}
|
||||
m_TargetAssemblyTypeName: BackKeyAdd, Assembly-CSharp
|
||||
m_MethodName: OnClick_Back
|
||||
m_Mode: 1
|
||||
|
|
@ -75655,7 +75666,7 @@ GameObject:
|
|||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 5607384215265155754}
|
||||
- component: {fileID: 5548667689334893316}
|
||||
- component: {fileID: 242524178656213461}
|
||||
m_Layer: 5
|
||||
m_Name: RankReward
|
||||
m_TagString: Untagged
|
||||
|
|
@ -75685,7 +75696,7 @@ RectTransform:
|
|||
m_AnchoredPosition: {x: 0, y: 0}
|
||||
m_SizeDelta: {x: 0, y: 0}
|
||||
m_Pivot: {x: 0.5, y: 0.5}
|
||||
--- !u!114 &5548667689334893316
|
||||
--- !u!114 &242524178656213461
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
|
|
@ -75694,7 +75705,7 @@ MonoBehaviour:
|
|||
m_GameObject: {fileID: 6884217557492167859}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 25c5e46f99098bc4e89c2c9a68cf9f1b, type: 3}
|
||||
m_Script: {fileID: 11500000, guid: 784b520d85cde274abc85ad077eed7ee, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
m_ScrollRect: {fileID: 5705328328383091114}
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ public class MapChoiceUI_Dungeon : uScrollViewMgr
|
|||
|
||||
public void OnClick_MazeRank()
|
||||
{
|
||||
RankingMgr.Ins.Show_Rank(eRankingType.Maze);
|
||||
RankingMgr.Ins.Show_Rank(eDungeon.d2_Maze);
|
||||
}
|
||||
|
||||
void OnClick_NightmareTab()
|
||||
|
|
|
|||
|
|
@ -1,38 +0,0 @@
|
|||
using PlayFab.ProgressionModels;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class Rank_Maze : RankingBase
|
||||
{
|
||||
public TabUIBase m_Tab;
|
||||
public RankCard_Maze myRank;
|
||||
public GameObject[] gos; // 0 랭킹, 1 랭킹 보상
|
||||
|
||||
List<TabUIData> list_TabData = new List<TabUIData> { new TabUIData{ n_btnName = 325 }, new TabUIData{ n_btnName = 326 } };
|
||||
List<EntityLeaderboardEntry> list_rank100;
|
||||
|
||||
public override void Set()
|
||||
{
|
||||
base.Set();
|
||||
list_TabData.ForEach(f => f.onClick = OnClick_Tab);
|
||||
m_Tab.Set(list_TabData);
|
||||
OnClick_Tab();
|
||||
}
|
||||
|
||||
void OnClick_Tab()
|
||||
{
|
||||
var index = m_Tab.Get_Index();
|
||||
DSUtil.InActivateGameObjects(gos, index);
|
||||
if (index == 0)
|
||||
{
|
||||
if (true)
|
||||
{ // 랭킹 갱신
|
||||
CardBase_AllOff();
|
||||
ServerInfo.Ins.Get_Rank("Rank_Maze", rank100 => { list_rank100 = rank100; Set_ScrollView(list_rank100); });
|
||||
ServerInfo.Ins.Get_MyRank("Rank_Maze", my => { myRank.Set(my); });
|
||||
}
|
||||
// 랭킹 갱신 시간 아니면 아무것도 안해도 됨
|
||||
}
|
||||
// 랭킹 리워드는 굳이 따로 할 필요없음 (오브젝트 켜지면 알아서 함)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,7 +0,0 @@
|
|||
public class Rank_Maze_Reward : uScrollViewMgr
|
||||
{
|
||||
private void Start()
|
||||
{
|
||||
Set_ScrollView(table_rankrewardlist.Ins.Get_DataList());
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
public class RankingBase : uScrollViewMgr
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1,16 +1,9 @@
|
|||
public enum eRankingType { Maze, }
|
||||
|
||||
public class RankingMgr : MonoBehaviourSingletonTemplate<RankingMgr>
|
||||
{
|
||||
public RankingBase[] rankings;
|
||||
public RankingUI m_RankingUI;
|
||||
|
||||
public void Show_Rank(eRankingType rankingType)
|
||||
public void Show_Rank(eDungeon dungeon)
|
||||
{
|
||||
switch (rankingType)
|
||||
{
|
||||
case eRankingType.Maze:
|
||||
rankings[0].Set();
|
||||
break;
|
||||
}
|
||||
m_RankingUI.Set(dungeon);
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,37 @@
|
|||
using System.Collections.Generic;
|
||||
|
||||
public class RankingUI : BackKeyAdd
|
||||
{
|
||||
public TabUIBase m_Tab;
|
||||
protected List<TabUIData> list_TabData = new List<TabUIData>
|
||||
{ new TabUIData { n_btnName = 325 }, new TabUIData { n_btnName = 326 } };
|
||||
|
||||
public RankingUI_Rank m_Rank;
|
||||
public RankingUI_Reward m_Reward;
|
||||
|
||||
eDungeon m_Dungeon;
|
||||
|
||||
public void Set(eDungeon dungeon)
|
||||
{
|
||||
base.Set();
|
||||
m_Dungeon = dungeon;
|
||||
list_TabData.ForEach(f => f.onClick = OnClick_Tab);
|
||||
m_Tab.Set(list_TabData);
|
||||
OnClick_Tab();
|
||||
}
|
||||
|
||||
void OnClick_Tab()
|
||||
{
|
||||
var index = m_Tab.Get_Index();
|
||||
if (index == 0)
|
||||
{
|
||||
m_Rank.Set(m_Dungeon);
|
||||
m_Reward.gameObject.SetActive(false);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_Rank.gameObject.SetActive(false);
|
||||
m_Reward.Set(m_Dungeon);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 7887175c9c19eed4aa5718b480658a6f
|
||||
guid: f5bcc68bd7d98b84b83128cf9be7f9e7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
using PlayFab.ProgressionModels;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class RankingUI_Rank : uScrollViewMgr
|
||||
{
|
||||
public RankCard_Maze myRank;
|
||||
|
||||
Dictionary<eDungeon, float> dic_RefreshTime = new Dictionary<eDungeon, float>();
|
||||
Dictionary<eDungeon, string> dic_Leaderboard = new Dictionary<eDungeon, string>
|
||||
{ {eDungeon.d2_Maze, "Rank_Maze" }, {eDungeon.d3_Nightmare, "Rank_Damage" }, };
|
||||
|
||||
Dictionary<eDungeon, List<EntityLeaderboardEntry>> dic_ranks = new Dictionary<eDungeon, List<EntityLeaderboardEntry>>();
|
||||
|
||||
|
||||
public void Set(eDungeon dungeon)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
ServerInfo.Ins.Get_Rank(dic_Leaderboard[dungeon], rank100 =>
|
||||
{
|
||||
if (!dic_RefreshTime.ContainsKey(dungeon)) dic_RefreshTime.Add(dungeon, 0);
|
||||
dic_RefreshTime[dungeon] = 900;
|
||||
|
||||
if (!dic_ranks.ContainsKey(dungeon)) dic_ranks.Add(dungeon, null);
|
||||
dic_ranks[dungeon] = rank100;
|
||||
|
||||
Set_ScrollView(dic_ranks[dungeon]);
|
||||
});
|
||||
|
||||
ServerInfo.Ins.Get_MyRank(dic_Leaderboard[dungeon], my => { myRank.Set(my); });
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 708d9be4171d4554d8a7e7bce201b88f
|
||||
guid: 0288db02082f0be458aaea44114c3db2
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
public class RankingUI_Reward : uScrollViewMgr
|
||||
{
|
||||
public void Set(eDungeon dungeon)
|
||||
{
|
||||
gameObject.SetActive(true);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 25c5e46f99098bc4e89c2c9a68cf9f1b
|
||||
guid: 784b520d85cde274abc85ad077eed7ee
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
Loading…
Reference in New Issue