コード例 #1
0
ファイル: LProcess.cs プロジェクト: vb0067/LGame
 public void OnDestroy()
 {
     EndTransition();
     if (GLEx.Self != null)
     {
         GLEx.Self.Dispose();
     }
     scene = null;
     screens.Clear();
     if (isInstance)
     {
         isInstance = false;
         loads.Clear();
         unloads.Clear();
         drawings.Clear();
         if (currentControl != null)
         {
             currentControl.Destroy();
             currentControl = null;
         }
         LSystem.isLogo = false;
         LTextures.DisposeAll();
         XNACircle.Free();
         InitDestory();
     }
 }
コード例 #2
0
ファイル: LProcess.cs プロジェクト: hellogithubtesting/LGame
 public LProcess(LSilverlightPlus p, int width, int height)
 {
     this.scene = p;
     this.currentInput = new LInputFactory(this);
     this.screens = new LinkedList<Screen>();
     this.width = width;
     this.height = height;
     this.Clear();
 }
コード例 #3
0
ファイル: LProcess.cs プロジェクト: vb0067/LGame
 public LProcess(LSilverlightPlus p, int width, int height)
 {
     this.scene        = p;
     this.currentInput = new LInputFactory(this);
     this.screens      = new LinkedList <Screen>();
     this.width        = width;
     this.height       = height;
     this.Clear();
 }
コード例 #4
0
        public static LPixmap ToScreenCaptureTexturePixmap()
        {
            LSilverlightPlus plus = LSystem.screenActivity;

            if (plus != null)
            {
                return(new LPixmap(ToScreenCaptureTexture()));
            }
            else
            {
                return(null);
            }
        }
コード例 #5
0
ファイル: GamePage.xaml.cs プロジェクト: vb0067/LGame
        /// <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));
        }
コード例 #6
0
        public static Texture2D ToScreenCaptureTexture2D()
        {
            LSilverlightPlus plus = LSystem.screenActivity;

            if (plus != null)
            {
                RenderTarget2D render = new RenderTarget2D(GLEx.Device, GLEx.Device.PresentationParameters.BackBufferWidth, GLEx.Device.PresentationParameters.BackBufferHeight, false, GLEx.Device.PresentationParameters.BackBufferFormat, GLEx.Device.PresentationParameters.DepthStencilFormat);

                GLEx.Device.SetRenderTarget(render);

                plus.DrawXNA();

                GLEx.Device.SetRenderTarget(null);

                return(render);
            }
            else
            {
                return(null);
            }
        }
コード例 #7
0
ファイル: LProcess.cs プロジェクト: hellogithubtesting/LGame
 public void OnDestroy()
 {
     EndTransition();
     if (GLEx.Self != null)
     {
         GLEx.Self.Dispose();
     }
     scene = null;
     screens.Clear();
     if (isInstance)
     {
         isInstance = false;
         loads.Clear();
         unloads.Clear();
         drawings.Clear();
         if (currentControl != null)
         {
             currentControl.Destroy();
             currentControl = null;
         }
         LSystem.isLogo = false;
         LTextures.DisposeAll();
         XNACircle.Free();
         InitDestory();
     }
 }
コード例 #8
0
ファイル: GamePage.xaml.cs プロジェクト: vb0067/LGame
 public GamePage()
 {
     InitializeComponent();
     //加载Silverlight数据到LGame
     plus = LSilverlightPlus.Load(this, (Application.Current as App).Content, OnMain);
 }