Пример #1
0
        protected override void _Init(GameSettings settings)
        {
            base._Init(settings);

            {
                var o = new ImageFileObject(DX.LoadGraph(
                                                Path.Combine(Configuration.GetGlobal().DataDirectory.FullName, "logo_jp.png")));
                o.Init(settings);
                o.Transparent = true;
                logo_jp       = o;
            }
            {
                var o = new ImageFileObject(DX.LoadGraph(
                                                Path.Combine(Configuration.GetGlobal().DataDirectory.FullName, "logo_en.png")));
                o.Init(settings);
                o.Transparent = true;
                logo_en       = o;
            }
            {
                var o = new ImageFileObject(DX.LoadGraph(
                                                Path.Combine(Configuration.GetGlobal().DataDirectory.FullName, "teamlogo.png")));
                o.Init(settings);
                o.Transparent = true;
                teamlogo      = o;
            }

            teamlogoSE = DX.LoadSoundMem(
                Path.Combine(Configuration.GetGlobal().DataDirectory.FullName, "teamlogo_se.wav"));
            wetop = DX.LoadSoundMem(
                Path.Combine(Configuration.GetGlobal().DataDirectory.FullName, "wetop.mp3"));
        }
Пример #2
0
 public SlideshowInfo(int time, string filename, string description)
 {
     Time        = time;
     FileName    = filename;
     Description = description;
     Image       = new ImageFileObject(DX.LoadGraph(
                                           Path.Combine(Configuration.GetGlobal().DataDirectory.FullName, FileName)));
 }
Пример #3
0
        protected override void _Update(GameStatus status)
        {
            base._Update(status);

            if (startTime == -1)
            {
                startTime = status.CurrentTimeInMillis;
            }
            int durationFromStart = status.CurrentTimeInMillis - startTime;

            if (durationFromStart >= 1000 && GameSettings.GameLogic.Keyborad.IsHit(DX.KEY_INPUT_RETURN))
            {
                MainScene s = new MainScene();
                s.Init(GameSettings);
                s.SerialPort = SerialPort;
                GotoScene(s);

                DX.StopSoundMem(wetop);
            }

            float xf;

            switch (phase)
            {
            case 0:
                if (durationFromStart >= TEAMLOGO_TIME)
                {
                    phase++;
                    DX.PlaySoundMem(teamlogoSE, DX.DX_PLAYTYPE_BACK);
                }
                break;

            case 1:
                if (durationFromStart >= TEAMLOGO_TIME + 1300)
                {
                    phase++;
                }
                break;

            case 2:
                if (durationFromStart >= TEAMLOGO_TIME + 2000)
                {
                    phase++;
                }
                break;

            case 3:
                if (durationFromStart >= LOGO_EN_TIME)
                {
                    phase++;
                    DX.PlaySoundMem(wetop, DX.DX_PLAYTYPE_BACK);
                }
                break;

            case 4:
                if (durationFromStart >= LOGO_JP_TIME)
                {
                    phase++;
                }
                break;

            case 5:
                if (durationFromStart >= SLIDESHOW_TIME)
                {
                    phase++;
                }
                break;

            case 6:
                if (durationFromStart >= FINALE_TIME)
                {
                    phase++;
                }
                break;
            }

            switch (phase)
            {
            case 1:
                xf            = m.Calculate((durationFromStart - TEAMLOGO_TIME) / 700.0f).X;
                teamlogoAlpha = (int)(xf * 255);
                teamlogo.X    = GameSettings.WindowWidth / 2 - teamlogo.Width / 2;
                teamlogo.Y    = GameSettings.WindowHeight / 2 - teamlogo.Height / 2;
                break;

            case 2:
                xf            = m.Calculate((durationFromStart - TEAMLOGO_TIME - 1300) / 700.0f).X;
                teamlogoAlpha = (int)((1 - xf) * 255);
                teamlogo.X    = GameSettings.WindowWidth / 2 - teamlogo.Width / 2;
                teamlogo.Y    = GameSettings.WindowHeight / 2 - teamlogo.Height / 2;
                break;

            case 4:
            case 5:
                xf        = m.Calculate((durationFromStart - LOGO_EN_TIME) / 1000.0f).X;
                logo_en.X = (int)(xf * ((GameSettings.WindowWidth / 2 - logo_en.Width / 2) + logo_en.Width)) - logo_en.Width;
                logo_en.Y = GameSettings.WindowHeight / 2 - logo_en.Height;
                xf        = m.Calculate((durationFromStart - LOGO_JP_TIME) / 1000.0f).X;
                logo_jp.X = (int)(xf * ((GameSettings.WindowWidth / 2 - logo_jp.Width / 2) + logo_jp.Width)) - logo_jp.Width;
                logo_jp.Y = GameSettings.WindowHeight / 2;
                break;

            case 6:
            {
                int timeForSlideshow = durationFromStart - SLIDESHOW_TIME;
                if (timeForSlideshow >= SLIDESHOW_INFO[slideshowPhase + 1].Time)
                {
                    slideshowPhase++;
                }
                ImageFileObject img = SLIDESHOW_INFO[slideshowPhase].Image;
                img.Init(GameSettings);
                img.X = (GameSettings.WindowWidth - img.Width) / 2;
                img.Y = (GameSettings.WindowHeight - img.Height) / 2;
            }
            break;

            case 7:
                teamlogo.Draw();
                break;
            }
        }