예제 #1
0
 // Use this for initialization
 void Start()
 {
     if (isUseLua)
     {
         mgr = new LuaScriptMgr();
         mgr.Start();
         LuaState l         = mgr.lua;
         string   readToEnd = ConfigFileReader.FilePath(Path.Combine(Application.streamingAssetsPath, "LuaFile/LuaManager.lua"));
         mgr.DoString(readToEnd);
     }
 }
예제 #2
0
    IEnumerator DelayCloseLua()
    {
        yield return(new WaitForEndOfFrame());

        mgr.Destroy();
        mgr = new LuaScriptMgr();
        mgr.Start();
        LuaState l         = mgr.lua;
        string   readToEnd = ConfigFileReader.FilePath(Path.Combine(Application.streamingAssetsPath, "LuaFile/LuaManager.lua"));

        mgr.DoString(readToEnd);
    }
예제 #3
0
    public static void DoFile(string luafile)
    {
        string readToEnd = ConfigFileReader.FilePath(Path.Combine(Application.streamingAssetsPath, "LuaFile/" + luafile + ".lua"));

        instance.mgr.DoString(readToEnd);
    }