コード例 #1
0
        private void PreloadAPI(LuaAPI api)
        {
            api.Init(m_machine);
            m_machine.DoString(string.Format(@"
				local g = _G
				local api = g[ ""{0}"" ]
				package.preload[ ""{0}"" ] = function()
					g[ ""{0}"" ] = api
					return api
				end
				g[ ""{0}"" ] = nil
			"            , api.Name),
                               "=LuaCPUDevice.PreloadAPI");
        }
コード例 #2
0
 public LuaEnv()
 {
     L = LuaAPI.Init();
     LuaCallback.Register();
     AddResearchPath();
 }
コード例 #3
0
 private void InstallAPI(LuaAPI api)
 {
     api.Init(m_machine);
 }