示例#1
0
 public void SetUnit(FormationUnit unit, float time, bool isSingle = false)
 {
     if (isSingle)
     {
         element.preferredWidth = standardUnitWidth;
     }
     else
     {
         element.preferredWidth = standardUnitWidth * unit.Size;
     }
     unit.SetRectTarget(rectTransform, time);
     gameObject.SetActive(true);
 }