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();*/ }
public override void OnMain() { LSetting setting = new LSetting(); setting.showFPS = true; setting.landscape = true; Register(setting, typeof(GameMapTest)); }
public override void OnMain() { LSetting setting = new LSetting(); setting.showLogo = false; setting.showFPS = true; setting.landscape = false; Register(setting, typeof(HelloWorld)); }
public override void OnMain() { LTexture.ALL_LINEAR = true; LSetting setting = new LSetting(); setting.showFPS = true; setting.landscape = true; Register(setting,typeof(LLKScreen)); }
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)); }
public void Register(LSetting setting, Type clazz, params object[] args) { if (m_type == null) { m_type = new GameType(); } if (setting != null) { m_type.setting = setting; } m_type.mainType = clazz; m_type.args = args; }
/// <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)); }
public void Register(LSetting setting, Type clazz, params object[] args) { MaxScreen(setting.width, setting.height); Initialization(setting.landscape, setting.mode); SetShowFPS(setting.showFPS); SetShowMemory(setting.showMemory); SetShowLogo(setting.showLogo); SetFPS(setting.fps); if (GamePage != null) { GamePage.Title = setting.title; } 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); } } } }
public void Register(LSetting setting, Type clazz, params object[] args) { XNAConfig.Load(); 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) { Loon.Utils.Debug.Log.Exception(ex); } } } }
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)); }