示例#1
0
        public void StartGame()
        {
            gamePlayScreen = new GamePlayScreen(this);
            currentScreen  = Screens.GamePlayScreen;

            startScreen    = null;
            gameOverScreen = null;
        }
示例#2
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            // TODO: use this.Content to load your game content here
            //song = Content.Load<Song>("calm");
            //MediaPlayer.IsRepeating = true;
            //MediaPlayer.Play(song);

            Texture2D startScreenTexture = Content.Load <Texture2D>("StartScreen");

            startScreen = new StartScreen(this, startScreenTexture, getScreenWidth() / 2 - startScreenTexture.Width / 2, 20);

            currentScreen = Screens.StartScreen;

            base.LoadContent();
        }