示例#1
0
        public GSPause(GameStateManager gsm)
            : base(gsm)
        {
            resume = new SpriteIMG(LoadTexture("TitleAssets/resume"), Game1.GetScreenCenter() + new Vector2(0, -50));
            mainMenu = new SpriteIMG(LoadTexture("TitleAssets/mainMenu"), Game1.GetScreenCenter() + new Vector2(0, 50));
            restart = new SpriteIMG(LoadTexture("TitleAssets/restart"), Game1.GetScreenCenter() + new Vector2(0, 150));

            backdrop = new SpriteIMG(LoadTexture("TitleAssets/pauseBG"), Game1.GetScreenCenter());

            AudioManager.pause.Play();
        }
示例#2
0
        public GSWin(GameStateManager gsm)
            : base(gsm)
        {
            backdrop = new SpriteIMG(LoadTexture("whitePixel"), Vector2.Zero);
            backdrop.scale = new Vector2(800, 600);
            backdrop.color = Color.Black;

            credits = new SpriteIMG(LoadTexture("WinAssets/credits"), new Vector2(0, Game1.screenHeight));
            credits.origin = Vector2.Zero;

            thanks = new SpriteIMG(LoadTexture("WinAssets/thanks"), new Vector2(Game1.screenWidth / 2, credits.position.Y + credits.texture.Height + Game1.screenHeight / 2 + Game1.screenHeight));

            credits.am.StartNewAnimation(AnimationType.Linear, credits.position, new Vector2(0, -2000), 1024);
            thanks.am.StartNewAnimation(AnimationType.Linear, thanks.position, Game1.GetScreenCenter(), 1024);
        }
示例#3
0
        public GSTitle(GameStateManager gsm)
            : base(gsm)
        {
            titleSplashArt = new SpriteIMG(LoadTexture("TitleAssets/titleSplashArt"), Game1.GetScreenCenter());
            titleLogo = new SpriteIMG(LoadTexture("TitleAssets/titleLogo"), Game1.GetScreenCenter());
            titlePressStart = new SpriteIMG(LoadTexture("TitleAssets/titlePressStart"), Game1.GetScreenCenter());
            sparkles1 = new SpriteIMG(LoadTexture("TitleAssets/titleSparkles1"), Game1.GetScreenCenter());
            sparkles2 = new SpriteIMG(LoadTexture("TitleAssets/titleSparkles2"), Game1.GetScreenCenter());
            titleCopyright = new SpriteIMG(LoadTexture("TitleAssets/titleCopyright"), Game1.GetScreenCenter());

            titleLogo.alpha = 0;
            titlePressStart.alpha = 0;
            titleCopyright.alpha = 0;
            sparkles2.alpha = 0;
        }
示例#4
0
        public GSHowToPlay(GameStateManager gsm)
            : base(gsm)
        {
            gamepadList.Add(new SpriteIMG(LoadTexture("HowToPlay/gamepad1"), Game1.GetScreenCenter()));
            gamepadList.Add(new SpriteIMG(LoadTexture("HowToPlay/gamepad2"), Game1.GetScreenCenter()));
            gamepadList.Add(new SpriteIMG(LoadTexture("HowToPlay/gamepad3"), Game1.GetScreenCenter()));
            gamepadList.Add(new SpriteIMG(LoadTexture("HowToPlay/gamepad4"), Game1.GetScreenCenter()));
            gamepadList.Add(new SpriteIMG(LoadTexture("HowToPlay/gamepad5"), Game1.GetScreenCenter()));

            keyboardList.Add(new SpriteIMG(LoadTexture("HowToPlay/keyboard1"), Game1.GetScreenCenter()));
            keyboardList.Add(new SpriteIMG(LoadTexture("HowToPlay/keyboard2"), Game1.GetScreenCenter()));
            keyboardList.Add(new SpriteIMG(LoadTexture("HowToPlay/keyboard3"), Game1.GetScreenCenter()));
            keyboardList.Add(new SpriteIMG(LoadTexture("HowToPlay/keyboard4"), Game1.GetScreenCenter()));
            keyboardList.Add(new SpriteIMG(LoadTexture("HowToPlay/keyboard5"), Game1.GetScreenCenter()));

            gamepadNext = new SpriteIMG(LoadTexture("HowToPlay/gamepadNext"), Game1.GetScreenCenter());
            keyboardNext = new SpriteIMG(LoadTexture("HowToPlay/keyboardNext"), Game1.GetScreenCenter());
        }
