예제 #1
0
파일: MainGame.cs 프로젝트: sunny-lan/Uso
        //private void Graphics_PreparingDeviceSettings(object sender, PreparingDeviceSettingsEventArgs e)
        //{

        //    graphics.PreferMultiSampling = true;
        //}

        protected override void LoadContent()
        {
            Content.RootDirectory = "Content";

            globals.Theme.LoadBasic(Content);
            this.layers = new GameLayers
            {
                MainLayer = new SpriteBatch(GraphicsDevice),
            };

            this.themeTask = Task.Run(() => globals.Theme.LoadFromContent(Content));

            Func <Task <Screen> > loadAll = async() =>
            {
                await themeTask;
                this.cursor = new Cursor(globals.Theme.Cursor)
                {
                    ClickPoint = new Vector2
                    {
                        X = 127,
                        Y = 106,
                    },
                    DefaultScale = 0.5f,
                };
                return(new GameMenu(globals));
            };

            Switch(new LoadingScreen(globals, loadAll()));
        }
예제 #2
0
파일: PlayScreen.cs 프로젝트: sunny-lan/Uso
        public void Draw(GameLayers output, Rectangle area)
        {
            var pos = area.Location.ToVector2();
            var sb  = output.MainLayer;

            sR.Draw(sb, area);
            sb.DrawString(globals.Theme.TestFont, "" + Math.Round(ts.Time / ts.PPQ / 4), pos, Color.White);


            ctr.Draw(sb, pos + new Vector2
            {
                X = 100,
                Y = 100,
            });
        }
예제 #3
0
 public void Draw(GameLayers output, Rectangle area)
 {
     output.MainLayer.DrawString(globals.Theme.TestFont, "press enter to select desire drive", area.Location.ToVector2(), Color.White);
 }
예제 #4
0
 public void Draw(GameLayers output, Rectangle area)
 {
     output.MainLayer.DrawString(globals.Theme.TestFont, "loading", area.Location.ToVector2(), Color.White);
 }