Ejemplo n.º 1
0
        protected override void OnEntering(GameMode last)
        {
            base.OnEntering(last);

            Scheduler.Add(delegate
            {
                welcome.Play();

                Scheduler.AddDelayed(delegate
                {
                    bgm.Start();

                    mainMenu = new MainMenu();
                    mainMenu.Preload(Game);

                    Scheduler.AddDelayed(delegate
                    {
                        DidLoadMenu = true;
                        Push(mainMenu);
                    }, 2300);
                }, 600);
            });

            logo.ScaleTo(0.4f);
            logo.FadeOut();

            logo.ScaleTo(1, 4400, EasingTypes.OutQuint);
            logo.FadeIn(20000, EasingTypes.OutQuint);
        }
Ejemplo n.º 2
0
        private void ensurePlayingSelected(bool preview = false)
        {
            AudioTrack track = Beatmap?.Track;

            if (track != null)
            {
                trackManager.SetExclusive(track);
                if (preview)
                {
                    track.Seek(Beatmap.Beatmap.Metadata.PreviewTime);
                }
                track.Start();
            }
        }
Ejemplo n.º 3
0
        private async Task ensurePlayingSelected()
        {
            AudioTrack track = null;

            await Task.Run(() => track = Beatmap?.Track);

            Schedule(delegate
            {
                if (track != null)
                {
                    trackManager.SetExclusive(track);
                    track.Start();
                }
            });
        }
Ejemplo n.º 4
0
Archivo: Intro.cs Proyecto: UgiNyaa/osu
        public override void Load(BaseGame game)
        {
            base.Load(game);

            Children = new Drawable[]
            {
                logo = new OsuLogo()
                {
                    Alpha       = 0,
                    Additive    = true,
                    Interactive = false,
                    Colour      = Color4.DarkGray,
                    Ripple      = false
                }
            };

            AudioSample welcome = game.Audio.Sample.Get(@"welcome");

            AudioTrack bgm = game.Audio.Track.Get(@"circles");

            bgm.Looping = true;

            Scheduler.Add(delegate
            {
                welcome.Play();
            });

            Scheduler.AddDelayed(delegate
            {
                bgm.Start();
            }, 600);

            Scheduler.AddDelayed(delegate
            {
                DidLoadMenu = true;
                Push(new MainMenu());
            }, 2900);

            logo.ScaleTo(0);

            logo.ScaleTo(1, 5900, EasingTypes.OutQuint);
            logo.FadeIn(30000, EasingTypes.OutQuint);
        }
Ejemplo n.º 5
0
        public override void Reset()
        {
            base.Reset();

            beatmap = LoadTestBeatmap("C18H27NO3", out beatmapRootPath);
            //beatmap = LoadTestBeatmap("soflan", out beatmapRootPath, "two");
            //beatmap = LoadTestBeatmap("bb", out beatmapRootPath, "grv");
            //beatmap = LoadTestBeatmap("cc", out beatmapRootPath, "grv");
            playback.Beatmap      = beatmap;
            playback.ViewDuration = 0.4f;

            // Load beatmap audio
            string audioPath = Path.Combine(beatmapRootPath, beatmap.Metadata.AudioPath);

            audioTrackStream = File.Open(audioPath, FileMode.Open);
            audioTrack       = new AudioTrackBass(audioTrackStream, false);

            //var retrigger = new Retrigger();
            //retrigger.Duration = beatmap.TimingPoints[0].GetDivisionDuration(new TimeDivision(1, 4));
            //retrigger.Gating = 0.25f;
            //retrigger.LoopCount = 4;
            //audioTrack.AddDsp(retrigger);

            audioTrack.Start();

            Add(gameView = new GameRenderView
            {
                RelativeSizeAxes = Axes.Both,
                Size             = Vector2.One
            });

            playback.ViewDurationChanged += (sender, args) =>
            {
                gameView.renderer.ViewDuration = playback.ViewDuration;
            };
            gameView.renderer.ViewDuration = playback.ViewDuration;

            Add(controllerWindow = new ControllerWindow(audioTrack, playback));
            controllerWindow.Show();

            effectController.Initializer(playback, audioTrack, game.Audio.Sample);
        }
Ejemplo n.º 6
0
 private void Restart()
 {
     audioTrack.Seek(0); // Reset
     audioTrack.Start();
 }