cull(engine-cleanup): pass-8 phase-2 cascade round 5 after MyPageItemBattle stub
This commit is contained in:
@@ -146,20 +146,6 @@ public static class DeckListUtility
|
|||||||
return list;
|
return list;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static string DeckListHeader(DeckAttributeType deckAttributeType, int pageNum)
|
|
||||||
{
|
|
||||||
return deckAttributeType switch
|
|
||||||
{
|
|
||||||
DeckAttributeType.DefaultDeck => Data.SystemText.Get("Card_0004"),
|
|
||||||
DeckAttributeType.TrialDeck => Data.SystemText.Get("Card_0255") + pageNum,
|
|
||||||
DeckAttributeType.BuildDeck => Data.SystemText.Get("Story_0056") + pageNum,
|
|
||||||
DeckAttributeType.CustomDeck => Data.SystemText.Get("Card_0005") + pageNum,
|
|
||||||
DeckAttributeType.SampleDeck => Data.SystemText.Get("Card_0293"),
|
|
||||||
DeckAttributeType.QuestSecretBoss => Data.SystemText.Get("BossRush_0041"),
|
|
||||||
_ => string.Empty,
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void DeckUpdate(JsonData jsonData, Format format, DeckAttributeType deckAttributeType)
|
public static void DeckUpdate(JsonData jsonData, Format format, DeckAttributeType deckAttributeType)
|
||||||
{
|
{
|
||||||
DeckData deckData = new DeckData(format, deckAttributeType);
|
DeckData deckData = new DeckData(format, deckAttributeType);
|
||||||
|
|||||||
@@ -35,11 +35,6 @@ public class DeckSelectUI : MonoBehaviour
|
|||||||
AttributeType = attributeType;
|
AttributeType = attributeType;
|
||||||
GroupName = groupName;
|
GroupName = groupName;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void AddDeckViewList(DeckUI.DeckViewData deckViewData)
|
|
||||||
{
|
|
||||||
DeckViewList.Add(deckViewData);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private class DeckTable
|
private class DeckTable
|
||||||
@@ -95,71 +90,13 @@ public class DeckSelectUI : MonoBehaviour
|
|||||||
|
|
||||||
private static readonly Vector3 OUTSIDE_LEFT_PAGE_POSITION = VIEW_PAGE_POSITION + Vector3.left * 1400f;
|
private static readonly Vector3 OUTSIDE_LEFT_PAGE_POSITION = VIEW_PAGE_POSITION + Vector3.left * 1400f;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private UILabel _titleLabel;
|
|
||||||
|
|
||||||
private UIPageIndicator _pageIndicator;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private UIButton _leftButton;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private UIButton _rightButton;
|
|
||||||
|
|
||||||
private DeckTable[] _deckTables = new DeckTable[2];
|
private DeckTable[] _deckTables = new DeckTable[2];
|
||||||
|
|
||||||
private int _deckTableIndex;
|
private int _deckTableIndex;
|
||||||
|
|
||||||
private Action<Format> OnChangePage;
|
|
||||||
|
|
||||||
private List<string> _resourcePathList;
|
|
||||||
|
|
||||||
private int _currentPageIndex;
|
|
||||||
|
|
||||||
private List<PageData> _pageList;
|
private List<PageData> _pageList;
|
||||||
|
|
||||||
private bool _canUseNonPossessionCard;
|
private bool _canUseNonPossessionCard;
|
||||||
|
|
||||||
public bool IsPageMoving { get; private set; }
|
public bool IsPageMoving { get; private set; }
|
||||||
|
|
||||||
private bool IsValidPageIndex(int pageIndex)
|
|
||||||
{
|
|
||||||
if (_pageList.Count <= pageIndex)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (pageIndex < 0)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void ChangeDeckTable(PageData nextPageData, ChangeMoveDirection moveDirection)
|
|
||||||
{
|
|
||||||
if (IsPageMoving)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
DeckTable deckTable = _deckTables[_deckTableIndex];
|
|
||||||
_deckTableIndex = 1 - _deckTableIndex;
|
|
||||||
DeckTable deckTable2 = _deckTables[_deckTableIndex];
|
|
||||||
deckTable2.UpdateDeckViewList(nextPageData.DeckViewList, _canUseNonPossessionCard);
|
|
||||||
if (moveDirection == ChangeMoveDirection.NONE)
|
|
||||||
{
|
|
||||||
deckTable2.Obj.transform.localPosition = VIEW_PAGE_POSITION;
|
|
||||||
deckTable.Obj.transform.localPosition = OUTSIDE_RIGHT_PAGE_POSITION;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
bool flag = moveDirection == ChangeMoveDirection.RIGHT;
|
|
||||||
deckTable.Obj.transform.localPosition = VIEW_PAGE_POSITION;
|
|
||||||
deckTable2.Obj.transform.localPosition = (flag ? OUTSIDE_RIGHT_PAGE_POSITION : OUTSIDE_LEFT_PAGE_POSITION);
|
|
||||||
IsPageMoving = true;
|
|
||||||
TweenPosition.Begin(deckTable.Obj, 0.2f, flag ? OUTSIDE_LEFT_PAGE_POSITION : OUTSIDE_RIGHT_PAGE_POSITION);
|
|
||||||
TweenPosition.Begin(deckTable2.Obj, 0.2f, VIEW_PAGE_POSITION).SetOnFinished(delegate
|
|
||||||
{
|
|
||||||
IsPageMoving = false;
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user