cull(engine-cleanup): pass-8 phase-2 cascade round 1 after AreaSelectUI stub

This commit is contained in:
gamer147
2026-07-03 22:18:12 -04:00
parent 7aabb6a405
commit ad525456be
30 changed files with 3 additions and 1767 deletions

View File

@@ -1,207 +0,0 @@
using System;
using Cute;
using UnityEngine;
namespace Wizard;
public class ChapterSelectButton : MonoBehaviour
{
[SerializeField]
private UISprite _notSelectMask;
[SerializeField]
private UISprite _clearMask;
[SerializeField]
private UILabel _clearLabel;
[SerializeField]
private UILabel _chapterNo;
[SerializeField]
private UILabel _chapterName;
[SerializeField]
private UIMarquee _chapterNameMarquee;
[SerializeField]
private UITexture _bg;
[SerializeField]
private GameObject _tapEffectLocator;
[SerializeField]
private UIDragScrollView _dragScrollView;
private StoryChapterData _chapterData;
public Action OnClick { get; set; }
public GameObject TapEffectLocator => _tapEffectLocator;
public Transform ClearLabelTransform => _clearLabel.transform;
public void SetScrollEnable(bool enable)
{
_dragScrollView.enabled = enable;
}
public void SetClearVisible(bool visible)
{
_clearLabel.gameObject.SetActive(visible);
}
public static string GetHeaderPath(StoryChapterData chapterData, bool isFetch)
{
return Toolbox.ResourcesManager.GetAssetTypePath("story_chapter_header_" + chapterData.ChapterButtonBgId.ToString("00"), ResourcesManager.AssetLoadPathType.StoryChapterHeader, isFetch);
}
public void OnStartClearEffect()
{
_clearLabel.gameObject.SetActive(value: true);
_clearLabel.enabled = false;
}
public void OnFinishClearEffect()
{
_clearLabel.enabled = true;
}
public void UpdateClearState(StoryChapterData.ChapterClearStatus clearState)
{
AreaSelectUtility.SetClearLabelColor(_clearLabel, clearState);
}
public void SetChapterData(StoryChapterData chapterData, AreaSelectUI parent, UIScrollView scrollView)
{
_chapterData = chapterData;
_dragScrollView.scrollView = scrollView;
_bg.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(GetHeaderPath(chapterData, isFetch: true));
_bg.gameObject.SetActive(value: true);
_notSelectMask.gameObject.SetActive(value: false);
UpdateClearState(chapterData.ClearStatus);
_clearLabel.gameObject.SetActive(chapterData.IsPlayedChapter);
if (chapterData.IsMaintenanceChapter)
{
Color color = _chapterName.color;
UIManager.SetObjectToGrey(base.gameObject, b: true);
_chapterName.color = color;
_chapterName.text = Data.SystemText.Get("System_0022");
_chapterNo.text = string.Empty;
}
else
{
string chapterTitleStory = parent.GetChapterTitleStory(chapterData.ChapterId);
int num = chapterTitleStory.IndexOf(' ');
_chapterNo.text = chapterTitleStory.Substring(0, num + 1);
_chapterName.text = chapterTitleStory.Substring(num + 1);
_chapterNameMarquee.SetWidthOfNeedsToScroll(324f - (float)_chapterNo.width);
_chapterNameMarquee.Reset();
}
}
public void UpdateSelectStatus(int SelectChapterIndex, int selfIndex, AreaSelectUI parent, bool isinterpscale, UIScrollView scrollView)
{
bool flag = selfIndex == SelectChapterIndex;
int num = 0;
float num2 = 0f;
if (flag)
{
num = 4;
num2 = 1f;
}
else
{
num = 3;
num2 = 0.85f;
}
bool flag2 = parent.IsUseChapterListClearedMask && _chapterData.IsCleared;
if (!_chapterData.IsMaintenanceChapter)
{
Color color = new Color(1f, 1f, 1f, 1f);
color.a = num2;
_bg.color = color;
_notSelectMask.color = color;
_chapterNo.color = color;
_chapterName.color = color;
_clearLabel.color = color;
}
if (_bg.gameObject.activeSelf != flag)
{
_bg.gameObject.SetActive(flag);
SetMarqueeEnable(flag);
}
if (_notSelectMask.gameObject.activeSelf == flag)
{
_notSelectMask.gameObject.SetActive(!flag);
}
if (_clearMask.gameObject.activeSelf != flag2)
{
_clearMask.gameObject.SetActive(flag2);
}
UpdateInterpsScale(isinterpscale, flag);
Vector3 localPosition = base.transform.localPosition;
float num3 = Mathf.Abs(localPosition.y + scrollView.transform.localPosition.y);
float num4 = 200f;
if (num3 < num4)
{
float num5 = num4 - Mathf.Sqrt(num4 * num4 - num3 * num3);
num5 *= 2.5f;
localPosition.x = 190f + num5;
}
else
{
localPosition.x = 530f + num4;
}
base.transform.localPosition = localPosition;
_bg.depth = num;
_notSelectMask.depth = num;
}
public void SetMarqueeEnable(bool enable)
{
if (enable)
{
_chapterNameMarquee.StartMarquee();
}
else
{
_chapterNameMarquee.Reset();
}
}
private void UpdateInterpsScale(bool isinterpscale, bool isSelected)
{
float num = (isSelected ? 1f : 0.75f);
if (isinterpscale)
{
Vector3 localScale = base.transform.localScale;
if (localScale.x < num)
{
localScale.x += Time.deltaTime;
if (localScale.x >= num)
{
localScale.x = num;
}
}
else if (localScale.x > num)
{
localScale.x -= Time.deltaTime;
if (localScale.x <= num)
{
localScale.x = num;
}
}
localScale.y = localScale.x;
base.transform.localScale = localScale;
}
else
{
Vector3 localScale2 = base.transform.localScale;
localScale2.x = num;
localScale2.y = num;
base.transform.localScale = localScale2;
}
}
}

