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.
57 lines
1.7 KiB
C#
57 lines
1.7 KiB
C#
using Cute;
|
|
using UnityEngine;
|
|
|
|
namespace Wizard;
|
|
|
|
public class ClassSelectionButton : MonoBehaviour
|
|
{
|
|
public delegate void OnClickClassButton(ClassSelectionButton classSelectionButton);
|
|
|
|
public const string CLASS_SELECT_BUTTON_EMPTY = "empty";
|
|
|
|
[SerializeField]
|
|
private UITexture _texture;
|
|
|
|
[SerializeField]
|
|
private UIButton _button;
|
|
|
|
[SerializeField]
|
|
private UILabel _storyClearLabel;
|
|
|
|
[SerializeField]
|
|
private UILabel _usedLabel;
|
|
|
|
[SerializeField]
|
|
private GameObject _notificationIcon;
|
|
|
|
public ClassCharacterMasterData ClassCharacterMasterData { get; private set; }
|
|
|
|
private void Start()
|
|
{
|
|
_notificationIcon.SetActive(value: false);
|
|
}
|
|
|
|
public void Init(ClassCharacterMasterData classCharacterMasterData, Texture texture, OnClickClassButton onClick, bool isShowStoryClearLabel, bool isShowUsedLabel, bool showNotificationIcon)
|
|
{
|
|
ClassCharacterMasterData = classCharacterMasterData;
|
|
_texture.mainTexture = texture;
|
|
UIEventListener.Get(_button.gameObject).onClick = delegate
|
|
{
|
|
onClick(this);
|
|
};
|
|
_storyClearLabel.gameObject.SetActive(isShowStoryClearLabel);
|
|
_usedLabel.gameObject.SetActive(isShowUsedLabel);
|
|
UIManager.SetObjectToGrey(_texture.gameObject, isShowUsedLabel);
|
|
_notificationIcon.SetActive(showNotificationIcon);
|
|
}
|
|
|
|
public void InitEmpty()
|
|
{
|
|
_texture.mainTexture = Toolbox.ResourcesManager.LoadObject<Texture>(Toolbox.ResourcesManager.GetAssetTypePath("empty", ResourcesManager.AssetLoadPathType.ClassCharaButton, isfetch: true));
|
|
_button.isEnabled = false;
|
|
_storyClearLabel.gameObject.SetActive(value: false);
|
|
_usedLabel.gameObject.SetActive(value: false);
|
|
UIManager.SetObjectToGrey(_texture.gameObject, b: false);
|
|
}
|
|
}
|