From b148eb296850895a04214a4b192da0294e6d7d57 Mon Sep 17 00:00:00 2001 From: gamer147 Date: Fri, 3 Jul 2026 22:19:20 -0400 Subject: [PATCH] cull(engine-cleanup): pass-8 phase-2 cascade round 2 after AreaSelectUI stub --- SVSim.BattleEngine/Engine/AreaSelInfo.cs | 197 ------------------ SVSim.BattleEngine/Engine/StoryChapterData.cs | 4 - SVSim.BattleEngine/Engine/StoryInfo.cs | 1 - SVSim.BattleEngine/Engine/StorySection.cs | 4 - SVSim.BattleEngine/Engine/StorySectionData.cs | 131 ------------ .../Engine/Wizard/AreaSelectClearReward.cs | 23 -- .../Engine/Wizard/DegreeHelper.cs | 12 -- SVSim.BattleEngine/Engine/Wizard/Master.cs | 5 - SVSim.BattleEngine/Engine/iTween.cs | 123 ----------- .../Shim/Generated/UIManager.g.cs | 2 - .../Shim/View/StoryTitleStubs.cs | 1 - .../Shim/View/StoryWorldStubs.cs | 2 - 12 files changed, 505 deletions(-) delete mode 100644 SVSim.BattleEngine/Engine/StorySection.cs delete mode 100644 SVSim.BattleEngine/Engine/StorySectionData.cs diff --git a/SVSim.BattleEngine/Engine/AreaSelInfo.cs b/SVSim.BattleEngine/Engine/AreaSelInfo.cs index ee914a64..be8289d6 100644 --- a/SVSim.BattleEngine/Engine/AreaSelInfo.cs +++ b/SVSim.BattleEngine/Engine/AreaSelInfo.cs @@ -56,9 +56,6 @@ public class AreaSelInfo : MonoBehaviour } }; - [SerializeField] - private GameObject _clearRewardPrefab; - private List _clearRewardList = new List(); [SerializeField] @@ -78,206 +75,12 @@ public class AreaSelInfo : MonoBehaviour private List _cardObjList = new List(); - [SerializeField] - private GameObject CardDetailRoot; - - [SerializeField] - private CardDetailUI CardDetailPrefab; - private CardDetailUI _cardDetail; private List _loadFileList = new List(); private bool _isLoadEnd = true; - private void RepositionRewards() - { - for (int i = 0; i < _tableRewardsCategory.Length; i++) - { - _tableRewardsCategory[i].gameObject.SetActive(value: false); - } - for (int j = 0; j < _clearRewardList.Count; j++) - { - if (_clearRewardList[j].gameObject.activeSelf) - { - int num = _clearRewardList[j].RewardGoodsType switch - { - UserGoods.Type.Card => 0, - UserGoods.Type.Sleeve => 1, - _ => 2, - }; - Transform obj = _clearRewardList[j].gameObject.transform; - obj.SetParent(_tableRewardsCategory[num].transform); - obj.SetAsLastSibling(); - _tableRewardsCategory[num].gameObject.SetActive(value: true); - } - } - for (int k = 0; k < _tableRewardsCategory.Length; k++) - { - if (_tableRewardsCategory[k].gameObject.activeInHierarchy) - { - _tableRewardsCategory[k].Reposition(); - } - } - _tableRoot.Reposition(); - if (_tableRewardsCategory[0].gameObject.activeInHierarchy) - { - _tableRoot.transform.localPosition = REWARD_TABLE_CARD_POSITION; - for (int l = 0; l < _tableRewardsCategory.Length; l++) - { - if (l != 0) - { - Vector3 localPosition = _tableRewardsCategory[l].transform.localPosition; - localPosition.x += -16f; - _tableRewardsCategory[l].transform.localPosition = localPosition; - } - } - } - else - { - _tableRoot.transform.localPosition = REWARD_TABLE_DEFAULT_POSITION; - } - } - - private void SetRewardBackgroundWidth() - { - float num = 0f; - for (int i = 0; i < _clearRewardList.Count; i++) - { - if (_clearRewardList[i].gameObject.activeInHierarchy) - { - UserGoods.Type rewardGoodsType = _clearRewardList[i].RewardGoodsType; - num += REWARD_BG_OFFSET_MAGNIFICATION[rewardGoodsType]; - } - } - int width = 250 + (int)(90f * num); - _spriteRewardBackground.width = width; - } - - private void SetAcquiredLabel(bool isAcquired) - { - _labelAcquired.gameObject.SetActive(isAcquired); - if (!isAcquired) - { - return; - } - float a = float.MaxValue; - float num = float.MinValue; - bool flag = true; - for (int i = 0; i < _clearRewardList.Count; i++) - { - if (_clearRewardList[i].gameObject.activeInHierarchy) - { - Transform rewardTransform = _clearRewardList[i].GetRewardTransform(); - a = Mathf.Min(a, rewardTransform.position.x); - num = Mathf.Max(num, rewardTransform.position.x); - if (_clearRewardList[i].RewardGoodsType != UserGoods.Type.Degree) - { - flag = false; - } - } - } - Vector3 position = _labelAcquired.transform.position; - position.x = Mathf.Lerp(a, num, 0.5f); - _labelAcquired.transform.position = position; - Vector3 localPosition = _labelAcquired.transform.localPosition; - localPosition.y = _tableRoot.transform.localPosition.y + (flag ? (-10f) : 0f); - _labelAcquired.transform.localPosition = localPosition; - } - - private IEnumerator LoadClearPresentInner(List cardidlist, List rewardPathList) - { - UIManager uiMgr = UIManager.GetInstance(); - UIBase_CardManager uiCardMgr = uiMgr.getUIBase_CardManager(); - bool isLoadRewardEnd = false; - _loadFileList.Clear(); - bool isLoadCard = cardidlist.Count > 0; - if (isLoadCard) - { - int layer = LayerMask.NameToLayer("FrontUI"); - uiMgr.CardLoadSelect(base.gameObject, cardidlist, layer, is2D: true); - } - StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(rewardPathList, delegate - { - _loadFileList.AddRange(rewardPathList); - isLoadRewardEnd = true; - })); - while ((isLoadCard && (!uiCardMgr.getCreateEndFlag() || !uiCardMgr.isAssetAllReady)) || !isLoadRewardEnd) - { - yield return null; - } - _cardObjList = uiMgr.getCardList2DObjs(); - if (_cardObjList != null) - { - for (int num = 0; num < _cardObjList.Count; num++) - { - GameObject cardObj = _cardObjList[num].CardObj; - if (!(cardObj == null)) - { - cardObj.SetActive(value: false); - UITexture[] componentsInChildren = cardObj.GetComponentsInChildren(includeInactive: true); - for (int num2 = 0; num2 < componentsInChildren.Length; num2++) - { - componentsInChildren[num2].depth += 50; - } - UILabel[] componentsInChildren2 = cardObj.GetComponentsInChildren(includeInactive: true); - for (int num3 = 0; num3 < componentsInChildren2.Length; num3++) - { - componentsInChildren2[num3].depth += 50; - } - UISprite[] componentsInChildren3 = cardObj.GetComponentsInChildren(includeInactive: true); - for (int num4 = 0; num4 < componentsInChildren3.Length; num4++) - { - componentsInChildren3[num4].depth += 50; - } - cardObj.GetComponent().HideNum(); - cardObj.AddComponent().size = CLEARPRESENT_CARD_COLLISIONSIZE; - cardObj.AddComponent().onClick = _cardDetail.OnPushCardDetailOn; - } - } - } - for (int num5 = 0; num5 < 3; num5++) - { - _clearRewardList[num5].Init(_cardObjList, _cardObjEvacuationRoot); - } - _isLoadEnd = true; - } - - public void ReleaseClearPresent() - { - if (_cardDetail != null) - { - Object.Destroy(_cardDetail.gameObject); - _cardDetail = null; - } - if (_cardObjList != null) - { - for (int i = 0; i < _cardObjList.Count; i++) - { - Object.Destroy(_cardObjList[i].CardObj.gameObject); - } - _cardObjList.Clear(); - } - Toolbox.ResourcesManager.RemoveAssetGroup(_loadFileList); - _loadFileList.Clear(); - } - - private void OnCardDetailClose() - { - } - - public void MoveToScreenObj(GameObject target, float localPosX, float time) - { - if (Mathf.Approximately(time, 0f)) - { - Vector3 localPosition = target.transform.localPosition; - localPosition.x = localPosX; - target.transform.localPosition = localPosition; - return; - } - iTween.MoveTo(target, iTween.Hash("islocal", true, "x", localPosX, "time", time)); - } - public static string GetPresentItemName(int itemID, long userGoodsId) { switch ((UserGoods.Type)itemID) diff --git a/SVSim.BattleEngine/Engine/StoryChapterData.cs b/SVSim.BattleEngine/Engine/StoryChapterData.cs index cfee0dc0..ad01e3a6 100644 --- a/SVSim.BattleEngine/Engine/StoryChapterData.cs +++ b/SVSim.BattleEngine/Engine/StoryChapterData.cs @@ -118,10 +118,6 @@ public class StoryChapterData : HeaderData public int TutorialStep { get; } - public bool IsAlreadyRead => ClearStatus == ChapterClearStatus.AlreadyRead; - - public bool IsCleared => ClearStatus == ChapterClearStatus.Cleared; - public bool ExistsSubChapter => SubChapterDatas.Count > 0; public BattleSettingData FindBattleSettingDataByPlayerCharaId(int playerCharaId) diff --git a/SVSim.BattleEngine/Engine/StoryInfo.cs b/SVSim.BattleEngine/Engine/StoryInfo.cs index 936171c7..529f04ed 100644 --- a/SVSim.BattleEngine/Engine/StoryInfo.cs +++ b/SVSim.BattleEngine/Engine/StoryInfo.cs @@ -2,7 +2,6 @@ using System.Collections.Generic; public class StoryInfo : HeaderData { - public List ChapterDataList { get; set; } = new List(); public bool IsPreBuildDeck { get; set; } diff --git a/SVSim.BattleEngine/Engine/StorySection.cs b/SVSim.BattleEngine/Engine/StorySection.cs deleted file mode 100644 index 193befdc..00000000 --- a/SVSim.BattleEngine/Engine/StorySection.cs +++ /dev/null @@ -1,4 +0,0 @@ -public class StorySection -{ - public static readonly int TUTORIAL_SECTION_ID; -} diff --git a/SVSim.BattleEngine/Engine/StorySectionData.cs b/SVSim.BattleEngine/Engine/StorySectionData.cs deleted file mode 100644 index 00db6464..00000000 --- a/SVSim.BattleEngine/Engine/StorySectionData.cs +++ /dev/null @@ -1,131 +0,0 @@ -using LitJson; -using Wizard; -using Wizard.Story; - -public class StorySectionData -{ - private static readonly string FORMAT_STORY_SECTION_NO = "story_section_no_{0:D2}"; - - public int Id { get; } - - public int AllStoryOrderId { get; } - - public string NameNo { get; } - - public string Name { get; } - - public string ImageName { get; } - - public string OffStateButtonTextureName { get; } - - public string OnStateButtonTextureName { get; } - - public bool IsLeaderSelect { get; } - - public bool IsFinish { get; } - - public bool IsUnderMaintenance { get; } - - public int ReleasedCharaCount { get; } - - public int FinishedCharaCount { get; } - - public int BackGroundId { get; } - - public StoryApiType StoryApiType { get; } - - public bool IsNew { get; } - - public bool IsSpoiler { get; } - - public string SpoilerMessage { get; } - - public UIManager.ViewScene ChapterSelectionView { get; } - - public bool IsPlayAnotherEndingAppearanceAnimation { get; } - - public bool IsTutorialCategory => Id == StorySection.TUTORIAL_SECTION_ID; - - public StorySectionData(JsonData jsonData) - { - Id = jsonData["section_id"].ToInt(); - AllStoryOrderId = jsonData["all_story_order_id"].ToInt(); - NameNo = GetNameNoText(jsonData); - Name = GetNameText(jsonData); - ImageName = jsonData["image_name"].ToString(); - OffStateButtonTextureName = GetOffStateButtonTextureName(jsonData); - OnStateButtonTextureName = GetOnStateButtonTextureName(jsonData); - IsLeaderSelect = jsonData["is_leader_select"].ToBoolean(); - IsFinish = jsonData["is_finished"].ToBoolean(); - IsUnderMaintenance = jsonData["is_under_maintenance"].ToBoolean(); - ReleasedCharaCount = jsonData["released_chara_count"].ToInt(); - FinishedCharaCount = jsonData["finished_chara_count"].ToInt(); - BackGroundId = jsonData["back_ground_id"].ToInt(); - IsNew = jsonData["is_new"].ToBoolean(); - IsSpoiler = jsonData.GetValueOrDefault("is_spoiler", defaultValue: false); - if (IsSpoiler) - { - SpoilerMessage = jsonData.GetValueOrDefault("spoiler_message", string.Empty); - } - StoryApiType = GetStoryApiType(jsonData["story_type_overwrite"].ToInt()); - ChapterSelectionView = GetChapterSelectionView(jsonData); - IsPlayAnotherEndingAppearanceAnimation = jsonData["is_play_another_end_appearance_animation"].ToBoolean(); - } - - public StorySectionData(int id, int backgroundId, UIManager.ViewScene chapterSelectionView) - { - Id = id; - BackGroundId = backgroundId; - ChapterSelectionView = chapterSelectionView; - } - - private static string GetNameNoText(JsonData jsonData) - { - int num = jsonData["section_id"].ToInt(); - string key = string.Format(FORMAT_STORY_SECTION_NO, num); - return Data.Master.GetStorySectionTitleText(key); - } - - private static string GetNameText(JsonData jsonData) - { - string key = jsonData["name"].ToString(); - return Data.Master.GetStorySectionTitleText(key); - } - - private static string GetOffStateButtonTextureName(JsonData jsonData) - { - return jsonData["image_name"].ToString() + "_off"; - } - - private static string GetOnStateButtonTextureName(JsonData jsonData) - { - return jsonData["image_name"].ToString() + "_on"; - } - - private static UIManager.ViewScene GetChapterSelectionView(JsonData jsonData) - { - if (jsonData["chapter_select_type"].ToInt() != 2) - { - return UIManager.ViewScene.AreaSelect; - } - return UIManager.ViewScene.StoryChapterSelectionFlowChart; - } - - private static StoryApiType GetStoryApiType(int storyTypeOverwrite) - { - switch (storyTypeOverwrite) - { - case 0: - return StoryApiType.None; - case 1: - return StoryApiType.MainStory; - case 2: - return StoryApiType.LimitedStory; - case 3: - return StoryApiType.EventStory; - default: - Debug.LogError("StorySectionのstory_type_overwriteに想定外の値が設定された"); - return StoryApiType.None; - } - } -} diff --git a/SVSim.BattleEngine/Engine/Wizard/AreaSelectClearReward.cs b/SVSim.BattleEngine/Engine/Wizard/AreaSelectClearReward.cs index 1c656bcb..235c1838 100644 --- a/SVSim.BattleEngine/Engine/Wizard/AreaSelectClearReward.cs +++ b/SVSim.BattleEngine/Engine/Wizard/AreaSelectClearReward.cs @@ -96,29 +96,6 @@ internal class AreaSelectClearReward : MonoBehaviour HideAllLayout(); } - public void ShowReward(UserGoods.Type goodsType, long goodsId, int goodsCount, bool isAcquired) - { - HideAllLayout(); - switch (goodsType) - { - case UserGoods.Type.Card: - ShowCard((int)goodsId, goodsCount, isAcquired); - break; - case UserGoods.Type.RedEther: - case UserGoods.Type.Rupy: - ShowSprite(goodsType, goodsCount, isAcquired); - break; - case UserGoods.Type.Item: - case UserGoods.Type.Sleeve: - case UserGoods.Type.Emblem: - case UserGoods.Type.Degree: - case UserGoods.Type.Skin: - ShowTexture(goodsType, goodsId, goodsCount, isAcquired); - break; - } - RewardGoodsType = goodsType; - } - public Transform GetRewardTransform() { switch (RewardGoodsType) diff --git a/SVSim.BattleEngine/Engine/Wizard/DegreeHelper.cs b/SVSim.BattleEngine/Engine/Wizard/DegreeHelper.cs index aeea3a63..1e42e5a3 100644 --- a/SVSim.BattleEngine/Engine/Wizard/DegreeHelper.cs +++ b/SVSim.BattleEngine/Engine/Wizard/DegreeHelper.cs @@ -29,18 +29,6 @@ public class DegreeHelper return ResourcesManager.AssetLoadPathType.DegreeMaterial_M; } - public static List GetDegreeResourceList(long id, DegreeType type, bool isFetch) - { - List list = new List(); - list.Add(GetDegreePath(id, type, isFetch)); - if (Data.Master.DegreeMgr.Get((int)id).IsPremium) - { - list.Add(GetDegreeMaterialPath(id, type, isFetch)); - list.Add(GetMaskPath(id, isFetch)); - } - return list; - } - private static string GetDegreePath(long id, DegreeType type, bool isFetch) { return Toolbox.ResourcesManager.GetAssetTypePath(id.ToString("0000"), GetResourceType(type), isFetch); diff --git a/SVSim.BattleEngine/Engine/Wizard/Master.cs b/SVSim.BattleEngine/Engine/Wizard/Master.cs index e16dd9ff..65ea567c 100644 --- a/SVSim.BattleEngine/Engine/Wizard/Master.cs +++ b/SVSim.BattleEngine/Engine/Wizard/Master.cs @@ -282,11 +282,6 @@ public class Master return GetText(key, PracticeTextDic); } - public string GetStorySectionTitleText(string key) - { - return GetText(key, StorySectionTitleTextDic); - } - public string GetMyPageBGText(string key) { return GetText(key, MyPageBGTextDic); diff --git a/SVSim.BattleEngine/Engine/iTween.cs b/SVSim.BattleEngine/Engine/iTween.cs index 64543570..d320d974 100644 --- a/SVSim.BattleEngine/Engine/iTween.cs +++ b/SVSim.BattleEngine/Engine/iTween.cs @@ -332,11 +332,6 @@ public class iTween : MonoBehaviour Launch(target, args); } - public static void MoveBy(GameObject target, Vector3 amount, float time) - { - MoveBy(target, Hash("amount", amount, "time", time)); - } - public static void MoveBy(GameObject target, Hashtable args) { args = CleanArgs(args); @@ -1847,124 +1842,6 @@ public class iTween : MonoBehaviour } } - public static void RotateUpdate(GameObject target, Hashtable args) - { - CleanArgs(args); - Vector3[] array = new Vector3[4]; - Vector3 eulerAngles = target.transform.eulerAngles; - float num; - if (args.Contains("time")) - { - num = (float)args["time"]; - num *= Defaults.updateTimePercentage; - } - else - { - num = Defaults.updateTime; - } - bool flag = ((!args.Contains("islocal")) ? Defaults.isLocal : ((bool)args["islocal"])); - if (flag) - { - array[0] = target.transform.localEulerAngles; - } - else - { - array[0] = target.transform.eulerAngles; - } - if (args.Contains("rotation")) - { - if (args["rotation"].GetType() == typeof(Transform)) - { - Transform transform = (Transform)args["rotation"]; - array[1] = transform.eulerAngles; - } - else if (args["rotation"].GetType() == typeof(Vector3)) - { - array[1] = (Vector3)args["rotation"]; - } - } - array[3].x = Mathf.SmoothDampAngle(array[0].x, array[1].x, ref array[2].x, num); - array[3].y = Mathf.SmoothDampAngle(array[0].y, array[1].y, ref array[2].y, num); - array[3].z = Mathf.SmoothDampAngle(array[0].z, array[1].z, ref array[2].z, num); - if (flag) - { - target.transform.localEulerAngles = array[3]; - } - else - { - target.transform.eulerAngles = array[3]; - } - if (target.GetComponent() != null) - { - Vector3 eulerAngles2 = target.transform.eulerAngles; - target.transform.eulerAngles = eulerAngles; - target.GetComponent().MoveRotation(Quaternion.Euler(eulerAngles2)); - } - } - - public static void LookUpdate(GameObject target, Hashtable args) - { - CleanArgs(args); - Vector3[] array = new Vector3[5]; - float num; - if (args.Contains("looktime")) - { - num = (float)args["looktime"]; - num *= Defaults.updateTimePercentage; - } - else if (args.Contains("time")) - { - num = (float)args["time"] * 0.15f; - num *= Defaults.updateTimePercentage; - } - else - { - num = Defaults.updateTime; - } - array[0] = target.transform.eulerAngles; - if (args.Contains("looktarget")) - { - if (args["looktarget"].GetType() == typeof(Transform)) - { - target.transform.LookAt((Transform)args["looktarget"], ((Vector3?)args["up"]) ?? Defaults.up); - } - else if (args["looktarget"].GetType() == typeof(Vector3)) - { - target.transform.LookAt((Vector3)args["looktarget"], ((Vector3?)args["up"]) ?? Defaults.up); - } - array[1] = target.transform.eulerAngles; - target.transform.eulerAngles = array[0]; - array[3].x = Mathf.SmoothDampAngle(array[0].x, array[1].x, ref array[2].x, num); - array[3].y = Mathf.SmoothDampAngle(array[0].y, array[1].y, ref array[2].y, num); - array[3].z = Mathf.SmoothDampAngle(array[0].z, array[1].z, ref array[2].z, num); - target.transform.eulerAngles = array[3]; - if (args.Contains("axis")) - { - array[4] = target.transform.eulerAngles; - switch ((string)args["axis"]) - { - case "x": - array[4].y = array[0].y; - array[4].z = array[0].z; - break; - case "y": - array[4].x = array[0].x; - array[4].z = array[0].z; - break; - case "z": - array[4].x = array[0].x; - array[4].y = array[0].y; - break; - } - target.transform.eulerAngles = array[4]; - } - } - else - { - Debug.LogError("iTween Error: LookUpdate needs a 'looktarget' property!"); - } - } - public static float PathLength(Vector3[] path) { float num = 0f; diff --git a/SVSim.BattleEngine/Shim/Generated/UIManager.g.cs b/SVSim.BattleEngine/Shim/Generated/UIManager.g.cs index 31ec9403..bb2c3c09 100644 --- a/SVSim.BattleEngine/Shim/Generated/UIManager.g.cs +++ b/SVSim.BattleEngine/Shim/Generated/UIManager.g.cs @@ -23,8 +23,6 @@ public partial class UIManager ClassSelectionPage, StorySelectPage, StorySelectionWorld, - AreaSelect, - StoryChapterSelectionFlowChart, QuestSelectionPage, DeckList, DeckCardEdit, diff --git a/SVSim.BattleEngine/Shim/View/StoryTitleStubs.cs b/SVSim.BattleEngine/Shim/View/StoryTitleStubs.cs index 181b7d2b..c5c2c927 100644 --- a/SVSim.BattleEngine/Shim/View/StoryTitleStubs.cs +++ b/SVSim.BattleEngine/Shim/View/StoryTitleStubs.cs @@ -10,7 +10,6 @@ namespace Wizard.Story namespace Wizard.Story.ChapterSelection { - public class TitlePanelBase : UnityEngine.MonoBehaviour { public bool IsFinishInit { get; } } } namespace Wizard.UIFriend diff --git a/SVSim.BattleEngine/Shim/View/StoryWorldStubs.cs b/SVSim.BattleEngine/Shim/View/StoryWorldStubs.cs index ca4e0d4d..6ddf12f7 100644 --- a/SVSim.BattleEngine/Shim/View/StoryWorldStubs.cs +++ b/SVSim.BattleEngine/Shim/View/StoryWorldStubs.cs @@ -19,7 +19,5 @@ namespace Wizard.UI.Profile namespace Wizard.Story.ChapterSelection { - public class SectionInfoPanel { } - public class CharaInfoPanel { } public partial class StoryChapterSelectionUtility { } }