コード例 #1
0
ファイル: Balltest.cs プロジェクト: stupid-genius/ss13remake
        private void SetupGorgon()
        {
            Gorgon.Initialize(true, false);
            Gorgon.SetMode(this);
            //Gorgon.AllowBackgroundRendering = true;
            //Gorgon.Screen.BackgroundColor = Color.FromArgb(50, 50, 50);

            //Gorgon.CurrentClippingViewport = new Viewport(0, 20, Gorgon.Screen.Width, Gorgon.Screen.Height - 20);
            //PreciseTimer preciseTimer = new PreciseTimer();
            //Gorgon.MinimumFrameTime = PreciseTimer.FpsToMilliseconds(66);
            Gorgon.Idle += new FrameEventHandler(Gorgon_Idle);
            Gorgon.FrameStatsVisible = true;
            Gorgon.DeviceReset      += MainWindowResizeEnd;

            bouncesprite = new Sprite("flyingball", GorgonLibrary.Graphics.Image.FromFile(mediadir + @"flyingball.png"));
            //bouncesprite.SetScale(3, 3);

            baseTarget       = new RenderImage("baseTarget", 32, 32, ImageBufferFormats.BufferRGB888A8);
            baseTargetSprite = new Sprite("baseTargetSprite", baseTarget);

            screenTarget = new RenderImage("screenTarget", Gorgon.CurrentClippingViewport.Width, Gorgon.CurrentClippingViewport.Height, ImageBufferFormats.BufferRGB888A8);

            bounceysprites = new BounceySprite[10];
            for (int i = 0; i < 10; i++)
            {
                bounceysprites[i] = new BounceySprite(bouncesprite, new Vector2D(random.Next(0, Gorgon.CurrentClippingViewport.Width), random.Next(0, Gorgon.CurrentClippingViewport.Height)),
                                                      new Vector2D((float)random.Next(-100000, 100000) / 100000, (float)random.Next(-100000, 100000) / 100000)
                                                      , this);
            }
        }
コード例 #2
0
ファイル: Balltest.cs プロジェクト: Gartley/ss13remake
        private void SetupGorgon()
        {
            Gorgon.Initialize(true, false);
            Gorgon.SetMode(this);
            //Gorgon.AllowBackgroundRendering = true;
            //Gorgon.Screen.BackgroundColor = Color.FromArgb(50, 50, 50);

            //Gorgon.CurrentClippingViewport = new Viewport(0, 20, Gorgon.Screen.Width, Gorgon.Screen.Height - 20);
            //PreciseTimer preciseTimer = new PreciseTimer();
            //Gorgon.MinimumFrameTime = PreciseTimer.FpsToMilliseconds(66);
            Gorgon.Idle += new FrameEventHandler(Gorgon_Idle);
            Gorgon.FrameStatsVisible = true;
            Gorgon.DeviceReset += MainWindowResizeEnd;

            bouncesprite = new Sprite("flyingball", GorgonLibrary.Graphics.Image.FromFile(mediadir + @"flyingball.png"));
            //bouncesprite.SetScale(3, 3);

            baseTarget = new RenderImage("baseTarget", 32, 32, ImageBufferFormats.BufferRGB888A8);
            baseTargetSprite = new Sprite("baseTargetSprite", baseTarget);

            screenTarget = new RenderImage("screenTarget", Gorgon.CurrentClippingViewport.Width, Gorgon.CurrentClippingViewport.Height, ImageBufferFormats.BufferRGB888A8);

            bounceysprites = new BounceySprite[10];
            for (int i = 0; i < 10; i++)
            {
                bounceysprites[i] = new BounceySprite(bouncesprite, new Vector2D(random.Next(0, Gorgon.CurrentClippingViewport.Width), random.Next(0, Gorgon.CurrentClippingViewport.Height)), 
                                        new Vector2D((float)random.Next(-100000,100000) / 100000, (float)random.Next(-100000,100000) / 100000)
                                       , this);
            }
        }