port(m1): wave 6b — View base members + app-type stubs (772->696)
- BattleCardView shim: GameObject, HandFrameEffect, GetCurrentIconLayout (fixes Player/EnemyClassBattleCardView.GameObject inheritance). - BattlePlayerViewBase.AlwaysShowStatusPanel; NullBattleCardView.ReleaseSharedDummy. - EvolutionTouchProcessor: 4 events (OnFocus/Unfocus/Select/NotSelect Target) hand-added — m1_stub_gen drops `event` decls. - Generated full-surface stubs: StoryWorldDataManager, GenerateDeckCode, GameSetup, CommonPrefabContainer, ApplicationFinishManager, EvolutionConfirmation, ReplayDataHandler (hand stubs -> partial). - Closure pulled by StoryWorldDataManager full-surface: 4 verbatim copies (StoryChapter/Summary/LeaderSelect dialogs, ClassIconName) + empty stubs StoryWorldData/BattleRecovery/ResourceDownloader/TemporaryAssetDeleter (non-battle, signature-only). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
20
SVSim.BattleEngine/Engine/Wizard/ClassIconName.cs
Normal file
20
SVSim.BattleEngine/Engine/Wizard/ClassIconName.cs
Normal file
@@ -0,0 +1,20 @@
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class ClassIconName : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private UILabel _labelClassName;
|
||||
|
||||
[SerializeField]
|
||||
private UISprite _spriteClassIcon;
|
||||
|
||||
public void SetClass(int classId)
|
||||
{
|
||||
ClassCharacterMasterData charaPrmByClassId = GameMgr.GetIns().GetDataMgr().GetCharaPrmByClassId(classId);
|
||||
_labelClassName.text = charaPrmByClassId._className;
|
||||
ClassCharaPrm.SetClassLabelSetting(_labelClassName, charaPrmByClassId.clan);
|
||||
_spriteClassIcon.spriteName = ClassCharaPrm.GetIconSpriteName(charaPrmByClassId.clan);
|
||||
}
|
||||
}
|
||||
35
SVSim.BattleEngine/Engine/Wizard/StoryChapterSelectDialog.cs
Normal file
35
SVSim.BattleEngine/Engine/Wizard/StoryChapterSelectDialog.cs
Normal file
@@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class StoryChapterSelectDialog : MonoBehaviour
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _originalObject;
|
||||
|
||||
[SerializeField]
|
||||
private Transform _objRoot;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _descriptionText;
|
||||
|
||||
public void Initialize(ScenarioSummary scenarioSummary, StoryChapterData chapterData, Action<StoryChapterData.SubChapterData> unitReadAction, Action allReadAction)
|
||||
{
|
||||
string chapterId = chapterData.ChapterId;
|
||||
_descriptionText.text = Data.SystemText.Get("Story_0074", chapterId, chapterData.NextChapterId);
|
||||
_originalObject.gameObject.SetActive(value: false);
|
||||
bool isExistMaintenanceSubChapter = chapterData.SubChapterDatas.Any((StoryChapterData.SubChapterData item) => item.IsMaintenanceChapter);
|
||||
GameObject obj = UnityEngine.Object.Instantiate(_originalObject, _objRoot);
|
||||
obj.SetActive(value: true);
|
||||
obj.GetComponent<SubChapterStorySectionBtn>().AllRead(allReadAction, chapterData.AllReadButtonPath, isExistMaintenanceSubChapter);
|
||||
foreach (StoryChapterData.SubChapterData subChapterData in chapterData.SubChapterDatas)
|
||||
{
|
||||
GameObject obj2 = UnityEngine.Object.Instantiate(_originalObject, _objRoot);
|
||||
obj2.SetActive(value: true);
|
||||
obj2.GetComponent<SubChapterStorySectionBtn>().UnitRead(scenarioSummary.GetData(chapterId, subChapterData.SubChapterId), subChapterData, unitReadAction);
|
||||
}
|
||||
_objRoot.GetComponent<UIGrid>().Reposition();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using Cute;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class StoryLeaderSelectSummaryDialog : StorySummaryDialog
|
||||
{
|
||||
[SerializeField]
|
||||
private GameObject _charaSelectionButton;
|
||||
|
||||
[SerializeField]
|
||||
private UISprite _selectMarkSprite;
|
||||
|
||||
[SerializeField]
|
||||
private UIGrid _charaButtonGrid;
|
||||
|
||||
private List<string> _loadPathList = new List<string>();
|
||||
|
||||
private List<ClassSelectionButton> _charaSelectionButtons = new List<ClassSelectionButton>();
|
||||
|
||||
private ClassSelectionButton _selectCharaSelectionButton;
|
||||
|
||||
private TweenAlpha _selectMarkTweenAlpha;
|
||||
|
||||
private Action<ClassCharacterMasterData> _selectCharaAction;
|
||||
|
||||
public void SetLeaderSelectSummary(string summary, bool isBattleSkipToggle, bool isMovieSubtitles, StoryChapterData chapterData, Action<ClassCharacterMasterData> selectCharaAction)
|
||||
{
|
||||
_selectCharaAction = selectCharaAction;
|
||||
_selectMarkTweenAlpha = _selectMarkSprite.GetComponent<TweenAlpha>();
|
||||
List<ClassCharacterMasterData> _classCharacterMasterDatas = new List<ClassCharacterMasterData>();
|
||||
foreach (int charaId in chapterData.CharaIdList)
|
||||
{
|
||||
_classCharacterMasterDatas.Add(GameMgr.GetIns().GetDataMgr().GetCharaPrmByCharaId(charaId));
|
||||
}
|
||||
ResourcesManager resMgr = Toolbox.ResourcesManager;
|
||||
foreach (ClassCharacterMasterData item in _classCharacterMasterDatas)
|
||||
{
|
||||
_loadPathList.Add(resMgr.GetAssetTypePath(item.skin_id.ToString(), ResourcesManager.AssetLoadPathType.ClassCharaButton));
|
||||
}
|
||||
StartCoroutine(resMgr.LoadAssetGroupAsync(_loadPathList, delegate
|
||||
{
|
||||
SetSummary(summary, isBattleSkipToggle, isMovieSubtitles, chapterData, SummaryType.CharaSelect);
|
||||
_charaSelectionButton.gameObject.SetActive(value: false);
|
||||
foreach (ClassCharacterMasterData item2 in _classCharacterMasterDatas)
|
||||
{
|
||||
ClassSelectionButton component = UnityEngine.Object.Instantiate(_charaSelectionButton, _charaSelectionButton.transform.parent).GetComponent<ClassSelectionButton>();
|
||||
component.gameObject.SetActive(value: true);
|
||||
component.Init(item2, resMgr.LoadObject<Texture>(resMgr.GetAssetTypePath(item2.skin_id.ToString(), ResourcesManager.AssetLoadPathType.ClassCharaButton, isfetch: true)), OnClickCharaButton, isShowStoryClearLabel: false, isShowUsedLabel: false, showNotificationIcon: false);
|
||||
_charaSelectionButtons.Add(component);
|
||||
}
|
||||
_charaButtonGrid.Reposition();
|
||||
SelectChara(_charaSelectionButtons.First());
|
||||
}));
|
||||
}
|
||||
|
||||
private void OnClickCharaButton(ClassSelectionButton classButton)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_TOGGLE_ON);
|
||||
SelectChara(classButton);
|
||||
}
|
||||
|
||||
private void SelectChara(ClassSelectionButton charaButton)
|
||||
{
|
||||
if (!(_selectCharaSelectionButton == charaButton))
|
||||
{
|
||||
_selectCharaSelectionButton = charaButton;
|
||||
_selectMarkSprite.transform.position = charaButton.transform.position;
|
||||
_selectMarkTweenAlpha.PlayPingPong(isIncreaseAlpha: false);
|
||||
_selectCharaAction(_selectCharaSelectionButton.ClassCharacterMasterData);
|
||||
}
|
||||
}
|
||||
}
|
||||
195
SVSim.BattleEngine/Engine/Wizard/StorySummaryDialog.cs
Normal file
195
SVSim.BattleEngine/Engine/Wizard/StorySummaryDialog.cs
Normal file
@@ -0,0 +1,195 @@
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Wizard;
|
||||
|
||||
public class StorySummaryDialog : MonoBehaviour
|
||||
{
|
||||
public enum SummaryType
|
||||
{
|
||||
SummaryOnly,
|
||||
ClassNameList,
|
||||
CharaSelect
|
||||
}
|
||||
|
||||
private readonly Vector3 SUMMARY_LABEL_POS = Vector3.zero;
|
||||
|
||||
private readonly Vector3 SUMMARY_LABEL_POS_BATTLESKIP = new Vector3(0f, 52f, 0f);
|
||||
|
||||
private readonly Vector3 SUMMARY_LABEL_POS_CLASSLIST = new Vector3(0f, 62f, 0f);
|
||||
|
||||
private readonly Vector3 SUMMARY_LABEL_POS_CHARALIST = new Vector3(0f, 131f, 0f);
|
||||
|
||||
private readonly Vector3 SUMMARY_LABEL_POS_BATTLESKIP_CLASSLIST = new Vector3(0f, 96f, 0f);
|
||||
|
||||
private readonly Vector3 SUMMARY_LABEL_POS_BATTLESKIP_CHARALIST = new Vector3(0f, 131f, 0f);
|
||||
|
||||
private readonly Vector3 CLASS_PARENT_POS = new Vector3(0f, -70f, 0f);
|
||||
|
||||
private readonly Vector3 CLASS_PARENT_POS_BATTLESKIP = Vector3.zero;
|
||||
|
||||
private readonly Vector3 CHARA_PARENT_POS = new Vector3(0f, -53f, 0f);
|
||||
|
||||
private readonly Vector3 CHARA_LINE_POS = new Vector3(0f, 24f, 0f);
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _summaryLabel;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _toggleParent;
|
||||
|
||||
[SerializeField]
|
||||
private UIToggle _toggleSingle;
|
||||
|
||||
[SerializeField]
|
||||
private UILabel _labelToggleSingle;
|
||||
|
||||
[SerializeField]
|
||||
private UIToggle _toggleBattleSkip;
|
||||
|
||||
[SerializeField]
|
||||
private UIToggle _toggleMovieSubtitles;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _iconObjectParent;
|
||||
|
||||
[SerializeField]
|
||||
private UITable _classIconNameTable_1;
|
||||
|
||||
[SerializeField]
|
||||
private UITable _classIconNameTable_2;
|
||||
|
||||
[SerializeField]
|
||||
private ClassIconName _classIconNameOriginal;
|
||||
|
||||
[SerializeField]
|
||||
private GameObject _charaSlectLineObject;
|
||||
|
||||
private SummaryType _summaryType;
|
||||
|
||||
public void SetSummary(string summary, bool isBattleSkipToggle, bool isMovieSubtitles, StoryChapterData chapterData, SummaryType summaryType)
|
||||
{
|
||||
_summaryType = summaryType;
|
||||
SetToggleButtons(isBattleSkipToggle, isMovieSubtitles);
|
||||
bool flag = isBattleSkipToggle || isMovieSubtitles;
|
||||
_summaryLabel.height = (flag ? 208 : 264);
|
||||
_summaryLabel.SetWrapText(summary);
|
||||
switch (_summaryType)
|
||||
{
|
||||
case SummaryType.SummaryOnly:
|
||||
SetLayoutSummaryOnly(flag);
|
||||
break;
|
||||
case SummaryType.ClassNameList:
|
||||
SetLayoutClassNameList(flag, chapterData);
|
||||
break;
|
||||
case SummaryType.CharaSelect:
|
||||
SetLayoutCharaSelect(flag);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
public void SetLayoutSummaryOnly(bool isToggle)
|
||||
{
|
||||
_iconObjectParent.gameObject.SetActive(value: false);
|
||||
_summaryLabel.transform.localPosition = (isToggle ? SUMMARY_LABEL_POS_BATTLESKIP : SUMMARY_LABEL_POS);
|
||||
}
|
||||
|
||||
public void SetLayoutClassNameList(bool isToggle, StoryChapterData chapterData)
|
||||
{
|
||||
SetAbleDeckClassList(chapterData.AvailableDeckClassList);
|
||||
_iconObjectParent.gameObject.SetActive(value: true);
|
||||
_summaryLabel.transform.localPosition = (isToggle ? SUMMARY_LABEL_POS_BATTLESKIP_CLASSLIST : SUMMARY_LABEL_POS_CLASSLIST);
|
||||
_iconObjectParent.transform.localPosition = (isToggle ? CLASS_PARENT_POS_BATTLESKIP : CLASS_PARENT_POS);
|
||||
}
|
||||
|
||||
public void SetLayoutCharaSelect(bool isToggle)
|
||||
{
|
||||
_summaryLabel.transform.localPosition = (isToggle ? SUMMARY_LABEL_POS_BATTLESKIP_CHARALIST : SUMMARY_LABEL_POS_CHARALIST);
|
||||
if (!isToggle)
|
||||
{
|
||||
_iconObjectParent.transform.localPosition = CHARA_PARENT_POS;
|
||||
_charaSlectLineObject.transform.localPosition = CHARA_LINE_POS;
|
||||
}
|
||||
}
|
||||
|
||||
private void SetToggleButtons(bool isBattleSkip, bool isMovieSubtitles)
|
||||
{
|
||||
if (!isBattleSkip && !isMovieSubtitles)
|
||||
{
|
||||
_toggleParent.SetActive(value: false);
|
||||
return;
|
||||
}
|
||||
_toggleParent.SetActive(value: true);
|
||||
_toggleSingle.gameObject.SetActive(value: false);
|
||||
_toggleBattleSkip.gameObject.SetActive(value: false);
|
||||
_toggleMovieSubtitles.gameObject.SetActive(value: false);
|
||||
if (isBattleSkip && isMovieSubtitles)
|
||||
{
|
||||
SetBattleSkipToggle(_toggleBattleSkip);
|
||||
SetMovieSubtitlesToggle(_toggleMovieSubtitles);
|
||||
}
|
||||
else if (isBattleSkip)
|
||||
{
|
||||
SetBattleSkipToggle(_toggleSingle);
|
||||
_labelToggleSingle.text = Data.SystemText.Get("Story_0035");
|
||||
}
|
||||
else if (isMovieSubtitles)
|
||||
{
|
||||
SetMovieSubtitlesToggle(_toggleSingle);
|
||||
_labelToggleSingle.text = Data.SystemText.Get("OtherConfig_0064");
|
||||
}
|
||||
}
|
||||
|
||||
private void SetBattleSkipToggle(UIToggle toggle)
|
||||
{
|
||||
toggle.gameObject.SetActive(value: true);
|
||||
toggle.value = PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.IS_SKIP_CLEARED_STORY_BATTLE);
|
||||
bool isFirst = true;
|
||||
EventDelegate.Add(toggle.onChange, delegate
|
||||
{
|
||||
if (!isFirst)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlayToggleSe(toggle.value);
|
||||
}
|
||||
isFirst = false;
|
||||
PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.IS_SKIP_CLEARED_STORY_BATTLE, toggle.value);
|
||||
});
|
||||
}
|
||||
|
||||
private void SetMovieSubtitlesToggle(UIToggle toggle)
|
||||
{
|
||||
toggle.gameObject.SetActive(value: true);
|
||||
toggle.value = PlayerPrefsWrapper.GetBool(PlayerPrefsWrapper.MOVIE_SUBTITLES);
|
||||
bool isFirst = true;
|
||||
EventDelegate.Add(toggle.onChange, delegate
|
||||
{
|
||||
if (!isFirst)
|
||||
{
|
||||
GameMgr.GetIns().GetSoundMgr().PlayToggleSe(toggle.value);
|
||||
}
|
||||
isFirst = false;
|
||||
PlayerPrefsWrapper.SetBool(PlayerPrefsWrapper.MOVIE_SUBTITLES, toggle.value);
|
||||
});
|
||||
}
|
||||
|
||||
private void SetAbleDeckClassList(List<int> classIds)
|
||||
{
|
||||
_classIconNameOriginal.gameObject.SetActive(value: false);
|
||||
_classIconNameTable_1.gameObject.SetActive(value: true);
|
||||
if (classIds.Count > _classIconNameTable_1.columns)
|
||||
{
|
||||
_classIconNameTable_2.gameObject.SetActive(value: true);
|
||||
}
|
||||
else
|
||||
{
|
||||
_classIconNameTable_2.gameObject.SetActive(value: false);
|
||||
}
|
||||
for (int i = 0; i < classIds.Count; i++)
|
||||
{
|
||||
ClassIconName classIconName = null;
|
||||
classIconName = ((i >= _classIconNameTable_1.columns) ? NGUITools.AddChild(_classIconNameTable_2.gameObject, _classIconNameOriginal.gameObject).GetComponent<ClassIconName>() : NGUITools.AddChild(_classIconNameTable_1.gameObject, _classIconNameOriginal.gameObject).GetComponent<ClassIconName>());
|
||||
classIconName.SetClass(classIds[i]);
|
||||
classIconName.gameObject.SetActive(value: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user