/// <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); } }
public static void SetChildBtnEnabled(Component parentComp, string path, bool enabled) { if (IsTargetNotNull(parentComp)) { UIButton bar = CompAgent.FindChild <UIButton>(parentComp, path); SetBtnEnabled(bar, enabled); } }
public static void ClearChildClick(Component parentComp, string path, string listenerTag = null) { if (IsTargetNotNull(parentComp)) { Transform trans = CompAgent.FindChild <Transform>(parentComp, path); ClearClick(trans, listenerTag); } }
public static void SetChildDepth(Component parentComp, string path, int depth) { if (IsTargetNotNull(parentComp)) { UIRect rect = CompAgent.FindChild <UIRect>(parentComp, path); SetDepth(rect, depth); } }
public static void SetChildProgress(Component parentComp, string path, float value) { if (IsTargetNotNull(parentComp)) { UIProgressBar bar = CompAgent.FindChild <UIProgressBar>(parentComp, path); SetProgress(bar, value); } }
public static void SetChildAlpha(Component parentComp, string path, float alpha) { if (IsTargetNotNull(parentComp)) { UIRect rect = CompAgent.FindChild <UIRect>(parentComp, path); SetAlpha(rect, alpha); } }
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); } }
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); } }
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); } }
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); } }
public static void SetChildSprite(Component parentComp, string path, string spriteName) { if (IsTargetNotNull(parentComp)) { UISprite sprite = CompAgent.FindChild <UISprite>(parentComp, path); SetSprite(sprite, spriteName); } }
public static void SetChildFont(Component parentComp, string path, UIFont font) { if (IsTargetNotNull(parentComp)) { UILabel label = CompAgent.FindChild <UILabel>(parentComp, path); SetFont(label, font); } }
public static void SetChildText(Component parentComp, string path, string text) { if (IsTargetNotNull(parentComp)) { UILabel label = CompAgent.FindChild <UILabel>(parentComp, path); SetText(label, text); } }
public static void SetChildEffectColor(Component parentComp, string path, Color color) { if (IsTargetNotNull(parentComp)) { UILabel label = CompAgent.FindChild <UILabel>(parentComp, path); SetEffectColor(label, color); } }
public static void SetChildColor(Component parentComp, string path, Color color) { if (IsTargetNotNull(parentComp)) { Transform child = CompAgent.FindChild(parentComp, path); SetColor(child, color); } }
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); }