コード例 #1
0
ファイル: Program.cs プロジェクト: PizzaLovers007/osu
        public static void Main(string[] args)
        {
            bool benchmark = args.Length > 0 && args[0] == @"-benchmark";

            using (GameHost host = Host.GetSuitableHost(@"osu"))
            {
                Ruleset.Register(new OsuRuleset());
                Ruleset.Register(new TaikoRuleset());
                Ruleset.Register(new ManiaRuleset());
                Ruleset.Register(new CatchRuleset());

                if (benchmark)
                {
                    host.Add(new Benchmark());
                }
                else
                {
                    host.Add(new VisualTestGame());
                }
                host.Run();
            }
        }
コード例 #2
0
        private OsuGameBase loadOsu(GameHost host)
        {
            var osu = new OsuGameBase();

            host.Add(osu);

            while (!osu.IsLoaded)
            {
                Thread.Sleep(1);
            }

            //reset beatmap database (sqlite and storage backing)
            osu.Dependencies.Get <BeatmapDatabase>().Reset();

            return(osu);
        }