示例#1
0
 public void CallActionWith(string funcName, params SystemObject[] values)
 {
     if (values == null || values.Length == 0)
     {
         CallAction(funcName);
     }
     else
     {
         SystemObject[] paramValues = new SystemObject[values.Length + 1];
         paramValues[0] = Table;
         Array.Copy(values, 0, paramValues, 1, values.Length);
         LuaFunction func = Table.Get <LuaFunction>(funcName);
         if (func != null)
         {
             func.ActionParams(paramValues);
         }
         func?.Dispose();
     }
 }
示例#2
0
 public void CallActionWith(string funcName, params LuaParam[] values)
 {
     if (values == null || values.Length == 0)
     {
         CallAction(funcName);
     }
     else
     {
         SystemObject[] paramValues = new SystemObject[values.Length + 1];
         paramValues[0] = Table;
         for (int i = 0; i < values.Length; ++i)
         {
             paramValues[i + 1] = values[i].GetValue();
         }
         LuaFunction func = Table.Get <LuaFunction>(funcName);
         if (func != null)
         {
             func.ActionParams(paramValues);
         }
         func?.Dispose();
     }
 }