コード例 #1
0
 public GameScreen()
 {
     RacingGameManager.LoadLevel(TrackSelection.SelectedTrack);
     RacingGameManager.Player.Reset();
     BaseGame.LightDirection = LensFlare.DefaultLightPos;
     Sound.StartGearSound();
     Sound.Play(Sound.Sounds.GameMusic);
 }
コード例 #2
0
        /// <summary>
        /// Create game screen
        /// </summary>
        public GameScreen()
        {
            // Load level
            RacingGameManager.LoadLevel(TrackSelection.SelectedTrack);

            // Reset player variables (start new game, reset time and position)
            RacingGameManager.Player.Reset();

            // Fix light direction (was changed by CarSelection screen!)
            // LightDirection will normalize
            BaseGame.LightDirection = LensFlare.DefaultLightPos;

            // Start gear sound
            Sound.StartGearSound();

            // Play game music
            Sound.Play(Sound.Sounds.GameMusic);
        }
コード例 #3
0
        /// <summary>
        /// Create game screen
        /// </summary>
        public GameScreen(RacingGameManager.Level mapName)
        {
            // Load level
            RacingGameManager.LoadLevel(mapName);

            // Reset player variables (start new game, reset time and position)
            RacingGameManager.Player.Reset();

            // Fix light direction (was changed by CarSelection screen!)
            // LightDirection will normalize
            BaseGame.LightDirection = LensFlare.DefaultLightPos;

            // Start gear sound
            Sound.StartGearSound();

            // Play game music
            Sound.Play(Sound.Sounds.GameMusic);

            RacingGameManager.InputInterface.Escape += InputInterface_Escape;
        }