void onBorrowFrame(params object[] objs) { GameObject frame = objs[1] as GameObject; if (frame != null) { if (frameObj != null) { CLUIOtherObjPool.returnObj(frame); NGUITools.SetActive(frame, false); return; } frameObj = frame.GetComponent <CLCellLua>(); if (frameObj == null) { frameObj = frame.AddComponent <CLCellLua>(); } frameObj.transform.parent = transform; frameObj.transform.localScale = Vector3.one; frameObj.transform.localPosition = Vector3.zero; frameObj.transform.localEulerAngles = Vector3.zero; NGUITools.SetActive(frameObj.gameObject, true); if (frameObj.luaTable == null) { frameObj.setLua(); } if (lfonShowFrame != null) { call(lfonShowFrame, this); } } }
public override void init(object obj, int index) { if (!isFinishInit) { isFinishInit = true; if (uiLua != null) { uiLua.setLua(); lfInit = uiLua.getLuaFunction("init"); lfrefresh = uiLua.getLuaFunction("refresh"); lfrefreshCurrent = uiLua.getLuaFunction("refreshCurrent"); } if (lfInit != null) { uiLua.call(lfInit, uiLua); } } if (lfrefresh != null) { uiLua.call(lfrefresh, obj, index); } }