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 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 SetChildDepth(Component parentComp, string path, int depth) { if (IsTargetNotNull(parentComp)) { UIRect rect = CompAgent.FindChild <UIRect>(parentComp, path); SetDepth(rect, depth); } }
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 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 SetChildSprite(Component parentComp, string path, string spriteName) { if (IsTargetNotNull(parentComp)) { UISprite sprite = CompAgent.FindChild <UISprite>(parentComp, path); SetSprite(sprite, spriteName); } }
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 SetChildText(Component parentComp, string path, string text) { if (IsTargetNotNull(parentComp)) { UILabel label = CompAgent.FindChild <UILabel>(parentComp, path); SetText(label, text); } }
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 SetChildEffectColor(Component parentComp, string path, Color color) { if (IsTargetNotNull(parentComp)) { UILabel label = CompAgent.FindChild <UILabel>(parentComp, path); SetEffectColor(label, color); } }
/// <summary> /// if action is null, please use ClearDrag instead /// </summary> public static void SetChildOnDrag(Component parentComp, string path, params System.Action <GameObject, Vector2>[] actions) { if (IsTargetNotNull(parentComp)) { Transform trans = CompAgent.FindChild <Transform>(parentComp, path); SetOnDrag(trans, actions); } }
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); }
private void ResetLua() { if (m_LuaTable != null) { CompAgent.ClearChildren(transform); CompAgent.ClearCompnents <LuaBehaviour>(transform); m_LuaTable = null; List <string> loadedRemoveList = new List <string>(); m_LoadedTable.ForEach <string, object>((luaName, value) => loadedRemoveList.Add(luaName)); foreach (string luaName in loadedRemoveList) { if (!m_LoadedBuiltInSet.Contains(luaName)) { m_LoadedTable.Set <string, object>(luaName, null); } } List <string> preloadRemoveList = new List <string>(); m_PreloadTable.ForEach <string, object>((luaName, value) => preloadRemoveList.Add(luaName)); foreach (string luaName in preloadRemoveList) { if (!m_PreloadBuiltInSet.Contains(luaName)) { m_PreloadTable.Set <string, object>(luaName, null); } } foreach (LuaTable csTable in m_HotFixDict.Keys) { foreach (string fieldName in m_HotFixDict[csTable]) { m_HotFix(csTable, fieldName, null); } } m_HotFixDict.Clear(); foreach (LuaTable csTable in m_HotFixExDict.Keys) { foreach (string fieldName in m_HotFixExDict[csTable]) { m_HotFixEx(csTable, fieldName, null); } } m_HotFixExDict.Clear(); List <string> globalVarRemoveList = new List <string>(); m_LuaEnv.Global.ForEach <string, object>((key, value) => globalVarRemoveList.Add(key)); foreach (string varName in globalVarRemoveList) { if (!m_GlobalVarBuiltInSet.Contains(varName)) { m_LuaEnv.Global.Set <string, object>(varName, null); } } FuncInvoke(m_LuaEnv.Global, "collectgarbage"); } }
public static LuaTable AddLuaChild(Component comp, string name, string luaPath, params object[] args) { GameObject go = CompAgent.AddChild(comp, name); return AddLuaComponent(go, luaPath, args); }
private T AddChild <T>() where T : MonoBehaviour { return(CompAgent.AddChild <T>(this)); }