cull(engine-cleanup): pass-8 phase-2 cascade round 2 after MyPageItemBattle stub
This commit is contained in:
@@ -17,8 +17,6 @@ public class AvatarBattleAllInfo
|
||||
|
||||
private Dictionary<string, AvatarBattleInfo> _avatarBattleDictionary = new Dictionary<string, AvatarBattleInfo>();
|
||||
|
||||
public PeriodData FreeMatchPeriod = new PeriodData();
|
||||
|
||||
private bool _avatarBattleScheduleExist;
|
||||
|
||||
private float _receiveSinceTime;
|
||||
@@ -37,18 +35,4 @@ public class AvatarBattleAllInfo
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private bool IsWithinPeriod(PeriodData period)
|
||||
{
|
||||
if (!_avatarBattleScheduleExist)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
double num = _receiveServerUnixTime + (double)Time.realtimeSinceStartup - (double)_receiveSinceTime;
|
||||
if (num > period.EndUnixTime)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
return num > period.StartUnixTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
using System;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class CompleteDeckDecideDialog
|
||||
{
|
||||
|
||||
public DialogBase Dialog { get; private set; }
|
||||
|
||||
public DeckDecisionUI DecisionUI { get; private set; }
|
||||
|
||||
public static CompleteDeckDecideDialog CreateForSingleDeck(DialogBase dialogDeckList, DeckData deck, bool showSimpleStageOption, Action onDecide, ConventionDeckList conventionDeckList = null)
|
||||
{
|
||||
CompleteDeckDecideDialog completeDeckDecideDialog = new CompleteDeckDecideDialog(showSimpleStageOption);
|
||||
completeDeckDecideDialog.InitializeForSingleDeck(dialogDeckList, deck, onDecide, conventionDeckList);
|
||||
return completeDeckDecideDialog;
|
||||
}
|
||||
|
||||
private CompleteDeckDecideDialog(bool showSimpleStageOption)
|
||||
{
|
||||
CreateDialogBase(showSimpleStageOption);
|
||||
}
|
||||
|
||||
private void CreateDialogBase(bool showSimpleStageOption)
|
||||
{
|
||||
Dialog = UIManager.GetInstance().CreateDialogClose();
|
||||
Dialog.SetTitleLabel(Data.SystemText.Get("Dia_DeckSelect_001_Title"));
|
||||
Dialog.SetPanelDepth(15);
|
||||
DecisionUI = UnityEngine.Object.Instantiate(Toolbox.ResourcesManager.LoadObject<DeckDecisionUI>("UI/DeckList/DeckDecision", isServerResources: false));
|
||||
DecisionUI.IsShowSimpleStageOption = showSimpleStageOption;
|
||||
Dialog.SetObj(DecisionUI.gameObject);
|
||||
}
|
||||
|
||||
private void InitializeForSingleDeck(DialogBase dialogDeckList, DeckData deck, Action onDecide, ConventionDeckList conventionDeckList = null)
|
||||
{
|
||||
Dialog.SetButtonText(Data.SystemText.Get("Common_0004"), Data.SystemText.Get("Card_0083"));
|
||||
Dialog.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_GrayBtn);
|
||||
Dialog.ClickSe_Btn1 = 0;
|
||||
DecisionUI.SetDeckData(deck, conventionDeckList);
|
||||
DecisionUI.DeckName = deck.GetDeckName();
|
||||
Dialog.onPushButton2 = DecisionUI.OnClickCreateCardList;
|
||||
Dialog.ClickSe_Btn2 = 0;
|
||||
Dialog.isNotCloseWindowButton2 = true;
|
||||
Dialog.onPushButton1 = delegate
|
||||
{
|
||||
Dialog.button1.isEnabled = false;
|
||||
if (dialogDeckList != null)
|
||||
{
|
||||
dialogDeckList.CloseWithoutSelect();
|
||||
}
|
||||
onDecide.Call();
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -11,15 +11,6 @@ public class DeckSelectUI : MonoBehaviour
|
||||
{
|
||||
public class InitOptions
|
||||
{
|
||||
public Action<DeckUI> OnUpdateDeckUICustomize { get; set; }
|
||||
|
||||
public Action OnClickInfoButton { get; set; }
|
||||
|
||||
public DeckData PrimaryFirstDisplayDeck { get; set; }
|
||||
|
||||
public bool CanUseNonPossessionCard { get; set; }
|
||||
|
||||
public IFirstDisplayPageIndexGetter FirstDisplayPageIndexGetter { get; set; }
|
||||
}
|
||||
|
||||
private enum ChangeMoveDirection
|
||||
@@ -135,9 +126,6 @@ public class DeckSelectUI : MonoBehaviour
|
||||
|
||||
private static readonly Vector3 OUTSIDE_LEFT_PAGE_POSITION = VIEW_PAGE_POSITION + Vector3.left * 1400f;
|
||||
|
||||
[SerializeField]
|
||||
private DeckUI _deckFrameOriginal;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _titleLabel;
|
||||
|
||||
@@ -164,15 +152,6 @@ public class DeckSelectUI : MonoBehaviour
|
||||
[SerializeField]
|
||||
private UILabel _noDeckText;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _cautionLabel;
|
||||
|
||||
[SerializeField]
|
||||
private UIGrid[] _deckTableGrids = new UIGrid[2];
|
||||
|
||||
[SerializeField]
|
||||
private UIButton _infoButton;
|
||||
|
||||
private DeckTable[] _deckTables = new DeckTable[2];
|
||||
|
||||
private int _deckTableIndex;
|
||||
@@ -195,45 +174,6 @@ public class DeckSelectUI : MonoBehaviour
|
||||
|
||||
public bool IsPageMoving { get; private set; }
|
||||
|
||||
public void UpdateDeckView(List<DeckGroup> deckGroupList, Format format, bool isVisibleCreateNew, Action onSettingDeckListFinish = null, DeckData primaryFirstDisplayDeck = null, IFirstDisplayPageIndexGetter firstDisplayPageIndexGetter = null)
|
||||
{
|
||||
List<DeckData> list = new List<DeckData>();
|
||||
foreach (DeckGroup deckGroup in deckGroupList)
|
||||
{
|
||||
list.AddRange(deckGroup.DeckDataList);
|
||||
}
|
||||
LoadResources(list, delegate
|
||||
{
|
||||
if (!_isOnDestroy)
|
||||
{
|
||||
if (firstDisplayPageIndexGetter == null)
|
||||
{
|
||||
firstDisplayPageIndexGetter = new DefaultFirstDisplayPageIndexGetter();
|
||||
}
|
||||
CreateDeckGroupPages(deckGroupList, isVisibleCreateNew, format, primaryFirstDisplayDeck, firstDisplayPageIndexGetter);
|
||||
onSettingDeckListFinish.Call();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void OnClickDeck(DeckUI deckUI)
|
||||
{
|
||||
|
||||
OnSelectDeck.Call(deckUI.Deck);
|
||||
}
|
||||
|
||||
private void OnDragPanel(Vector2 dir)
|
||||
{
|
||||
if (dir.x >= 70f)
|
||||
{
|
||||
PrevPage();
|
||||
}
|
||||
else if (dir.x <= -70f)
|
||||
{
|
||||
NextPage();
|
||||
}
|
||||
}
|
||||
|
||||
private void NextPage()
|
||||
{
|
||||
if (_pageList.Count > 1)
|
||||
|
||||
@@ -96,13 +96,6 @@ public class FormatChangeUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private void Initialize(FormatCategory defaultFormatCategory, FormatCategory anotherFormatCategory, Action<FormatCategory> onChangeFormat)
|
||||
{
|
||||
InitializeFormatCategoryButtons(anotherFormatCategory);
|
||||
_onChangeFormat = onChangeFormat;
|
||||
ChangeFormat(defaultFormatCategory);
|
||||
}
|
||||
|
||||
private void InitializeFormatCategoryButtons(FormatCategory anotherFormatCategory)
|
||||
{
|
||||
_btnRotation.onClick.Add(new EventDelegate(delegate
|
||||
|
||||
@@ -24,15 +24,6 @@ public static class FreeAndRankMatchDeckSelectConfirmDialog
|
||||
UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.RankMatch);
|
||||
}
|
||||
|
||||
private static void ChangeViewSceneAndSetBattleRetry(UIManager.ViewScene viewScene)
|
||||
{
|
||||
// Pre-Phase-5b: battle-scene branch routed through GameMgr.GetBattleCtrl().BattleEnd.
|
||||
// BattleControl is a stub (chunk 7); collapse to the else branch.
|
||||
UIManager.ChangeViewSceneParam changeViewSceneParam = new UIManager.ChangeViewSceneParam();
|
||||
changeViewSceneParam.OnChange = SetBattleRetryForDeckCardEdit;
|
||||
UIManager.GetInstance().ChangeViewScene(viewScene, changeViewSceneParam);
|
||||
}
|
||||
|
||||
private static void SetBattleRetryForDeckCardEdit()
|
||||
{
|
||||
UIManager instance = UIManager.GetInstance();
|
||||
|
||||
@@ -1,115 +0,0 @@
|
||||
using System;
|
||||
using Cute;
|
||||
using Wizard.DeckCardEdit;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public static class InCompleteDeckDecideDialog
|
||||
{
|
||||
|
||||
public static void Create(DialogBase dialogDeckList, DeckData deck, ConventionDeckList conventionDeckList = null, bool canUseNonPossessionCard = false, Action<UIManager.ViewScene> unusableDeckChangeViewSceneAction = null)
|
||||
{
|
||||
DeckData.UnusableReason reason;
|
||||
if (deck.IsNoCard())
|
||||
{
|
||||
Action onStartChangeViewScene = delegate
|
||||
{
|
||||
dialogDeckList.CloseWithoutSelect();
|
||||
};
|
||||
DeckCreateMenuUI.ShowDeckCreateMenu(deck, conventionDeckList, onStartChangeViewScene);
|
||||
}
|
||||
else if (!deck.IsUsable(out reason, canUseNonPossessionCard))
|
||||
{
|
||||
CreateUnusableDeckDialog(deck, conventionDeckList, reason, unusableDeckChangeViewSceneAction, dialogDeckList);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CreateUnusableDeckDialog(DeckData deck, ConventionDeckList conventionDeckList, DeckData.UnusableReason unusableReason, Action<UIManager.ViewScene> changeViewSceneAction, DialogBase dialogDeckList)
|
||||
{
|
||||
if (unusableReason == DeckData.UnusableReason.MaintenanceCard && deck.IsRentalDeck)
|
||||
{
|
||||
DialogBase dialogBase = UIManager.GetInstance().CreateConfirmationDialog(Data.SystemText.Get("Story_0060"));
|
||||
dialogBase.SetButtonLayout(DialogBase.ButtonLayout.CloseBtn);
|
||||
dialogBase.SetTitleLabel(Data.SystemText.Get("System_0022"));
|
||||
dialogBase.SetPanelDepth(100);
|
||||
return;
|
||||
}
|
||||
(string, string) textsUnusableDeckDialog = GetTextsUnusableDeckDialog(unusableReason);
|
||||
DialogBase dialogBase2 = UIManager.GetInstance().CreateDialogClose();
|
||||
dialogBase2.SetTitleLabel(textsUnusableDeckDialog.Item1);
|
||||
dialogBase2.SetText(textsUnusableDeckDialog.Item2);
|
||||
dialogBase2.SetButtonLayout(DialogBase.ButtonLayout.BlueBtn_CancelBtn);
|
||||
dialogBase2.SetButtonText(Data.SystemText.Get("Dia_DeckSelect_002_Button"));
|
||||
dialogBase2.onPushButton1 = delegate
|
||||
{
|
||||
if (Data.MaintenanceCodeList.Contains(NetworkDefine.MAINTENANCE_TYPE.DECK_MAINTENANCE))
|
||||
{
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
DeckCardEditUI.SetDeckEditParameter(deck, conventionDeckList);
|
||||
dialogDeckList.CloseWithoutSelect();
|
||||
if (changeViewSceneAction != null)
|
||||
{
|
||||
changeViewSceneAction(UIManager.ViewScene.DeckCardEdit);
|
||||
}
|
||||
else
|
||||
{
|
||||
UIManager.ChangeViewSceneParam param = new UIManager.ChangeViewSceneParam
|
||||
{
|
||||
IsUpdateFooterMenuTexture = true
|
||||
};
|
||||
UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.DeckCardEdit, param);
|
||||
}
|
||||
}
|
||||
};
|
||||
dialogBase2.ClickSe_Btn1 = 0;
|
||||
dialogBase2.SetPanelDepth(100);
|
||||
}
|
||||
|
||||
private static (string title, string body) GetTextsUnusableDeckDialog(DeckData.UnusableReason unusableReason)
|
||||
{
|
||||
string item = string.Empty;
|
||||
string item2 = string.Empty;
|
||||
switch (unusableReason)
|
||||
{
|
||||
case DeckData.UnusableReason.MaintenanceCard:
|
||||
item = Data.SystemText.Get("System_0022");
|
||||
item2 = Data.SystemText.Get("System_0039");
|
||||
break;
|
||||
case DeckData.UnusableReason.FormatRestrictCard:
|
||||
item = Data.SystemText.Get("Dia_DeckSelect_004_Title");
|
||||
item2 = Data.SystemText.Get("Card_0192");
|
||||
break;
|
||||
case DeckData.UnusableReason.TooLittleCards:
|
||||
item = Data.SystemText.Get("Dia_DeckSelect_002_Title");
|
||||
item2 = Data.SystemText.Get("Card_0069");
|
||||
break;
|
||||
case DeckData.UnusableReason.TooMuchCards:
|
||||
item = Data.SystemText.Get("Dia_DeckSelect_003_Title");
|
||||
item2 = Data.SystemText.Get("Card_0140");
|
||||
break;
|
||||
case DeckData.UnusableReason.NonPossessionCard:
|
||||
item = Data.SystemText.Get("Dia_DeckSelect_004_Title");
|
||||
item2 = Data.SystemText.Get("Card_0254");
|
||||
break;
|
||||
case DeckData.UnusableReason.ShortageMainClassCards:
|
||||
item = Data.SystemText.Get("Dia_DeckSelect_005_Title");
|
||||
item2 = Data.SystemText.Get("Card_0289");
|
||||
break;
|
||||
case DeckData.UnusableReason.ShortageSubClassCards:
|
||||
item = Data.SystemText.Get("Dia_DeckSelect_006_Title");
|
||||
item2 = Data.SystemText.Get("Card_0290");
|
||||
break;
|
||||
case DeckData.UnusableReason.ShortageBothClassCards:
|
||||
item = Data.SystemText.Get("Dia_DeckSelect_007_Title");
|
||||
item2 = Data.SystemText.Get("Card_0291");
|
||||
break;
|
||||
case DeckData.UnusableReason.Unknown:
|
||||
Debug.LogError("unknown deck unusable reason.");
|
||||
break;
|
||||
}
|
||||
return (title: item, body: item2);
|
||||
}
|
||||
}
|
||||
@@ -30,14 +30,7 @@ public class MyPageDetail
|
||||
|
||||
public MyPageHomeDialogData MyPageHomeDialogData { get; set; } = new MyPageHomeDialogData();
|
||||
|
||||
public RoomNonPossessionCardCampaign RoomNonPossessionCardCampaign { get; set; }
|
||||
|
||||
public MyPageBGInfo BGInfo { get; set; } = new MyPageBGInfo();
|
||||
|
||||
public SpeedChallengeInfo SpeedChallengeInfo { get; set; }
|
||||
|
||||
private double GetNowUnixTime()
|
||||
{
|
||||
return ServerUnixTime + (double)Time.realtimeSinceStartup - (double)SinceTime;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -120,18 +120,6 @@ public class PlayerStaticData : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
public void AttachTexture(UITexture uiTexture, int size)
|
||||
{
|
||||
if (m_loadingCnt == 0)
|
||||
{
|
||||
uiTexture.mainTexture = m_loadedList[size];
|
||||
}
|
||||
else
|
||||
{
|
||||
m_requiredAttachList[size].Add(uiTexture);
|
||||
}
|
||||
}
|
||||
|
||||
private void UpdateTexture()
|
||||
{
|
||||
ResourcesManager resourcesManager = Toolbox.ResourcesManager;
|
||||
|
||||
@@ -2,7 +2,4 @@ namespace Wizard;
|
||||
|
||||
public class RoomNonPossessionCardCampaign
|
||||
{
|
||||
public double StartUnixTime { get; set; }
|
||||
|
||||
public double EndUnixTime { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user