29 lines
796 B
C#
29 lines
796 B
C#
using UnityEngine;
|
|
using WI;
|
|
using WI.UI;
|
|
|
|
namespace XED.UI
|
|
{
|
|
public class Panel_ObjectDistanceLabelList : PanelBase
|
|
{
|
|
private UI_DistanceLabel[] distanceLabels = new UI_DistanceLabel[4];
|
|
|
|
public override void AfterAwake()
|
|
{
|
|
var prf_distanceLabel = Resources.Load<GameObject>("Prefabs/UI/PRF_DistanceLabel");
|
|
for (int i = 0; i < distanceLabels.Length; i++)
|
|
{
|
|
var obj = Instantiate(prf_distanceLabel, transform);
|
|
var label = obj.AddComponent<UI_DistanceLabel>();
|
|
distanceLabels[i] = label;
|
|
}
|
|
}
|
|
|
|
public void DistanceLabelsSetting(Vector3 pos, int index, int value)
|
|
{
|
|
distanceLabels[index].LabelSetting(pos, value);
|
|
}
|
|
|
|
}
|
|
}
|