コード例 #1
0
        private void Start_Click(object sender, EventArgs e)
        {
            if (songs.Text == "")
            {
            }
            else
            {
                //set difficulty
                SetDifficulty(difficulty.Text);
                delay = (280 / gamespeed);


                //create a new instance of beat detector and load FMOD system
                detector = BeatDetector.Instance();
                detector.loadSystem();

                //load song in array
                detector.LoadSong(1024, songPaths[currentSongIndex]);

                //delay spawn to time beats
                detector.loadSongToDelay(delay);

                //start the song
                detector.setStarted(true);

                //start gravity timer
                gravity.Enabled = true;
                gravity.Start();

                //hide main menu UI
                start.Visible      = false;
                songs.Visible      = false;
                loadSongs.Visible  = false;
                difficulty.Visible = false;
                topEU.SendToBack();



                //show in-game UI
                DisplayScore();
                SetHitField();
                SetHitBar();
                highScore.Visible    = true;
                scoreDisplay.Visible = true;
                NowPlaying();
                np.Visible = true;
                np.Text    = "Now Playing:\n" + songs.Text;
                Focus();
            }
        }