- 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>
77 lines
3.0 KiB
C#
77 lines
3.0 KiB
C#
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);
|
|
}
|
|
}
|
|
}
|