From 8e7fc8b15aa64e812868eeabcbc8291d28dcb86d Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 3 Jul 2026 21:54:00 -0400 Subject: [PATCH] cull(engine-cleanup): pass-8 phase-2 cascade round 4 after MyPageItemBattle stub --- SVSim.BattleEngine/Engine/FadeUtility.cs | 30 ---- SVSim.BattleEngine/Engine/MyPageCardPanel.cs | 3 - .../Engine/MyPageCardPanelAnimation.cs | 1 - SVSim.BattleEngine/Engine/UITweenAlpha.cs | 133 ------------------ .../IFirstDisplayPageIndexGetter.cs | 8 -- .../Engine/Wizard/DeckSelectUI.cs | 74 +--------- .../Shim/UnityEngine/UnityShim.cs | 2 +- 7 files changed, 2 insertions(+), 249 deletions(-) delete mode 100644 SVSim.BattleEngine/Engine/FadeUtility.cs delete mode 100644 SVSim.BattleEngine/Engine/UITweenAlpha.cs delete mode 100644 SVSim.BattleEngine/Engine/Wizard.DeckSelect.FirstDisplayPageIndexGetter/IFirstDisplayPageIndexGetter.cs diff --git a/SVSim.BattleEngine/Engine/FadeUtility.cs b/SVSim.BattleEngine/Engine/FadeUtility.cs deleted file mode 100644 index ba3dac21..00000000 --- a/SVSim.BattleEngine/Engine/FadeUtility.cs +++ /dev/null @@ -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); - } - } -} diff --git a/SVSim.BattleEngine/Engine/MyPageCardPanel.cs b/SVSim.BattleEngine/Engine/MyPageCardPanel.cs index ecfa2652..63ae7c20 100644 --- a/SVSim.BattleEngine/Engine/MyPageCardPanel.cs +++ b/SVSim.BattleEngine/Engine/MyPageCardPanel.cs @@ -6,9 +6,6 @@ using Wizard; public class MyPageCardPanel : MonoBehaviour { - [SerializeField] - private GameObject _effect; - [SerializeField] private bool enableMaintenanceCheck; diff --git a/SVSim.BattleEngine/Engine/MyPageCardPanelAnimation.cs b/SVSim.BattleEngine/Engine/MyPageCardPanelAnimation.cs index 025c81a4..550ce45a 100644 --- a/SVSim.BattleEngine/Engine/MyPageCardPanelAnimation.cs +++ b/SVSim.BattleEngine/Engine/MyPageCardPanelAnimation.cs @@ -4,7 +4,6 @@ public class MyPageCardPanelAnimation : MonoBehaviour { public enum State { - End } private float[] _randomTimer; diff --git a/SVSim.BattleEngine/Engine/UITweenAlpha.cs b/SVSim.BattleEngine/Engine/UITweenAlpha.cs deleted file mode 100644 index 93ece443..00000000 --- a/SVSim.BattleEngine/Engine/UITweenAlpha.cs +++ /dev/null @@ -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(); - if (_panel != null) - { - _rect = _panel; - } - else - { - _uiWidget = base.gameObject.GetComponent(); - if (_uiWidget == null && _panel == null) - { - _uiWidget = base.gameObject.AddComponent(); - } - _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); - } - } - } -} diff --git a/SVSim.BattleEngine/Engine/Wizard.DeckSelect.FirstDisplayPageIndexGetter/IFirstDisplayPageIndexGetter.cs b/SVSim.BattleEngine/Engine/Wizard.DeckSelect.FirstDisplayPageIndexGetter/IFirstDisplayPageIndexGetter.cs deleted file mode 100644 index 9fbc3936..00000000 --- a/SVSim.BattleEngine/Engine/Wizard.DeckSelect.FirstDisplayPageIndexGetter/IFirstDisplayPageIndexGetter.cs +++ /dev/null @@ -1,8 +0,0 @@ -using System.Collections.Generic; - -namespace Wizard.DeckSelect.FirstDisplayPageIndexGetter; - -public interface IFirstDisplayPageIndexGetter -{ - int Get(List pageList, Format viewFormat, DeckData primaryDisplayDeck, bool canUseNonPossessionCard); -} diff --git a/SVSim.BattleEngine/Engine/Wizard/DeckSelectUI.cs b/SVSim.BattleEngine/Engine/Wizard/DeckSelectUI.cs index 6ca15e40..47ba75e1 100644 --- a/SVSim.BattleEngine/Engine/Wizard/DeckSelectUI.cs +++ b/SVSim.BattleEngine/Engine/Wizard/DeckSelectUI.cs @@ -16,9 +16,7 @@ public class DeckSelectUI : MonoBehaviour private enum ChangeMoveDirection { NONE, - RIGHT, - LEFT - } + RIGHT } public class PageData { @@ -30,35 +28,6 @@ public class DeckSelectUI : MonoBehaviour public List DeckViewList { get; private set; } - public static List CreatePageList(List deckGroupList, bool isVisibleCreateNew) - { - List list = new List(); - foreach (DeckGroup deckGroup in deckGroupList) - { - List 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(), deckGroup.DeckFormat, deckGroup.AttributeType, groupName)); - } - list.Last().AddDeckViewList(list2[num2]); - } - } - return list; - } - private PageData(List deckViewList, Format format, DeckAttributeType attributeType, string groupName) { DeckViewList = deckViewList; @@ -129,29 +98,14 @@ public class DeckSelectUI : MonoBehaviour [SerializeField] private UILabel _titleLabel; - [SerializeField] - private GameObject _deckTableRoot; - - [SerializeField] - private UIPageIndicator _pageIndicatorOriginal; - private UIPageIndicator _pageIndicator; - [SerializeField] - private GameObject _pageIndicatorRoot; - [SerializeField] private UIButton _leftButton; [SerializeField] private UIButton _rightButton; - [SerializeField] - private BoxCollider _flickCollider; - - [SerializeField] - private UILabel _noDeckText; - private DeckTable[] _deckTables = new DeckTable[2]; private int _deckTableIndex; @@ -164,27 +118,10 @@ public class DeckSelectUI : MonoBehaviour private List _pageList; - private bool _isInitialized; - private bool _canUseNonPossessionCard; 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) { if (_pageList.Count <= pageIndex) @@ -225,13 +162,4 @@ public class DeckSelectUI : MonoBehaviour }); } - - private void DeleteResource() - { - if (_resourcePathList != null) - { - Toolbox.ResourcesManager.RemoveAssetGroup(_resourcePathList); - _resourcePathList.Clear(); - } - } } diff --git a/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs b/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs index f81f32de..f9fbc4ae 100644 --- a/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs +++ b/SVSim.BattleEngine/Shim/UnityEngine/UnityShim.cs @@ -325,7 +325,7 @@ public void Play(int hash, int layer, float normalizedTime) { } public float speed { get; set; } public void Update(float dt) { } 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 partial class AudioSource : Component { public AudioClip clip { get; set; } public float volume { get; set; } } public partial class Camera : Component