Files
SVSimServer/SVSim.BattleEngine/Engine/WrapVariableContentsScrollBarSize.cs
gamer147 824309ec44 feat(battle-engine): close the AI-simulation subsystem (verbatim)
Copied the 89 uncopied AI*SimulationUtility/extension files defining the
AIVirtualCard/AIVirtualField extension methods; the compile loop then auto-closed
the revealed type deps (~3049 files total, drift-clean). 10.0k -> 62 errors.
2026-06-05 20:30:59 -04:00

35 lines
874 B
C#

using UnityEngine;
public class WrapVariableContentsScrollBarSize : MonoBehaviour
{
public UIWrapVariableContentVertical wrapContent;
private void Start()
{
ContentUpdate();
}
public void ContentUpdate()
{
UIWidget uIWidget = base.gameObject.GetComponent<UIWidget>();
if (uIWidget == null)
{
uIWidget = base.gameObject.AddComponent<UIWidget>();
}
int num = 0;
for (int i = 0; i < wrapContent.ItemParamList.Count; i++)
{
num += wrapContent.ItemParamList[i].Size;
}
uIWidget.height = num;
uIWidget.pivot = UIWidget.Pivot.Top;
Vector3 localPosition = Vector3.zero;
if (wrapContent.ItemParamList.Count > 0)
{
float position = wrapContent.ItemParamList[0].Position;
localPosition = new Vector3(localPosition.x, position, localPosition.z);
}
base.transform.localPosition = localPosition;
}
}