A Lua-like scripting engine implemented in C# for .Net (No Native Libs)
|
|
пре 5 година | |
|---|---|---|
| src | пре 5 година | |
| .dockerignore | пре 6 година | |
| .gitattributes | пре 11 година | |
| .gitignore | пре 6 година | |
| .travis.yml | пре 6 година | |
| Dockerfile | пре 6 година | |
| LICENSE | пре 9 година | |
| README.md | пре 9 година | |
| bfg.jar | пре 10 година | |
| ci.sh | пре 6 година |
A complete Lua solution written entirely in C# for the .NET, Mono, Xamarin and Unity3D platforms.
Features:
For highlights on differences between MoonSharp and standard Lua, see http://www.moonsharp.org/moonluadifferences.html
Please see http://www.moonsharp.org for downloads, infos, tutorials, etc.
License
The program and libraries are released under a 3-clause BSD license - see the license section.
Parts of the string library are based on the KopiLua project (https://github.com/NLua/KopiLua). Debugger icons are from the Eclipse project (https://www.eclipse.org/).
Usage
Use of the library is easy as:
double MoonSharpFactorial()
{
string script = @"
-- defines a factorial function
function fact (n)
if (n == 0) then
return 1
else
return n*fact(n - 1)
end
end
return fact(5)";
DynValue res = Script.RunString(script);
return res.Number;
}
For more in-depth tutorials, samples, etc. please refer to http://www.moonsharp.org/getting_started.html