View File

@@ -1,137 +0,0 @@
using System;
using Cute;
using UnityEngine;
namespace Wizard;
public class ChapterSelectSphere : MonoBehaviour
{
[SerializeField]
private UISprite _bodySprite;
[SerializeField]
private UISprite _arrowDownSprite;
[SerializeField]
private UISprite _arrowUpSprite;
private float _arrowAlpha = 1f;
private bool _isArrowAlphaDown = true;
public Action OnClick { get; set; }
public bool IsScrollUpEnable { get; set; }
public bool IsScrollDownEnable { get; set; }
public void UpdateChapterSelectStatus(bool isChapterSelectVisible, bool isSelectEnable)
{
_bodySprite.spriteName = GetBodySpriteName(isChapterSelectVisible, isSelectEnable);
_arrowUpSprite.spriteName = GetArrowSpriteName(isChapterSelectVisible, IsScrollUpEnable);
_arrowDownSprite.spriteName = GetArrowSpriteName(isChapterSelectVisible, IsScrollDownEnable);
_arrowUpSprite.alpha = ((isChapterSelectVisible && IsScrollUpEnable) ? _arrowAlpha : 1f);
_arrowDownSprite.alpha = ((isChapterSelectVisible && IsScrollDownEnable) ? _arrowAlpha : 1f);
}
public void OnSelectChapter(bool isChapterSelectEnable)
{
_arrowUpSprite.spriteName = GetArrowSpriteName(isChapterSelectEnable, IsScrollUpEnable);
_arrowDownSprite.spriteName = GetArrowSpriteName(isChapterSelectEnable, IsScrollDownEnable);
_arrowUpSprite.alpha = (IsScrollUpEnable ? _arrowAlpha : 1f);
_arrowDownSprite.alpha = (IsScrollDownEnable ? _arrowAlpha : 1f);
}
public void UpdateArrowAlpha()
{
if (UpdatePingPongByDeltaTime(ref _arrowAlpha, 0f, 1f, 1f, _isArrowAlphaDown))
{
_isArrowAlphaDown = !_isArrowAlphaDown;
}
if (IsScrollUpEnable)
{
_arrowUpSprite.alpha = _arrowAlpha;
}
if (IsScrollDownEnable)
{
_arrowDownSprite.alpha = _arrowAlpha;
}
}
public void UpdateRotationOnScroll(float areaY, int chapterCount)
{
iTween.Stop(_bodySprite.gameObject);
float z = 0f;
float num = 80f;
float num2 = 50f;
if (areaY >= (float)chapterCount * num - num2)
{
z = (float)chapterCount * num - num2 - areaY;
z /= 7f;
z *= -1f;
}
else if (areaY <= 0f - num2)
{
z = areaY;
z /= 7f;
}
iTween.RotateUpdate(_bodySprite.gameObject, new Vector3(0f, 0f, z), 0.2f);
}
public void ResetRotationOnScroll()
{
iTween.Init(_bodySprite.gameObject);
iTween.RotateTo(_bodySprite.gameObject, iTween.Hash("z", 0, "time", 1.35f, "easetype", iTween.EaseType.easeOutElastic));
}
private string GetArrowSpriteName(bool isChapterSelectEnable, bool isscrollenable)
{
if (isChapterSelectEnable)
{
if (isscrollenable)
{
return "arrow_jog_01";
}
return "arrow_jog_02";
}
return "arrow_jog_03";
}
private string GetBodySpriteName(bool isChapterSelectEnable, bool isChapterListSwitchEnable)
{
if (isChapterListSwitchEnable)
{
if (isChapterSelectEnable)
{
return "btn_jog_01_core";
}
return "btn_jog_03_core";
}
return "btn_jog_03_core";
}
private static bool UpdatePingPongByDeltaTime(ref float val, float min, float max, float speed, bool isdown)
{
bool result = false;
if (isdown)
{
val -= speed * Time.deltaTime;
if (val < min)
{
val = min;
result = true;
}
}
else
{
val += speed * Time.deltaTime;
if (val > max)
{
val = max;
result = true;
}
}
return result;
}
}

