Files
SVSimServer/SVSim.BattleEngine/Engine/Wizard/BaseProductDetail.cs
gamer147 957af3d1ec feat(battle-engine): full Unity/VFX/god-object shims + expanded copy closure (2570 files)
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.
2026-06-05 17:22:20 -04:00

64 lines
1.6 KiB
C#

using System.Collections.Generic;
using UnityEngine;
namespace Wizard;
public abstract class BaseProductDetail : MonoBehaviour
{
[SerializeField]
protected UITexture _texProductImg;
[SerializeField]
private UIScrollView _scrollView;
[SerializeField]
private SupplyLabelPlateListUI _supplyLabelPlateList;
[SerializeField]
private GameObject _parentDetailList;
[SerializeField]
private UILabel _labelDescription;
[SerializeField]
private UIGrid _gridDescriptionLines;
[SerializeField]
private GameObject _lineTemplate;
protected float TailPosY;
public void ResetPositionScrollView()
{
_scrollView.ResetPosition();
}
protected void SetProductDetail(Texture textureProductImage, List<ShopCommonRewardInfo> rewardInfoList, string descriptionText = null)
{
_texProductImg.mainTexture = textureProductImage;
TailPosY = _supplyLabelPlateList.transform.localPosition.y;
TailPosY -= _supplyLabelPlateList.SetSupplyList(rewardInfoList);
if (descriptionText != null)
{
_parentDetailList.SetActive(value: true);
_parentDetailList.transform.localPosition = Vector3.up * TailPosY;
string text = "";
text = Global.GetConvertWrapText(_labelDescription, descriptionText);
for (int i = 0; i < text.Length; i++)
{
if (text[i] == '\n')
{
NGUITools.AddChild(_gridDescriptionLines.gameObject, _lineTemplate);
}
}
_labelDescription.text = text;
_gridDescriptionLines.Reposition();
}
else if (_parentDetailList != null)
{
_parentDetailList.SetActive(value: false);
}
ResetPositionScrollView();
}
}