public MonoGameInputMake(LGame game) { this._game = game; this._currentMouseState = _previousMouseState = Mouse.GetState(); this._currentPressedKeys = _previousPressedKeys = new Keys[0]; this._isConnected = TouchPanel.GetCapabilities().IsConnected; if (game.setting.emulateTouch && !_isConnected) { EmulateTouch(); } }
internal virtual void Call(Level level, string msg, System.Exception e) { if (LSystem.IsConsoleLog()) { if (collector != null) { collector.Logged(level, msg, e); } if (level.id >= minLevel.id) { CallNativeLog(level, msg, e); LGame game = LSystem.Base; if (game != null) { LSetting setting = game.setting; // 待实现GLEx /* LProcess process = LSystem.GetProcess(); * if (process != null && (setting.isDebug || setting.isDisplayLog)) * { * LColor color = LColor.white; * if (level.id > Level.INFO.id) * { * color = LColor.red; * } * if (process != null) * { * if (e == null) * { * process.addLog(msg, color); * } * else * { * process.addLog(msg + " [ " + e.getMessage() + " ] ", color); * } * } */ } } } if (e != null) { OnError(e); } }
public LuaLoader(string path, LGame game, LHooks hooks) { _lua = new Lua(); _game = game; _hooks = hooks; LuaPath = path; LuaAutorunPath = Path.Combine(LuaPath, "autorun"); SendLuaDebugMsg("Lua 5.1 (serverside) initialized."); if (!string.IsNullOrEmpty(LuaPath) && !Directory.Exists(LuaPath)) { Directory.CreateDirectory(LuaPath); } if (!string.IsNullOrEmpty(LuaAutorunPath) && !Directory.Exists(LuaAutorunPath)) { Directory.CreateDirectory(LuaAutorunPath); } RegisterLuaFunctions(); LoadServerAutoruns(); }
public Display(LGame game, int updateRate) : base(game, updateRate) { }
protected internal MonoGameGraphics(LGame game, GraphicsDevice d, int w, int h) : base(game, new GL20(d, w, h), loon.utils.Scale.ONE) { screenSize.width = scale.InvScaled(w); screenSize.height = scale.InvScaled(h); }