コード例 #1
0
 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();
     }
 }
コード例 #2
0
        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);
            }
        }
コード例 #3
0
ファイル: LuaLoader.cs プロジェクト: DankBud/TShock-LuaPlugin
        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();
        }
コード例 #4
0
ファイル: Display.cs プロジェクト: ntthanh/LGame
 public Display(LGame game, int updateRate) : base(game, updateRate)
 {
 }
コード例 #5
0
 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);
 }