public static bool TryGameRunner(int gameId, out GameRunner gameRunner) { gameRunner = null; IRunner runner = AppManager.Instance.GetRunner(gameId); if (runner is GameRunner) { gameRunner = (GameRunner)runner; return(true); } else { CLog.LogError("gameId " + gameId + " is not GameRunner!"); return(false); } }
static int TryGameRunner(IntPtr L) { try { ToLua.CheckArgsCount(L, 2); int arg0 = (int)LuaDLL.luaL_checknumber(L, 1); Launch.GameRunner arg1 = null; bool o = Launch.CTLTools.TryGameRunner(arg0, out arg1); LuaDLL.lua_pushboolean(L, o); ToLua.PushObject(L, arg1); return(2); } catch (Exception e) { return(LuaDLL.toluaL_exception(L, e)); } }
private static bool TryGameRunner(int gameId, out GameRunner gameRunner) { return(CTLTools.TryGameRunner(gameId, out gameRunner)); }