示例#1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        public void LoadContent()
        {
            MusicPlayer mp = this._mainGame.GameManager.GetComponent <MusicPlayer>();
            StatusMaker sm = this._mainGame.GameManager.GetComponent <StatusMaker>();

            this._mainGame.Window.Title = mp.GetActiveSongName();

            //music minutes and seconds
            this._musicMinutes = mp.GetActiveSongDuration().Minutes;
            this._musicSeconds = mp.GetActiveSongDuration().Seconds;

            if (this._musicSeconds < 10)
            {
                this._musicTimeText = this._musicMinutes + ":0" + this._musicSeconds;
            }
            else
            {
                this._musicTimeText = this._musicMinutes + ":" + this._musicSeconds;
            }

            sm.GenerateStatus(-1, 0, 0, this._isSongFinished);

            this.NewGame();

            //game is paused when start
            this._mainGame.IsPaused = true;
        }
示例#2
0
        public void NewGame()
        {
            DynamicWorldCounter dwc = this._mainGame.GameManager.GetComponent <DynamicWorldCounter>();
            ParticleSystems     ps  = this._mainGame.GameManager.GetComponent <ParticleSystems>();
            Player      player      = this._mainGame.GameManager.GetComponent <Player>();
            MusicPlayer mp          = this._mainGame.GameManager.GetComponent <MusicPlayer>();

            this._actualSongScore = 0;
            player.ReInit();

            this._particlesPerGame = 0;
            this._isSongFinished   = false;
            this._shieldHit        = 0;
            this._particleCatch    = 0;
            dwc.ReInit();

            this._bonusTime   = 5;
            this._timeToBonus = 35;

            this._musicMinutes = mp.GetActiveSongDuration().Minutes;
            this._musicSeconds = mp.GetActiveSongDuration().Seconds;
            ps.ReInit();
        }