cull(engine-cleanup): pass-8 phase-2 cascade round 4 after MyPageItemBattle stub
This commit is contained in:
@@ -1,30 +0,0 @@
|
|||||||
using System;
|
|
||||||
using Cute;
|
|
||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class FadeUtility
|
|
||||||
{
|
|
||||||
private static readonly AnimationCurve FADE_ALPHA_ANIM_CURVE = AnimationCurve.Linear(0f, 0f, 1f, 1f);
|
|
||||||
|
|
||||||
public static void FadeOutObject(UITweenAlpha tweenAlpha, Action onFinish = null)
|
|
||||||
{
|
|
||||||
if (!(tweenAlpha == null))
|
|
||||||
{
|
|
||||||
if (tweenAlpha._curve == null)
|
|
||||||
{
|
|
||||||
tweenAlpha._curve = FADE_ALPHA_ANIM_CURVE;
|
|
||||||
tweenAlpha._curve.postWrapMode = WrapMode.Once;
|
|
||||||
tweenAlpha._curve.preWrapMode = WrapMode.Once;
|
|
||||||
}
|
|
||||||
tweenAlpha._from = 1f;
|
|
||||||
tweenAlpha._to = 0f;
|
|
||||||
tweenAlpha._endTime = 0.3f;
|
|
||||||
tweenAlpha._delayTime = 0f;
|
|
||||||
tweenAlpha._finishCallBack = delegate
|
|
||||||
{
|
|
||||||
onFinish.Call();
|
|
||||||
};
|
|
||||||
tweenAlpha.PlayForward(isReset: true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -6,9 +6,6 @@ using Wizard;
|
|||||||
public class MyPageCardPanel : MonoBehaviour
|
public class MyPageCardPanel : MonoBehaviour
|
||||||
{
|
{
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private GameObject _effect;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private bool enableMaintenanceCheck;
|
private bool enableMaintenanceCheck;
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ public class MyPageCardPanelAnimation : MonoBehaviour
|
|||||||
{
|
{
|
||||||
public enum State
|
public enum State
|
||||||
{
|
{
|
||||||
End
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private float[] _randomTimer;
|
private float[] _randomTimer;
|
||||||
|
|||||||
@@ -1,133 +0,0 @@
|
|||||||
using UnityEngine;
|
|
||||||
|
|
||||||
public class UITweenAlpha : MonoBehaviour
|
|
||||||
{
|
|
||||||
public delegate void FinishCallBack(UITweenAlpha in_FadeObject);
|
|
||||||
|
|
||||||
public AnimationCurve _curve;
|
|
||||||
|
|
||||||
public bool _autoStart;
|
|
||||||
|
|
||||||
public float _from;
|
|
||||||
|
|
||||||
public float _to;
|
|
||||||
|
|
||||||
public float _delayTime;
|
|
||||||
|
|
||||||
public float _endTime;
|
|
||||||
|
|
||||||
public bool _loop;
|
|
||||||
|
|
||||||
public UITweenAlpha[] LinkTargets;
|
|
||||||
|
|
||||||
private UIPanel _panel;
|
|
||||||
|
|
||||||
private UIWidget _uiWidget;
|
|
||||||
|
|
||||||
private UIRect _rect;
|
|
||||||
|
|
||||||
private bool _isPlay;
|
|
||||||
|
|
||||||
private bool _isEnd;
|
|
||||||
|
|
||||||
private bool _isPlayFoward;
|
|
||||||
|
|
||||||
private bool _initialized;
|
|
||||||
|
|
||||||
public FinishCallBack _finishCallBack { get; set; }
|
|
||||||
|
|
||||||
public float Timer { get; set; }
|
|
||||||
|
|
||||||
private void Awake()
|
|
||||||
{
|
|
||||||
if (!_initialized)
|
|
||||||
{
|
|
||||||
Initialize();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void Initialize()
|
|
||||||
{
|
|
||||||
_initialized = true;
|
|
||||||
_panel = base.gameObject.GetComponent<UIPanel>();
|
|
||||||
if (_panel != null)
|
|
||||||
{
|
|
||||||
_rect = _panel;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_uiWidget = base.gameObject.GetComponent<UIWidget>();
|
|
||||||
if (_uiWidget == null && _panel == null)
|
|
||||||
{
|
|
||||||
_uiWidget = base.gameObject.AddComponent<UIWidget>();
|
|
||||||
}
|
|
||||||
_rect = _uiWidget;
|
|
||||||
}
|
|
||||||
if (_autoStart)
|
|
||||||
{
|
|
||||||
PlayForward(isReset: true);
|
|
||||||
}
|
|
||||||
if (LinkTargets == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
for (int i = 0; i < LinkTargets.Length; i++)
|
|
||||||
{
|
|
||||||
if (LinkTargets[i].isActiveAndEnabled)
|
|
||||||
{
|
|
||||||
Timer = LinkTargets[i].Timer;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void PlayForward(bool isReset = false)
|
|
||||||
{
|
|
||||||
if (!base.gameObject.activeSelf)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!_initialized)
|
|
||||||
{
|
|
||||||
Initialize();
|
|
||||||
}
|
|
||||||
if (_curve == null)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
_isPlayFoward = true;
|
|
||||||
if (isReset)
|
|
||||||
{
|
|
||||||
_rect.alpha = _from;
|
|
||||||
}
|
|
||||||
if (!_loop)
|
|
||||||
{
|
|
||||||
if (_rect.alpha != _to || isReset)
|
|
||||||
{
|
|
||||||
_isPlay = true;
|
|
||||||
Timer = 0f;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_isEnd = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_isPlay = true;
|
|
||||||
Timer = 0f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void End()
|
|
||||||
{
|
|
||||||
if (_isPlay)
|
|
||||||
{
|
|
||||||
_isPlay = false;
|
|
||||||
if (_finishCallBack != null)
|
|
||||||
{
|
|
||||||
_finishCallBack(this);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,8 +0,0 @@
|
|||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
namespace Wizard.DeckSelect.FirstDisplayPageIndexGetter;
|
|
||||||
|
|
||||||
public interface IFirstDisplayPageIndexGetter
|
|
||||||
{
|
|
||||||
int Get(List<DeckSelectUI.PageData> pageList, Format viewFormat, DeckData primaryDisplayDeck, bool canUseNonPossessionCard);
|
|
||||||
}
|
|
||||||
@@ -16,9 +16,7 @@ public class DeckSelectUI : MonoBehaviour
|
|||||||
private enum ChangeMoveDirection
|
private enum ChangeMoveDirection
|
||||||
{
|
{
|
||||||
NONE,
|
NONE,
|
||||||
RIGHT,
|
RIGHT }
|
||||||
LEFT
|
|
||||||
}
|
|
||||||
|
|
||||||
public class PageData
|
public class PageData
|
||||||
{
|
{
|
||||||
@@ -30,35 +28,6 @@ public class DeckSelectUI : MonoBehaviour
|
|||||||
|
|
||||||
public List<DeckUI.DeckViewData> DeckViewList { get; private set; }
|
public List<DeckUI.DeckViewData> DeckViewList { get; private set; }
|
||||||
|
|
||||||
public static List<PageData> CreatePageList(List<DeckGroup> deckGroupList, bool isVisibleCreateNew)
|
|
||||||
{
|
|
||||||
List<PageData> list = new List<PageData>();
|
|
||||||
foreach (DeckGroup deckGroup in deckGroupList)
|
|
||||||
{
|
|
||||||
List<DeckUI.DeckViewData> list2 = DeckUI.DeckViewData.CreateDeckViewList(deckGroup.DeckDataList, isVisibleCreateNew);
|
|
||||||
if (!list2.Any((DeckUI.DeckViewData d) => d.ViewType != DeckUI.eViewType.Empty))
|
|
||||||
{
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
int num = 0;
|
|
||||||
for (int num2 = 0; num2 < list2.Count; num2++)
|
|
||||||
{
|
|
||||||
if (num2 % 9 == 0)
|
|
||||||
{
|
|
||||||
if (list2[num2].ViewType == DeckUI.eViewType.Empty)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
num++;
|
|
||||||
string groupName = DeckListUtility.DeckListHeader(deckGroup.AttributeType, num);
|
|
||||||
list.Add(new PageData(new List<DeckUI.DeckViewData>(), deckGroup.DeckFormat, deckGroup.AttributeType, groupName));
|
|
||||||
}
|
|
||||||
list.Last().AddDeckViewList(list2[num2]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return list;
|
|
||||||
}
|
|
||||||
|
|
||||||
private PageData(List<DeckUI.DeckViewData> deckViewList, Format format, DeckAttributeType attributeType, string groupName)
|
private PageData(List<DeckUI.DeckViewData> deckViewList, Format format, DeckAttributeType attributeType, string groupName)
|
||||||
{
|
{
|
||||||
DeckViewList = deckViewList;
|
DeckViewList = deckViewList;
|
||||||
@@ -129,29 +98,14 @@ public class DeckSelectUI : MonoBehaviour
|
|||||||
[SerializeField]
|
[SerializeField]
|
||||||
private UILabel _titleLabel;
|
private UILabel _titleLabel;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private GameObject _deckTableRoot;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private UIPageIndicator _pageIndicatorOriginal;
|
|
||||||
|
|
||||||
private UIPageIndicator _pageIndicator;
|
private UIPageIndicator _pageIndicator;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private GameObject _pageIndicatorRoot;
|
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private UIButton _leftButton;
|
private UIButton _leftButton;
|
||||||
|
|
||||||
[SerializeField]
|
[SerializeField]
|
||||||
private UIButton _rightButton;
|
private UIButton _rightButton;
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private BoxCollider _flickCollider;
|
|
||||||
|
|
||||||
[SerializeField]
|
|
||||||
private UILabel _noDeckText;
|
|
||||||
|
|
||||||
private DeckTable[] _deckTables = new DeckTable[2];
|
private DeckTable[] _deckTables = new DeckTable[2];
|
||||||
|
|
||||||
private int _deckTableIndex;
|
private int _deckTableIndex;
|
||||||
@@ -164,27 +118,10 @@ public class DeckSelectUI : MonoBehaviour
|
|||||||
|
|
||||||
private List<PageData> _pageList;
|
private List<PageData> _pageList;
|
||||||
|
|
||||||
private bool _isInitialized;
|
|
||||||
|
|
||||||
private bool _canUseNonPossessionCard;
|
private bool _canUseNonPossessionCard;
|
||||||
|
|
||||||
public bool IsPageMoving { get; private set; }
|
public bool IsPageMoving { get; private set; }
|
||||||
|
|
||||||
private void ChangePage(int nextPageIndex, ChangeMoveDirection moveDirection)
|
|
||||||
{
|
|
||||||
if (!IsPageMoving && IsValidPageIndex(nextPageIndex))
|
|
||||||
{
|
|
||||||
PageData pageData = _pageList[nextPageIndex];
|
|
||||||
_currentPageIndex = nextPageIndex;
|
|
||||||
_titleLabel.text = pageData.GroupName;
|
|
||||||
ChangeDeckTable(pageData, moveDirection);
|
|
||||||
_pageIndicator.UpdateIndicator(_currentPageIndex + 1);
|
|
||||||
_leftButton.gameObject.SetActive(0 < nextPageIndex);
|
|
||||||
_rightButton.gameObject.SetActive(nextPageIndex < _pageList.Count - 1);
|
|
||||||
OnChangePage.Call(pageData.Format);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private bool IsValidPageIndex(int pageIndex)
|
private bool IsValidPageIndex(int pageIndex)
|
||||||
{
|
{
|
||||||
if (_pageList.Count <= pageIndex)
|
if (_pageList.Count <= pageIndex)
|
||||||
@@ -225,13 +162,4 @@ public class DeckSelectUI : MonoBehaviour
|
|||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void DeleteResource()
|
|
||||||
{
|
|
||||||
if (_resourcePathList != null)
|
|
||||||
{
|
|
||||||
Toolbox.ResourcesManager.RemoveAssetGroup(_resourcePathList);
|
|
||||||
_resourcePathList.Clear();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,7 +325,7 @@ public void Play(int hash, int layer, float normalizedTime) { }
|
|||||||
public float speed { get; set; } public void Update(float dt) { }
|
public float speed { get; set; } public void Update(float dt) { }
|
||||||
public AnimatorStateInfo GetCurrentAnimatorStateInfo(int layer) => default;
|
public AnimatorStateInfo GetCurrentAnimatorStateInfo(int layer) => default;
|
||||||
}
|
}
|
||||||
public class AnimationCurve { public AnimationCurve() { } public AnimationCurve(params Keyframe[] keys) { } public float Evaluate(float t) => 0f; public int length => 0; public Keyframe[] keys { get; set; } public WrapMode preWrapMode { get; set; } public WrapMode postWrapMode { get; set; } public static AnimationCurve Linear(float a, float b, float c, float d) => new AnimationCurve(); }
|
public class AnimationCurve { public AnimationCurve() { } public AnimationCurve(params Keyframe[] keys) { } public float Evaluate(float t) => 0f; public int length => 0; public Keyframe[] keys { get; set; } public WrapMode preWrapMode { get; set; } public WrapMode postWrapMode { get; set; } }
|
||||||
public class AudioClip : Object { public float length => 0f; }
|
public class AudioClip : Object { public float length => 0f; }
|
||||||
public partial class AudioSource : Component { public AudioClip clip { get; set; } public float volume { get; set; } }
|
public partial class AudioSource : Component { public AudioClip clip { get; set; } public float volume { get; set; } }
|
||||||
public partial class Camera : Component
|
public partial class Camera : Component
|
||||||
|
|||||||
Reference in New Issue
Block a user