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.
53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using UnityEngine;
|
|
|
|
namespace Wizard;
|
|
|
|
public class PuzzleQuestSelectGroup : MonoBehaviour
|
|
{
|
|
[SerializeField]
|
|
private UILabel _difficultyLabel;
|
|
|
|
[SerializeField]
|
|
private UILabel _clearCountLabel;
|
|
|
|
[SerializeField]
|
|
private UILabel _clearLabel;
|
|
|
|
[SerializeField]
|
|
private UIGrid _grid;
|
|
|
|
[SerializeField]
|
|
private GameObject _itemOrigin;
|
|
|
|
private const float HEADER_HEIGHT = 56f;
|
|
|
|
private const float ITEM_HEIGHT = 137f;
|
|
|
|
public void Setup(string difficultyName, List<PuzzleQuestSelectDialog.DisplayData> displayDataList, Action<PuzzleQuestSelectDialog.DisplayData> onClick)
|
|
{
|
|
_difficultyLabel.text = difficultyName;
|
|
_clearCountLabel.gameObject.SetActive(value: false);
|
|
_clearLabel.gameObject.SetActive(value: false);
|
|
_itemOrigin.SetActive(value: true);
|
|
foreach (PuzzleQuestSelectDialog.DisplayData displayData in displayDataList)
|
|
{
|
|
UnityEngine.Object.Instantiate(_itemOrigin, _grid.transform).GetComponent<PuzzleQuestSelectItem>().Setup(displayData, onClick);
|
|
}
|
|
_itemOrigin.SetActive(value: false);
|
|
_grid.Reposition();
|
|
}
|
|
|
|
public float GetHeight()
|
|
{
|
|
int childCount = _grid.transform.childCount;
|
|
if (childCount <= 0)
|
|
{
|
|
return 56f;
|
|
}
|
|
int num = (childCount - 1) / _grid.maxPerLine + 1;
|
|
return 56f + 137f * (float)num;
|
|
}
|
|
}
|