Exemple #1
0
        public LFXPlus()
            : base()
        {
            numformat = new NumberFormatInfo();
            numformat.NumberDecimalSeparator = ".";

            XNAConfig.Load();

            Content.RootDirectory = "";
            content = Content;
            if (useXNAListener)
            {
                xna_listener.Create(this);
            }
            log.I("LGame 2D Engine Start");
            XNA_Graphics_Loading();
            OnMain();
        }
Exemple #2
0
 public void Register(LSetting setting, Type clazz,
                      params object[] args)
 {
     XNAConfig.Load();
     MaxScreen(setting.width, setting.height);
     Initialization(setting.landscape, setting.mode);
     SetShowFPS(setting.showFPS);
     SetShowMemory(setting.showMemory);
     SetShowLogo(setting.showLogo);
     SetFPS(setting.fps);
     if (clazz != null)
     {
         if (args != null)
         {
             try
             {
                 int funs = args.Length;
                 if (funs == 0)
                 {
                     SetScreen((Screen)JavaRuntime.NewInstance(clazz));
                     ShowScreen();
                 }
                 else
                 {
                     Type[] functions = new Type[funs];
                     for (int i = 0; i < funs; i++)
                     {
                         functions[i] = GetType(args[i]);
                     }
                     System.Reflection.ConstructorInfo constructor = JavaRuntime.GetConstructor(clazz, functions);
                     Object o = JavaRuntime.Invoke(constructor, args);
                 }
             }
             catch (Exception ex)
             {
                 Log.Exception(ex);
             }
         }
     }
 }