Exemple #1
0
 /// <summary>
 /// Calls the specified function.
 /// </summary>
 /// <param name="function">The Lua/MoonSharp function to be called </param>
 /// <param name="args">The arguments to pass to the function.</param>
 /// <returns></returns>
 /// <exception cref="System.ArgumentException">Thrown if function is not of DataType.Function</exception>
 public DynValue Call(object function, params object[] args)
 {
     return(Call(DynValue.FromObject(this, function), args));
 }
Exemple #2
0
 /// <summary>
 /// Creates a coroutine pointing at the specified function.
 /// </summary>
 /// <param name="function">The function.</param>
 /// <returns>
 /// The coroutine handle.
 /// </returns>
 /// <exception cref="System.ArgumentException">Thrown if function is not of DataType.Function or DataType.ClrFunction</exception>
 public DynValue CreateCoroutine(object function)
 {
     return(CreateCoroutine(DynValue.FromObject(this, function)));
 }
Exemple #3
0
 /// <summary>
 /// Calls the specified function.
 /// </summary>
 /// <param name="function">The Lua/MoonSharp function to be called</param>
 /// <returns></returns>
 /// <exception cref="System.ArgumentException">Thrown if function is not of DataType.Function</exception>
 public DynValue Call(object function)
 {
     return(Call(DynValue.FromObject(this, function)));
 }