示例#1
0
 /// <summary>
 /// if action is null, please use ClearClick instead
 /// </summary>
 public static void SetChildOnClick(Component parentComp, string path, params System.Action <GameObject>[] actions)
 {
     if (IsTargetNotNull(parentComp))
     {
         Transform trans = CompAgent.FindChild <Transform>(parentComp, path);
         SetOnClick(trans, actions);
     }
 }
示例#2
0
 public static void SetChildBtnEnabled(Component parentComp, string path, bool enabled)
 {
     if (IsTargetNotNull(parentComp))
     {
         UIButton bar = CompAgent.FindChild <UIButton>(parentComp, path);
         SetBtnEnabled(bar, enabled);
     }
 }
示例#3
0
 public static void ClearChildClick(Component parentComp, string path, string listenerTag = null)
 {
     if (IsTargetNotNull(parentComp))
     {
         Transform trans = CompAgent.FindChild <Transform>(parentComp, path);
         ClearClick(trans, listenerTag);
     }
 }
示例#4
0
 public static void SetChildDepth(Component parentComp, string path, int depth)
 {
     if (IsTargetNotNull(parentComp))
     {
         UIRect rect = CompAgent.FindChild <UIRect>(parentComp, path);
         SetDepth(rect, depth);
     }
 }
示例#5
0
 public static void SetChildProgress(Component parentComp, string path, float value)
 {
     if (IsTargetNotNull(parentComp))
     {
         UIProgressBar bar = CompAgent.FindChild <UIProgressBar>(parentComp, path);
         SetProgress(bar, value);
     }
 }
示例#6
0
 public static void SetChildAlpha(Component parentComp, string path, float alpha)
 {
     if (IsTargetNotNull(parentComp))
     {
         UIRect rect = CompAgent.FindChild <UIRect>(parentComp, path);
         SetAlpha(rect, alpha);
     }
 }
示例#7
0
 public static void SetChildSize(Component parentComp, string path, float width, float height)
 {
     if (IsTargetNotNull(parentComp))
     {
         Transform child = CompAgent.FindChild <Transform>(parentComp, path);
         SetSize(child, width, height);
     }
 }
示例#8
0
 public static void SetChildTweenValue(Component parentComp, string path, float value, int group = 0)
 {
     if (IsTargetNotNull(parentComp))
     {
         Transform child = CompAgent.FindChild(parentComp, path);
         SetTweenValue(child, value, group);
     }
 }
示例#9
0
 public static void SetChildTexture(Component parentComp, string path, Texture mainTexture, Texture alphaTexture = null, string shaderName = null)
 {
     if (IsTargetNotNull(parentComp))
     {
         UITexture uiTexture = CompAgent.FindChild <UITexture>(parentComp, path);
         SetTexture(uiTexture, mainTexture, alphaTexture, shaderName);
     }
 }
示例#10
0
 public static void SetChildIcon(Component parentComp, string path, UIAtlas atlas, string spriteName = null)
 {
     if (IsTargetNotNull(parentComp))
     {
         UISprite uiSprite = CompAgent.FindChild <UISprite>(parentComp, path);
         SetIcon(uiSprite, atlas, spriteName);
     }
 }
示例#11
0
 public static void SetChildSprite(Component parentComp, string path, string spriteName)
 {
     if (IsTargetNotNull(parentComp))
     {
         UISprite sprite = CompAgent.FindChild <UISprite>(parentComp, path);
         SetSprite(sprite, spriteName);
     }
 }
示例#12
0
 public static void SetChildFont(Component parentComp, string path, UIFont font)
 {
     if (IsTargetNotNull(parentComp))
     {
         UILabel label = CompAgent.FindChild <UILabel>(parentComp, path);
         SetFont(label, font);
     }
 }
示例#13
0
 public static void SetChildText(Component parentComp, string path, string text)
 {
     if (IsTargetNotNull(parentComp))
     {
         UILabel label = CompAgent.FindChild <UILabel>(parentComp, path);
         SetText(label, text);
     }
 }
示例#14
0
 public static void SetChildEffectColor(Component parentComp, string path, Color color)
 {
     if (IsTargetNotNull(parentComp))
     {
         UILabel label = CompAgent.FindChild <UILabel>(parentComp, path);
         SetEffectColor(label, color);
     }
 }
示例#15
0
 public static void SetChildColor(Component parentComp, string path, Color color)
 {
     if (IsTargetNotNull(parentComp))
     {
         Transform child = CompAgent.FindChild(parentComp, path);
         SetColor(child, color);
     }
 }
示例#16
0
 public static float PlayChildReverse(Component parentComp, string path, bool restart = false, int group = 0)
 {
     if (IsTargetNotNull(parentComp))
     {
         Transform child = CompAgent.FindChild <Transform>(parentComp, path);
         return(PlayReverse(child, restart, group));
     }
     return(0);
 }