public void InitBehaviour() { if (!isInited) { isInited = true; if (ctrParamValues.Count == 0) { Table = LuaUtility.RequireAndInstance(Env, scriptPath); } else { SystemObject[] arr = new SystemObject[ctrParamValues.Count]; for (int i = 0; i < ctrParamValues.Count; ++i) { LuaParamValue lpv = ctrParamValues[i]; if (lpv != null) { arr[i] = lpv.GetValue(); } } Table = LuaUtility.RequireAndInstanceWith(Env, scriptPath, arr); } OnInitFinished(); } }
private void RegisterParamToTable(LuaTable table, int index, LuaParamValue paramValue) { if (!IsValid() || paramValue == null) { return; } table.Set(index, paramValue.GetValue()); }
private void RegisterParamToTable(LuaTable table, string name, LuaParamValue paramValue) { if (string.IsNullOrEmpty(name) || !IsValid() || paramValue == null) { return; } table.Set(name, paramValue.GetValue()); }
public SystemObject[] GetValues() { SystemObject[] arr = new SystemObject[values.Count]; for (int i = 0; i < values.Count; ++i) { LuaParamValue lpv = values[i]; if (lpv != null) { arr[i] = lpv.GetValue(); } } return(arr); }