예제 #1
0
 public MonoGameGame(LSetting config, Loon game) : base(config, game)
 {
     this._start  = JavaSystem.NanoTime();
     this._log    = new MonoGameLog();
     this._assets = new MonoGameAssets(this);
     this._asyn   = new MonoGameAsyn <object>(this._log, frame);
 }
예제 #2
0
        public override void OnMain()
        {
            //加载LGame默认资源(不进行此操作,LGame内置的模拟按钮之类功能无法使用)

            XNAFont = new LFont("Content/Fonts", "black", 0, 20);
            LSetting setting = new LSetting();

            setting.fps       = 60;
            setting.width     = 480;
            setting.height    = 320;
            setting.showFPS   = true;
            setting.landscape = true;

            Register(setting, typeof(AVGTitle));

            /*
             *
             * //加载LGame使用的默认字体(不进行此操作,LGame默认的DrawString之类函数无法使用(PS:XNAConfig载入
             * //默认包时,可获得部分英文字体支持))
             * XNAFont = new LFont("Content/Fonts", "black", 0, 20);
             * MaxScreen(480, 320);
             * //设定初始化屏幕为竖屏,自动最大化游戏画面为屏幕大小
             * Initialization(true, LMode.Fill);
             * //帧数60
             * SetFPS(60);
             * //显示帧数
             * SetShowFPS(true);
             * //加载Screen
             * SetScreen(new AVGTitle());
             * //显示Screen
             * ShowScreen();*/
        }
예제 #3
0
        public override void OnMain()
        {
            LSetting setting = new LSetting();

            setting.showFPS   = true;
            setting.landscape = true;
            Register(setting, typeof(GameMapTest));
        }
예제 #4
0
파일: Game1.cs 프로젝트: zhwk022/LGame
        public override void OnMain()
        {
            LSetting setting = new LSetting();

            setting.showLogo  = false;
            setting.showFPS   = true;
            setting.landscape = false;
            Register(setting, typeof(HelloWorld));
        }
예제 #5
0
        public override void OnMain()
        {
            LTexture.ALL_LINEAR = true;
            LSetting setting = new LSetting();

            setting.showFPS   = true;
            setting.landscape = true;
            Register(setting, typeof(LLKScreen));
        }
예제 #6
0
파일: Game1.cs 프로젝트: zx8326123/LGame
        public override void OnMain()
        {
            LTexture.ALL_LINEAR = true;
            LSetting setting = new LSetting();

            setting.fps       = 60;
            setting.showFPS   = true;
            setting.landscape = true;

            Register(setting, typeof(AVGTitle));
        }
예제 #7
0
 public MonoGameGame(LSetting config, Loon game) : base(config, game)
 {
     this._plat           = game;
     this._start          = JavaSystem.NanoTime();
     this._contentManager = new MonoGameContentManager(game.GetContentManager().ServiceProvider, game.GetContentManager().RootDirectory);
     this._asyn           = new MonoGameAsyn <object>(_log, frame);
     this._log            = new MonoGameLog(config.appName);
     this._support        = new NativeSupport();
     this._assets         = new MonoGameAssets(this);
     this._inputer        = new MonoGameInputMake(this);
     this._graphics       = new MonoGameGraphics(this, game.GetGraphicsDevice(), config.Width, config.Height);
     this.InitProcess();
 }
예제 #8
0
파일: Loon.cs 프로젝트: zhangxin8105/LGame
 /// <summary>
 /// 以Delegate委托方式注入初始数据
 /// </summary>
 /// <param name="s"></param>
 /// <param name="data"></param>
 public virtual void Register(LSetting s, ScreenDelegate data)
 {
     if (s is MonoGameSetting mgs)
     {
         this._setting = mgs;
     }
     else
     {
         MonoGameSetting tmp = new MonoGameSetting();
         tmp.Copy(s);
         tmp.fullscreen = true;
         this._setting  = tmp;
     }
     this._mainDelegateData = data;
 }
예제 #9
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);
            }
        }
예제 #10
0
        /// <summary>
        /// 初始化事件
        /// </summary>
        /// <param name="plus"></param>
        public void OnMain(LSilverlightPlus plus)
        {
            //加载LGame默认资源(不进行此操作,LGame内置的模拟按钮之类功能无法使用)
            XNAConfig.Load("content/loon.def");
            //加载字体文件(此处是预编译好的xnb文件,也可以加载标准Content下的)
            plus.XNAFont = new LFont("content", "black", 0, 20);

            //设定启动参数
            LSetting setting = new LSetting();

            setting.fps       = 60;
            setting.width     = 480;
            setting.height    = 320;
            setting.showFPS   = true;
            setting.landscape = false;
            //注册初始Screen
            plus.Register(setting, typeof(ScreenTest));
        }
예제 #11
0
파일: Game1.cs 프로젝트: vb0067/LGame
        public override void OnMain()
        {
            //加载LGame默认资源(不进行此操作,LGame内置的模拟按钮之类功能无法使用)
            XNAConfig.Load("assets/loon.def");
            //加载字体文件(此处是预编译好的xnb文件,也可以加载Content下的)
            XNAFont = new LFont("assets", "black", 0, 20);

            //注册AD监听(标准XNA事件监听)
            SetXNAListener(new ADListener());

            //设定启动参数
            LSetting setting = new LSetting();

            setting.fps       = 60;
            setting.width     = 480;
            setting.height    = 320;
            setting.showFPS   = true;
            setting.landscape = true;
            //注册初始Screen
            Register(setting, typeof(ScreenTest));
        }
예제 #12
0
        public override void OnMain()
        {
            //加载LGame默认资源(不进行此操作,LGame内置的模拟按钮之类功能无法使用)
            XNAConfig.Load("content/loon.def");
            //加载字体文件(此处是预编译好的xnb文件 PS:当自定义资源文件夹命名为Content时,
            //打包后会自动和标准的Content文件夹合并,这里做个演示。另,Windows系统不区分文件
            //名大小写)
            XNAFont = new LFont("content", "black", 0, 20);

            //注册AD监听(标准XNA事件监听)
            SetXNAListener(new ADListener());

            //设定启动参数
            LSetting setting = new LSetting();

            setting.fps       = 60;
            setting.width     = 480;
            setting.height    = 320;
            setting.showFPS   = true;
            setting.landscape = false;
            //注册初始Screen
            Register(setting, typeof(ScreenTest));
        }
예제 #13
0
 public abstract void Register(LSetting setting, LazyLoading.Data lazy);