using System;
|
using System.Collections.Generic;
|
using System.Linq;
|
using System.Text;
|
using System.Threading.Tasks;
|
using UnityEngine;
|
using UnityEngine.UI;
|
|
class AttGridBehaviour
|
{
|
public Transform transform;
|
|
Text titleText;
|
Text beforeValueText;
|
Text afterValueText;
|
Transform arrow;
|
|
public void BindController(Transform target)
|
{
|
this.transform = target;
|
this.titleText = target.FindComponentEx<Text>("Txt_Title");
|
this.beforeValueText = target.FindComponentEx<Text>("Layout/Txt_Value0");
|
this.afterValueText = target.FindComponentEx<Text>("Layout/Txt_Value1");
|
this.arrow = target.Find("Layout/Img_Arrow");
|
}
|
|
public void Init(string attrName, string beforAttrStr, string afterAttrStr)
|
{
|
this.titleText.text = attrName;
|
this.beforeValueText.text = beforAttrStr;
|
this.afterValueText.text = afterAttrStr;
|
this.arrow.SetActiveIL(!string.IsNullOrEmpty(afterAttrStr));
|
}
|
|
}
|