예제 #1
0
        /// <summary>
        /// LoadContent will be called once per game and is the place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            //make viewports
            if (VERTICAL_SCREEN)
            {
                mainView = p1View = p2View = GraphicsDevice.Viewport;
                p1View.Height = p2View.Height = p1View.Height / 2;
                p2View.Y = p1View.Height;
            }
            else
            {
                mainView = p1View = p2View = GraphicsDevice.Viewport;
                p1View.Width = p2View.Width = p1View.Width / 2;
                p2View.X = p1View.Width;
            }

            //render target for flipping the player two screen for UPRIGHT VIEW
            tempTarget = new RenderTarget2D(GraphicsDevice, SCREENWIDTH, SCREENHEIGHT, 1,
            GraphicsDevice.DisplayMode.Format, GraphicsDevice.PresentationParameters.MultiSampleType,
            GraphicsDevice.PresentationParameters.MultiSampleQuality, RenderTargetUsage.PreserveContents);

            IMAGE_BG = Content.Load<Texture2D>("BG");
            IMAGE_TITLE = Content.Load<Texture2D>("Title");
            IMAGE_ANVIL = Content.Load<Texture2D>("anvi");

            IMAGE_GUN = Content.Load<Texture2D>("Colt");
            IMAGE_GUN_IN_HAND = Content.Load<Texture2D>("gun1");
            IMAGE_HAMMER = Content.Load<Texture2D>("ColtHammer");
            IMAGE_TRIGGER = Content.Load<Texture2D>("ColtTrigger");
            IMAGE_ARM = Content.Load<Texture2D>("dumb_arm");
            IMAGE_UPPER_ARM = Content.Load<Texture2D>("CB_UpperArm");
            IMAGE_FORE_ARM = Content.Load<Texture2D>("CB_GunForearm");
            IMAGE_BODY = Content.Load<Texture2D>("CB_Body");
            IMAGE_HEAD = Content.Load<Texture2D>("CB_Head");
            IMAGE_HOLSTER = Content.Load<Texture2D>("CB_Holster");
            IMAGE_LEFTARM = Content.Load<Texture2D>("CB_LeftArm");
            IMAGE_LEFTLEG = Content.Load<Texture2D>("CB_LeftLeg");
            IMAGE_RIGHTLEG = Content.Load<Texture2D>("CB_RightLeg");
            IMAGE_FIST_HAND = Content.Load<Texture2D>("CB1_Fisthand");
            IMAGE_OPEN_HAND = Content.Load<Texture2D>("CB1_Openhand");
            IMAGE_SPIN_HAND = Content.Load<Texture2D>("CB1_Spinhand");

            IMAGE_GUN2 = Content.Load<Texture2D>("SW_Body");
            IMAGE_GUN_IN_HAND2 = Content.Load<Texture2D>("gun2");
            IMAGE_HAMMER2 = Content.Load<Texture2D>("SW_Hammer");
            IMAGE_TRIGGER2 = Content.Load<Texture2D>("SW_Trigger");
            IMAGE_ARM2 = Content.Load<Texture2D>("dumb_arm");
            IMAGE_UPPER_ARM2 = Content.Load<Texture2D>("CB2_UpperArm");
            IMAGE_FORE_ARM2 = Content.Load<Texture2D>("CB2_GunForearm");
            IMAGE_BODY2 = Content.Load<Texture2D>("CB2_Body");
            IMAGE_HEAD2 = Content.Load<Texture2D>("CB2_Head");
            IMAGE_HOLSTER2 = Content.Load<Texture2D>("CB2_Holster");
            IMAGE_LEFTARM2 = Content.Load<Texture2D>("CB2_RightArm");
            IMAGE_LEFTLEG2 = Content.Load<Texture2D>("CB2_LeftLeg");
            IMAGE_RIGHTLEG2 = Content.Load<Texture2D>("CB2_RightLeg");
            IMAGE_FIST_HAND2 = Content.Load<Texture2D>("CB2_Fisthand");
            IMAGE_OPEN_HAND2 = Content.Load<Texture2D>("CB2_Openhand");
            IMAGE_SPIN_HAND2 = Content.Load<Texture2D>("CB2_Spinhand");

            FONT = Content.Load<SpriteFont>("SpriteFont1");
            IMAGE_DOT = Content.Load<Texture2D>("dot");
            IMAGE_BULLET = Content.Load<Texture2D>("bullet");
            IMAGE_ARROW = Content.Load<Texture2D>("red_arrow");

            MUSIC_BG = Content.Load<Song>("Ennio Morricone Two Mules for Sister Sara");
            MUSIC_BG2 = Content.Load<Song>("For A Few Dollars More Theme (Ennio Morricone)");
            MUSIC_BG3 = Content.Load<Song>("Mexican Music");
            SOUND_COCK = Content.Load<SoundEffect>("c**k");
            SOUND_TRIGGER = Content.Load<SoundEffect>("trigger");
            SOUND_TWIRL = Content.Load<SoundEffect>("twirl");
            SOUND_WHIRL = Content.Load<SoundEffect>("whirl");
            SOUND_SHOOT = Content.Load<SoundEffect>("shoot");
            SOUND_RICOCHET = Content.Load<SoundEffect>("ricochet");
            SOUND_HOLSTER1 = Content.Load<SoundEffect>("holster1");
            SOUND_HOLSTER2 = Content.Load<SoundEffect>("holster2");
            SOUND_GOOD = Content.Load<SoundEffect>("good_sound");
            SOUND_BAD = Content.Load<SoundEffect>("bad_sound");
            SOUND_THROW = Content.Load<SoundEffect>("throw_sound");
            SOUND_DROP = Content.Load<SoundEffect>("drop_sound");
            SOUND_DEAD = Content.Load<SoundEffect>("dead");
            SOUND_ANVIL = Content.Load<SoundEffect>("anvil");
            SOUND_RING = Content.Load<SoundEffect>("RingingForJames");

            //p1Screen = new DuelScreen(this, PlayerIndex.One);
            //p2Screen = new DuelScreen(this, PlayerIndex.Two);
            splashScreen = new SplashScreen(this);
        }
예제 #2
0
 internal void setMode(modes mode)
 {
     MediaPlayer.Stop();
     this.mode = mode;
     splashScreen = null;
     if (mode == modes.duel)
     {
         p1Screen = new DuelScreen(this, PlayerIndex.One);
         p2Screen = new DuelScreen(this, PlayerIndex.Two);
         MediaPlayer.Play(MUSIC_BG2);
     }
     else if (mode == modes.title)
     {
         mainScreen = new MenuScreen(this);
         MediaPlayer.Play(MUSIC_BG);
     }
 }