View File

@@ -72,8 +72,6 @@ public class Master
public List<PuzzleQuestData> PuzzleQuestDataList { get; private set; }
public List<TutorialAreaSelect> TutorialAreaSelectList { get; set; }
public AIDeckFileNameList AIDeckFileNameList { get; set; }
public AIEmoteFileNameList AIEmoteFileNameList { get; set; }

View File

@@ -307,10 +307,6 @@ public static class PlayerPrefsWrapper
public static readonly KeyValuePair<string, int> DECK_INTRO_IS_MYROTATION_COPY_NOT_EQUAL_PERIOD = new KeyValuePair<string, int>("DECK_INTRO_IS_MYROTATION_COPY_NOT_EQUAL_PERIOD", 1);
public static readonly KeyValuePair<string, int> IS_SECTION20_WERUSA_ANIMATION_PLAYED = new KeyValuePair<string, int>("IS_SECTION_20_WERUSA_ANIMATION_PLAYED", FALSE);
public static readonly KeyValuePair<string, int> IS_SECTION20_NATERA_ANIMATION_PLAYED = new KeyValuePair<string, int>("IS_SECTION_20_NATERA_ANIMATION_PLAYED", FALSE);
public static bool GetBool(KeyValuePair<string, int> id)
{
return PlayerPrefs.GetInt(id.Key, id.Value) == TRUE;

View File

@@ -1,95 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using Cute;
using UnityEngine;
namespace Wizard;
public class ScenarioSummary
{
public class Data
{
public string Title { get; }
public string PastSummary { get; }
public string BeforeSummary { get; }
public string AfterSummary { get; }
public Data()
{
}
public Data(string title, string pastSummary, string beforeSummary, string afterSummary)
{
Title = title;
PastSummary = pastSummary;
BeforeSummary = beforeSummary;
AfterSummary = afterSummary;
}
}
private static readonly int CLASS_NONE;
private Dictionary<string, Data> _dataTable = new Dictionary<string, Data>();
private string _loadedAsset;
public bool IsValid { get; private set; }
public ScenarioSummary(int sectionId, int? sectionClassId)
{
ScenarioSummary scenarioSummary = this;
IsValid = false;
int processedClassId = (sectionClassId.HasValue ? sectionClassId.Value : CLASS_NONE);
ResourcesManager resMgr = Toolbox.ResourcesManager;
string fileName = "scenario_text_summary_" + sectionId;
_loadedAsset = resMgr.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.StoryText);
resMgr.StartCoroutine_LoadAssetGroupAsync(_loadedAsset, delegate
{
foreach (ArrayList item in Utility.ConvertCSV((resMgr.LoadObject(resMgr.GetAssetTypePath(fileName, ResourcesManager.AssetLoadPathType.StoryText, isfetch: true)) as TextAsset).ToString()))
{
string[] array = (string[])item.ToArray(typeof(string));
int num = -1;
if (int.Parse(array[++num]) == processedClassId)
{
string chapterId = array[++num];
string text = array[++num];
int? subChapterId = (string.IsNullOrEmpty(text) ? ((int?)null) : new int?(int.Parse(text)));
string key = CreateKey(chapterId, subChapterId);
Data value = new Data(array[++num], array[++num], array[++num], array[++num]);
scenarioSummary._dataTable.Add(key, value);
}
}
scenarioSummary.IsValid = true;
});
}
public void Dispose()
{
Toolbox.ResourcesManager.RemoveAsset(_loadedAsset);
_loadedAsset = null;
_dataTable.Clear();
}
public Data GetData(string chapterId, int? subChapterId = null)
{
string key = CreateKey(chapterId, subChapterId);
if (_dataTable.TryGetValue(key, out var value))
{
return value;
}
Debug.LogError("チャプター 「" + chapterId + "」 の ScenarioSummary のデータが見つかりませんでした。");
return new Data();
}
private static string CreateKey(string chapterId, int? subChapterId)
{
if (!subChapterId.HasValue || subChapterId == StoryChapterData.SUB_CHAPTER_ALL)
{
return chapterId;
}
return $"{chapterId}_{subChapterId}";
}
}

