コード例 #1
0
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);
            //song = Content.Load<Song>("Song");

            /*
             *
             * loadingScreen = Content.Load<Texture2D>("loading");*/

            tunnelWall1 = new Scrolling(Content.Load <Texture2D>("Tunnel Walls/Wall1"), new Rectangle(0, 0, 700, 400), 5);
            tunnelWall2 = new Scrolling(Content.Load <Texture2D>("Tunnel Walls/Wall2"), new Rectangle(700, 0, 700, 400), 5);

            startButton  = Content.Load <Texture2D>("Buttons/Start");
            optionButton = Content.Load <Texture2D>("Buttons/Options");
            exitButton   = Content.Load <Texture2D>("Buttons/Exit");
            charaSelButt = Content.Load <Texture2D>("Buttons/Selection");
            menuButton   = Content.Load <Texture2D>("Buttons/Menu");
            background   = Content.Load <Texture2D>("Buttons/bg");
            optionScreen = Content.Load <Texture2D>("optionScreen");
            kateSprite   = Content.Load <Texture2D>("kateSprite");
            kate         = Content.Load <Texture2D>("kate");
            norman       = Content.Load <Texture2D>("norman");
            //title = Content.Load<Texture2D>("Buttons/title");
            ground         = Content.Load <Texture2D>("ground");
            healthBarThree = Content.Load <Texture2D>("3Life");
            healthBarTwo   = Content.Load <Texture2D>("2Life");
            healthBarOne   = Content.Load <Texture2D>("1Life");
            chair          = Content.Load <Texture2D>("Obstacles/chair");
            milk           = Content.Load <Texture2D>("Collectibles/INTENSE Milk");
            id             = Content.Load <Texture2D>("Collectibles/ID Card");
            spriteFont     = Content.Load <SpriteFont>("SpriteFont1");
            normanSprite   = Content.Load <Texture2D>("normanSprite");

            snow     = Content.Load <Texture2D>("snow");
            gameOver = Content.Load <Texture2D>("gameOver");

            prologue     = Content.Load <Texture2D>("prologueScreen");
            creditScreen = Content.Load <Texture2D>("creditScreen");
            menu         = Content.Load <Texture2D>("menuScreen");
            selScreen    = Content.Load <Texture2D>("selectionScreen");

            character.CharacterSprite = Content.Load <Texture2D>("kateSprite");//default sprite
            // TODO: use this.Content to load your game content here
        }
コード例 #2
0
 private void Resume(Scrolling sub)
 {
     sub.movingSpeed = sub.preSpeed;
 }
コード例 #3
0
 //overloading Pause method
 private void Pause(Scrolling sub)
 {
     sub.movingSpeed = 0;
     sub.rectangle.X = sub.preXpos;
 }