Exemple #1
0
        public void InitApi(LuaInterpreter script)
        {
            foreach (var unit in units)
            {
                unit.DefineApi(script);
            }

            script.AddFunction("printh", (Action <object>)Printh);
            script.AddFunction("stat", (Func <object>)Stat);
            script.AddFunction("menuitem", (Action <int, string, object>)Menuitem);

            script.RunScript(LuaPatcher.PatchCode(Api.All));
        }