View File

@@ -1,78 +0,0 @@
using UnityEngine;
namespace Wizard;
public class UIMarquee : MonoBehaviour
{
private enum State
{
Stop,
WaitForMove }
[SerializeField]
[Range(0f, float.MaxValue)]
private float _widthOfNeedsToScroll = 256f;
[SerializeField]
private UIPanel _panel;
[SerializeField]
private UIWidget _content;
private State _state;
private float _timeCount;
private float _startX;
public void StartMarquee()
{
if ((float)_content.width < _widthOfNeedsToScroll)
{
SetState(State.Stop);
}
else
{
SetState(State.WaitForMove);
}
}
public void Reset()
{
SetState(State.Stop);
SetAlpha(1f);
}
public void SetWidthOfNeedsToScroll(float width)
{
_widthOfNeedsToScroll = width;
}
private void SetState(State state)
{
_state = state;
_timeCount = 0f;
_panel.UpdateAnchors();
_content.UpdateAnchors();
_startX = CalcStartX();
SetContentPosX(_startX);
}
private float CalcStartX()
{
return _panel.baseClipRegion.x - _panel.baseClipRegion.z * 0.5f;
}
private void SetContentPosX(float posX)
{
Transform obj = _content.transform;
Vector3 localPosition = obj.localPosition;
localPosition.x = posX;
obj.localPosition = localPosition;
}
private void SetAlpha(float alpha)
{
_panel.alpha = alpha;
}
}