cull(engine-cleanup): pass-8 phase-2 cascade round 3 after MyPageItemBattle stub
This commit is contained in:
@@ -2,9 +2,4 @@ using UnityEngine;
|
||||
|
||||
public class CardPanelMaintenancePlate : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private UISprite _sprite;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _label;
|
||||
}
|
||||
|
||||
@@ -24,17 +24,6 @@ public class MyPageCardPanel : MonoBehaviour
|
||||
|
||||
public int Index { get; set; }
|
||||
|
||||
public bool EffectActive
|
||||
{
|
||||
set
|
||||
{
|
||||
if (_effect != null)
|
||||
{
|
||||
_effect.SetActive(value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public virtual void CheckMaintenanceType()
|
||||
{
|
||||
if (!enableMaintenanceCheck)
|
||||
|
||||
@@ -4,18 +4,9 @@ public class MyPageCardPanelAnimation : MonoBehaviour
|
||||
{
|
||||
public enum State
|
||||
{
|
||||
Start,
|
||||
End
|
||||
}
|
||||
|
||||
private float ClickRotateTime;
|
||||
|
||||
private bool _isCutCardMotion;
|
||||
|
||||
private State _state = State.End;
|
||||
|
||||
private float _timer;
|
||||
|
||||
private float[] _randomTimer;
|
||||
|
||||
private int[] _randomDir;
|
||||
@@ -62,31 +53,6 @@ public class MyPageCardPanelAnimation : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private void ColorChange(bool isForceOpacity = false)
|
||||
{
|
||||
if (_panel == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
for (int i = 0; i < _cardPanel.Length; i++)
|
||||
{
|
||||
if (_panel[i].alpha < 1f && !isForceOpacity)
|
||||
{
|
||||
float alpha = _panel[i].alpha;
|
||||
alpha += Time.deltaTime * 4f;
|
||||
if (alpha >= 1f)
|
||||
{
|
||||
alpha = 1f;
|
||||
}
|
||||
_panel[i].alpha = alpha;
|
||||
}
|
||||
else
|
||||
{
|
||||
_panel[i].alpha = 1f;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void InitRandom()
|
||||
{
|
||||
_randomDir = new int[_cardPanel.Length];
|
||||
|
||||
@@ -81,19 +81,4 @@ public class MyPageItem : MonoBehaviour
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void RemoveITween(GameObject obj)
|
||||
{
|
||||
iTween component = obj.GetComponent<iTween>();
|
||||
if (component != null)
|
||||
{
|
||||
UnityEngine.Object.Destroy(component);
|
||||
}
|
||||
}
|
||||
|
||||
protected static void FadeOutObject(UITweenAlpha tweenAlpha, Action onFinish = null)
|
||||
{
|
||||
tweenAlpha.End();
|
||||
FadeUtility.FadeOutObject(tweenAlpha, onFinish);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,8 +13,6 @@ public class UIBase : MonoBehaviour
|
||||
|
||||
private List<string> m_loadBackgroundList = new List<string>();
|
||||
|
||||
private UIManager.ViewScene backSceneSave;
|
||||
|
||||
protected bool IsShowFooterMenu { get; set; }
|
||||
|
||||
public virtual bool IsGetOutOfScene(Action backupExec)
|
||||
|
||||
@@ -695,10 +695,6 @@ public class UICardList : MonoBehaviour
|
||||
UIManager.SetObjectToGrey(_showQRCodeButton.gameObject, b: true);
|
||||
}
|
||||
|
||||
private void ShowQRCode()
|
||||
{
|
||||
}
|
||||
|
||||
private void CheckEnableShareButton()
|
||||
{
|
||||
bool flag = _formatBehavior.IsEnableDeckShareButton(CardCount, _maxCardNum);
|
||||
@@ -765,13 +761,6 @@ public class UICardList : MonoBehaviour
|
||||
}));
|
||||
}
|
||||
|
||||
private void ChangeBlueUtilButtonPosToRightSide()
|
||||
{
|
||||
Vector3 localPosition = _blueUtilButtonRoot.transform.localPosition;
|
||||
localPosition.x = 630f;
|
||||
_blueUtilButtonRoot.transform.localPosition = localPosition;
|
||||
}
|
||||
|
||||
private void InitUseSubClassDisplay()
|
||||
{
|
||||
if (!_formatBehavior.UseSubClass)
|
||||
|
||||
@@ -1,84 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wizard.DeckSelect.FirstDisplayPageIndexGetter;
|
||||
|
||||
public class DefaultFirstDisplayPageIndexGetter : FirstDisplayPageIndexGetterBase
|
||||
{
|
||||
protected override int DerivedGet(List<DeckSelectUI.PageData> pageList, Format viewFormat, bool canUseNonPossessionCard)
|
||||
{
|
||||
int lastSelectDeckId = 0;
|
||||
Format format = viewFormat;
|
||||
if (viewFormat == Format.Max || viewFormat == Format.All)
|
||||
{
|
||||
format = (Format)PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_FORMAT);
|
||||
}
|
||||
switch (format)
|
||||
{
|
||||
case Format.Rotation:
|
||||
lastSelectDeckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_ROTATION);
|
||||
break;
|
||||
case Format.Unlimited:
|
||||
lastSelectDeckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_UNLIMITED);
|
||||
break;
|
||||
case Format.PreRotation:
|
||||
lastSelectDeckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_PRE_ROTATION);
|
||||
break;
|
||||
case Format.Crossover:
|
||||
lastSelectDeckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_CROSSOVER);
|
||||
break;
|
||||
case Format.MyRotation:
|
||||
lastSelectDeckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_MY_ROTATION);
|
||||
break;
|
||||
case Format.Avatar:
|
||||
lastSelectDeckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_SELECT_DECK_ID_AVATAR);
|
||||
break;
|
||||
case Format.Max:
|
||||
lastSelectDeckId = PlayerPrefsWrapper.GetValue(PlayerPrefsWrapper.LAST_BATTLE_DECK_ID);
|
||||
break;
|
||||
default:
|
||||
format = Format.Max;
|
||||
break;
|
||||
}
|
||||
for (int i = 0; i < pageList.Count; i++)
|
||||
{
|
||||
DeckSelectUI.PageData pageData = pageList[i];
|
||||
if (pageData.Format == format && pageData.DeckViewList.FirstOrDefault((DeckUI.DeckViewData deckView) => deckView.Deck.GetDeckID() == lastSelectDeckId) != null)
|
||||
{
|
||||
return i;
|
||||
}
|
||||
}
|
||||
if (TryGetPageIndexByAttribute(DeckAttributeType.CustomDeck, pageList, canUseNonPossessionCard, out var pageIndex))
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
if (TryGetPageIndexByAttribute(DeckAttributeType.TrialDeck, pageList, canUseNonPossessionCard, out pageIndex))
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
if (TryGetPageIndexByAttribute(DeckAttributeType.DefaultDeck, pageList, canUseNonPossessionCard, out pageIndex))
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
if (TryGetPageIndexByAttribute(DeckAttributeType.SampleDeck, pageList, canUseNonPossessionCard, out pageIndex))
|
||||
{
|
||||
return pageIndex;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
private static bool TryGetPageIndexByAttribute(DeckAttributeType attribute, List<DeckSelectUI.PageData> pageList, bool canUseNonPossessionCard, out int pageIndex)
|
||||
{
|
||||
for (int i = 0; i < pageList.Count; i++)
|
||||
{
|
||||
DeckSelectUI.PageData pageData = pageList[i];
|
||||
if (pageData.AttributeType == attribute && pageData.DeckViewList.FirstOrDefault((DeckUI.DeckViewData deckView) => deckView.Deck.IsUsable(canUseNonPossessionCard)) != null)
|
||||
{
|
||||
pageIndex = i;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
pageIndex = 0;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
namespace Wizard.DeckSelect.FirstDisplayPageIndexGetter;
|
||||
|
||||
public abstract class FirstDisplayPageIndexGetterBase : IFirstDisplayPageIndexGetter
|
||||
{
|
||||
public int Get(List<DeckSelectUI.PageData> pageList, Format viewFormat, DeckData primaryDisplayDeck, bool canUseNonPossessionCard)
|
||||
{
|
||||
if (primaryDisplayDeck != null)
|
||||
{
|
||||
int num = pageList.FindIndex((DeckSelectUI.PageData page) => page.DeckViewList.FirstOrDefault((DeckUI.DeckViewData deck) => deck.Deck == primaryDisplayDeck) != null);
|
||||
if (num >= 0)
|
||||
{
|
||||
return num;
|
||||
}
|
||||
}
|
||||
return DerivedGet(pageList, viewFormat, canUseNonPossessionCard);
|
||||
}
|
||||
|
||||
protected abstract int DerivedGet(List<DeckSelectUI.PageData> pageList, Format viewFormat, bool canUseNonPossessionCard);
|
||||
}
|
||||
@@ -9,20 +9,10 @@ public class AvatarBattleAllInfo
|
||||
{
|
||||
public class PeriodData
|
||||
{
|
||||
|
||||
public double StartUnixTime { get; set; }
|
||||
|
||||
public double EndUnixTime { get; set; }
|
||||
}
|
||||
|
||||
private Dictionary<string, AvatarBattleInfo> _avatarBattleDictionary = new Dictionary<string, AvatarBattleInfo>();
|
||||
|
||||
private bool _avatarBattleScheduleExist;
|
||||
|
||||
private float _receiveSinceTime;
|
||||
|
||||
private double _receiveServerUnixTime;
|
||||
|
||||
public AvatarBattleInfo Get(string id)
|
||||
{
|
||||
if (string.IsNullOrEmpty(id))
|
||||
|
||||
@@ -156,12 +156,8 @@ public class DeckSelectUI : MonoBehaviour
|
||||
|
||||
private int _deckTableIndex;
|
||||
|
||||
private Action<DeckData> OnSelectDeck;
|
||||
|
||||
private Action<Format> OnChangePage;
|
||||
|
||||
private bool _isOnDestroy;
|
||||
|
||||
private List<string> _resourcePathList;
|
||||
|
||||
private int _currentPageIndex;
|
||||
@@ -174,96 +170,6 @@ public class DeckSelectUI : MonoBehaviour
|
||||
|
||||
public bool IsPageMoving { get; private set; }
|
||||
|
||||
private void NextPage()
|
||||
{
|
||||
if (_pageList.Count > 1)
|
||||
{
|
||||
ChangePage(_currentPageIndex + 1, ChangeMoveDirection.RIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
private void PrevPage()
|
||||
{
|
||||
if (_pageList.Count > 1)
|
||||
{
|
||||
ChangePage(_currentPageIndex - 1, ChangeMoveDirection.LEFT);
|
||||
}
|
||||
}
|
||||
|
||||
private void LoadResources(List<DeckData> deckDataList, Action onFinish)
|
||||
{
|
||||
if (_isInitialized)
|
||||
{
|
||||
DeleteResource();
|
||||
}
|
||||
_resourcePathList = new List<string>();
|
||||
List<int> list = new List<int>(deckDataList.Count);
|
||||
List<long> list2 = new List<long>(deckDataList.Count);
|
||||
foreach (DeckData deckData in deckDataList)
|
||||
{
|
||||
if (deckData.IsNoCard())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
int skinId = deckData.GetSkinId();
|
||||
if (!list.Contains(skinId))
|
||||
{
|
||||
list.Add(skinId);
|
||||
_resourcePathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(deckData.GetSkinId().ToString(), ResourcesManager.AssetLoadPathType.DeckListTexture));
|
||||
}
|
||||
long existingSleeveId = Toolbox.ResourcesManager.GetExistingSleeveId(deckData.GetDeckSleeveID());
|
||||
if (!list2.Contains(existingSleeveId))
|
||||
{
|
||||
list2.Add(existingSleeveId);
|
||||
_resourcePathList.Add(Toolbox.ResourcesManager.GetAssetTypePath(existingSleeveId.ToString(), ResourcesManager.AssetLoadPathType.SleeveTexture));
|
||||
Sleeve sleeve = Data.Master.SleeveMgr.Get(existingSleeveId);
|
||||
if (sleeve.IsPremiumSleeve)
|
||||
{
|
||||
UIManager.GetInstance().getUIBase_CardManager().AddPremireSleevePath(ref _resourcePathList, sleeve);
|
||||
}
|
||||
}
|
||||
}
|
||||
UIManager.GetInstance().createInSceneCenterLoading();
|
||||
UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(_resourcePathList, delegate
|
||||
{
|
||||
UIManager.GetInstance().closeInSceneCenterLoading();
|
||||
onFinish.Call();
|
||||
}));
|
||||
}
|
||||
|
||||
private void CreateDeckGroupPages(List<DeckGroup> deckGroupList, bool isVisibleCreateNew, Format format, DeckData primaryFirstDisplayDeck, IFirstDisplayPageIndexGetter firstDisplayPageIndexGetter)
|
||||
{
|
||||
_pageList = PageData.CreatePageList(deckGroupList, isVisibleCreateNew);
|
||||
bool flag = _pageList.Count > 0;
|
||||
_deckTableRoot.SetActive(flag);
|
||||
_noDeckText.gameObject.SetActive(!flag);
|
||||
_titleLabel.gameObject.SetActive(flag);
|
||||
_pageIndicatorOriginal.gameObject.SetActive(value: false);
|
||||
_pageIndicatorRoot.gameObject.SetActive(flag);
|
||||
if (flag)
|
||||
{
|
||||
if (_isInitialized && _pageIndicator != null)
|
||||
{
|
||||
UnityEngine.Object.Destroy(_pageIndicator.gameObject);
|
||||
}
|
||||
_pageIndicator = NGUITools.AddChild(_pageIndicatorRoot, _pageIndicatorOriginal.gameObject).GetComponent<UIPageIndicator>();
|
||||
_pageIndicator.gameObject.SetActive(value: true);
|
||||
}
|
||||
_flickCollider.gameObject.SetActive(flag);
|
||||
_rightButton.gameObject.SetActive(_pageList.Count > 1);
|
||||
_leftButton.gameObject.SetActive(_pageList.Count > 1);
|
||||
if (flag)
|
||||
{
|
||||
_currentPageIndex = firstDisplayPageIndexGetter.Get(_pageList, format, primaryFirstDisplayDeck, _canUseNonPossessionCard);
|
||||
_pageIndicator.Init(_pageList.Count, _currentPageIndex + 1);
|
||||
ChangePage(_currentPageIndex, ChangeMoveDirection.NONE);
|
||||
}
|
||||
else
|
||||
{
|
||||
OnChangePage.Call(format);
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangePage(int nextPageIndex, ChangeMoveDirection moveDirection)
|
||||
{
|
||||
if (!IsPageMoving && IsValidPageIndex(nextPageIndex))
|
||||
|
||||
@@ -96,19 +96,6 @@ public class FormatChangeUI : MonoBehaviour
|
||||
}
|
||||
}
|
||||
|
||||
private void InitializeFormatCategoryButtons(FormatCategory anotherFormatCategory)
|
||||
{
|
||||
_btnRotation.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
OnClickChangeFormatBtn(FormatCategory.Rotation);
|
||||
}));
|
||||
_btnUnlimited.onClick.Add(new EventDelegate(delegate
|
||||
{
|
||||
OnClickChangeFormatBtn(FormatCategory.Unlimited);
|
||||
}));
|
||||
UpdateAnotherFormatButton(anotherFormatCategory);
|
||||
}
|
||||
|
||||
private void OnClickChangeFormatBtn(FormatCategory formatCategory)
|
||||
{
|
||||
if (_currentFormatCategory != formatCategory)
|
||||
|
||||
@@ -23,13 +23,4 @@ public static class FreeAndRankMatchDeckSelectConfirmDialog
|
||||
// UIManager scene change, which is the only observable output.
|
||||
UIManager.GetInstance().ChangeViewScene(UIManager.ViewScene.RankMatch);
|
||||
}
|
||||
|
||||
private static void SetBattleRetryForDeckCardEdit()
|
||||
{
|
||||
UIManager instance = UIManager.GetInstance();
|
||||
if (instance.IsCurrentScene(UIManager.ViewScene.DeckCardEdit))
|
||||
{
|
||||
(instance.GetUiBaseOfCurrentScene() as DeckCardEditUI).IsBattleRetry = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -24,10 +24,6 @@ public class MyPageDetail
|
||||
|
||||
public List<MyPageBannerBase.BannerInfo> _subBannerInfoList;
|
||||
|
||||
public float SinceTime { get; set; }
|
||||
|
||||
public double ServerUnixTime { get; set; }
|
||||
|
||||
public MyPageHomeDialogData MyPageHomeDialogData { get; set; } = new MyPageHomeDialogData();
|
||||
|
||||
public MyPageBGInfo BGInfo { get; set; } = new MyPageBGInfo();
|
||||
|
||||
@@ -1,5 +0,0 @@
|
||||
namespace Wizard;
|
||||
|
||||
public class RoomNonPossessionCardCampaign
|
||||
{
|
||||
}
|
||||
Reference in New Issue
Block a user