Пример #1
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));
        }
Пример #2
0
 public GamePage()
 {
     InitializeComponent();
     //加载Silverlight数据到LGame
     plus = LSilverlightPlus.Load(this, (Application.Current as App).Content, OnMain);
 }