Exemplo n.º 1
0
        private IEnumerable <string> GetLuaString(string input)
        {
            var script = PyLua.getNewScript();

            script.Globals["result"] = "";
            script.DoString("result = (" + input + ")");
            yield return((string)script.Globals["result"]);
        }
Exemplo n.º 2
0
        public static string getLuaString(string call)
        {
            var script = PyLua.getNewScript();

            script.Globals["result"] = false;
            script.DoString("result = (" + call + ")");
            return((string)script.Globals["result"]);
        }
Exemplo n.º 3
0
        public static bool checkLuaConditions(string conditions, object caller = null)
        {
            var script = PyLua.getNewScript();

            script.Globals["result"] = false;
            if (caller != null)
            {
                script.Globals["caller"] = caller;
            }
            script.DoString("result = (" + conditions + ")");
            return((bool)script.Globals["result"]);
        }