/// <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 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)); }
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)); }