Authored Unity primitive/object-model shim, VFX layer (control-flow-preserving, InstantVfx never invokes its action -- headless suppression), god-object stubs (GameMgr/EffectMgr/UIManager with faithfully-extracted nested enums), View/UI/Touch tree, LitJson+BetterList+Tuple copied, third-party stubs. Discovered Roslyn header-error masking: fixing class-header type errors unmasks body references, so the true copy closure is ~2570 files (was 782 under masking). Errors: masked-25720 -> 268; our shim files compile clean. Remaining: ~50 residual shim/external types, 24 NGUI UI-base overrides, static-type fixes, plus likely 1-2 more unmask waves.
88 lines
3.2 KiB
C#
88 lines
3.2 KiB
C#
using System.Collections.Generic;
|
|
using Cute;
|
|
using UnityEngine;
|
|
using Wizard;
|
|
|
|
public class PracticePuzzleNextSceneSelector : INextSceneSelector
|
|
{
|
|
private BattleResultUIController _battleResultController;
|
|
|
|
private bool _movingToMyPage;
|
|
|
|
public PracticePuzzleNextSceneSelector(BattleResultUIController battleResultControl)
|
|
{
|
|
_battleResultController = battleResultControl;
|
|
_movingToMyPage = false;
|
|
}
|
|
|
|
public void Setup(bool isWin, GameObject gameObject)
|
|
{
|
|
_battleResultController.RetryBtnObj.gameObject.SetActive(value: false);
|
|
_battleResultController.MissionBtnObj.labels[0].text = Data.SystemText.Get("Puzzle_QuestSelect_Button");
|
|
_battleResultController.MissionBtnObj.buttons[0].onClick.Clear();
|
|
_battleResultController.MissionBtnObj.buttons[0].onClick.Add(new EventDelegate(delegate
|
|
{
|
|
SelectOtherPuzzle();
|
|
}));
|
|
_battleResultController.HomeBtnObj.labels[0].text = Data.SystemText.Get("Battle_0516");
|
|
_battleResultController.HomeBtnObj.buttons[0].onClick.Clear();
|
|
_battleResultController.HomeBtnObj.buttons[0].onClick.Add(new EventDelegate(delegate
|
|
{
|
|
MovePuzleLobby();
|
|
}));
|
|
}
|
|
|
|
private void SelectOtherPuzzle()
|
|
{
|
|
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_COMMON_BUTTON);
|
|
UIManager.GetInstance().createInSceneCenterLoading();
|
|
PracticePuzzleListTask task = new PracticePuzzleListTask();
|
|
int practicePuzzleGroupId = GameMgr.GetIns().GetDataMgr().PracticePuzzleGroupId;
|
|
task.SetParameter(practicePuzzleGroupId);
|
|
UIManager.GetInstance().StartCoroutine(Toolbox.NetworkManager.Connect(task, delegate
|
|
{
|
|
List<string> loadList = PuzzleQuestSelectDialog.CollectResourcePath(task.PuzzleQuestInfo.DisplayDatas);
|
|
UIManager.GetInstance().StartCoroutine(Toolbox.ResourcesManager.LoadAssetGroupAsync(loadList, delegate
|
|
{
|
|
UIManager.GetInstance().closeInSceneCenterLoading();
|
|
PuzzleQuestSelectDialog.CreateDialog(task.PuzzleQuestInfo, delegate(PuzzleQuestData puzzleData, int difficulty)
|
|
{
|
|
ChangeSceneOtherPuzzle(puzzleData, difficulty);
|
|
}).OnClose = delegate
|
|
{
|
|
Toolbox.ResourcesManager.RemoveAssetGroup(loadList);
|
|
};
|
|
}));
|
|
}));
|
|
}
|
|
|
|
private void ChangeSceneOtherPuzzle(PuzzleQuestData puzzleData, int difficulty)
|
|
{
|
|
int groupId = GameMgr.GetIns().GetDataMgr().PracticePuzzleGroupId;
|
|
UIManager.GetInstance().CreatFadeClose(delegate
|
|
{
|
|
UIManager.GetInstance().StartCoroutine(BattleManagerBase.GetIns().GetBattleControl().BattleEnd(delegate
|
|
{
|
|
UIManager.GetInstance().CreatFadeOpen();
|
|
PuzzleUtil.SetPracticePuzzleData(groupId, puzzleData, difficulty, DataMgr.BattleType.Practice);
|
|
PuzzleUtil.ChangeSceneToPracticePuzzle(puzzleData);
|
|
}));
|
|
});
|
|
}
|
|
|
|
public void Show()
|
|
{
|
|
iTween.MoveTo(_battleResultController.ButtonGrid.gameObject, iTween.Hash("position", _battleResultController.DefaultPosDict["ButtonGrid"], "time", 0.5f, "islocal", true, "easetype", iTween.EaseType.easeOutExpo));
|
|
}
|
|
|
|
private void MovePuzleLobby()
|
|
{
|
|
if (!_movingToMyPage)
|
|
{
|
|
_movingToMyPage = true;
|
|
GameMgr.GetIns().GetSoundMgr().PlaySe(Se.TYPE.SYS_BTN_CANCEL_TRANS);
|
|
GameMgr.GetIns().GetBattleCtrl().BattleEnd(UIManager.ViewScene.PracticePuzzle);
|
|
}
|
|
}
|
|
}
|