示例#5
0
        public GSMenu(GameStateManager gsm)
            : base(gsm)
        {
            logo = new SpriteIMG(LoadTexture("TitleAssets/logoWorldsApart"), Game1.GetScreenCenter() + new Vector2(0, -200));
            singlePlayer = new SpriteIMG(LoadTexture("TitleAssets/multiPlayer"), Game1.GetScreenCenter() + new Vector2(0, -50));
            multiPlayer = new SpriteIMG(LoadTexture("TitleAssets/singlePlayer"), Game1.GetScreenCenter() + new Vector2(0, 50));
            howToPlay = new SpriteIMG(LoadTexture("TitleAssets/howToPlay"), Game1.GetScreenCenter() + new Vector2(0, 150));
            exit = new SpriteIMG(LoadTexture("TitleAssets/exit"), Game1.GetScreenCenter() + new Vector2(0, 250));

            multiPlayer.alpha = 128;
            howToPlay.alpha = 128;
            exit.alpha = 128;

            backdropBase = new ScrollingBackground(LoadTexture("BGs/fieldBackdropBase1"), false);
            backdropOverlay = new ScrollingBackground(LoadTexture("BGs/fieldBackdropOverlay2"), false);
            backdropMatte = new ScrollingBackground(LoadTexture("TitleAssets/menuBackdrop"), false);

            gsm.goodness = 0;
        }
示例#6
0
        public GSPlay(GameStateManager gsm, int levelIndex)
            : base(gsm)
        {
            //backgroundThread = new Thread(LoadTheStuffs);
            //isLoading = true;

            //backgroundThread.Start();
            LoadTheStuffs(levelIndex);

            loadingScreen = new SpriteIMG(LoadTexture("loadingScreen"), Game1.GetScreenCenter());
        }
示例#7
0
        public static void InitializeGSOverlay(GameStateManager gsm1)
        {
            fadeOverlay = new SpriteIMG(Art.whitePixel, Vector2.Zero);
            fadeOverlay.scale = new Vector2(800, 600);
            fadeOverlay.origin = Vector2.Zero;
            fadeOverlay.alpha = 0;
            gsm = gsm1;
            overlayTarget = new RenderTarget2D(gsm.game.GraphicsDevice, Game1.screenWidth, Game1.screenHeight);

            words1 = new SpriteIMG(Art.words1, Game1.GetScreenCenter() + new Vector2(0, -50));
            words2 = new SpriteIMG(Art.words2, Game1.GetScreenCenter() + new Vector2(0, -50));
            words3 = new SpriteIMG(Art.words3, Game1.GetScreenCenter() + new Vector2(0, -50));
            words4 = new SpriteIMG(Art.words4, Game1.GetScreenCenter() + new Vector2(0, -50));
            words5 = new SpriteIMG(Art.words5, Game1.GetScreenCenter() + new Vector2(0, -50));
            words6 = new SpriteIMG(Art.words6, Game1.GetScreenCenter() + new Vector2(0, -50));

            words1.alpha = 0;
            words2.alpha = 0;
            words3.alpha = 0;
            words4.alpha = 0;
            words5.alpha = 0;
            words6.alpha = 0;
        }
示例#8
0
 public GameState(GameStateManager gsm)
 {
     gameStateManager = gsm;
     contentManager = gsm.NewContentManager();
     GraphicsDevice = gsm.game.GraphicsDevice;
 }
示例#9
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);

            AudioManager.InitializeAudioManager(Content);

            gsm = new GameStateManager(this);
            gd = GraphicsDevice;
            // TDO: use this.Content to load your game content here
        }