Ejemplo n.º 1
0
        public StateManager(ContentManager content, GraphicsDevice pGraphics)
        {
            ///centerCoordParam = blurEffect.Parameters["fCenter"];

            mCurrentState = mNextState = SCREEN_STATES.SPLASH_SCREEN;
            changeScreen = false;
            mContent = content;
            mGraphics = pGraphics;

            mInputManagerPlayerOne = new InputManager(PlayerIndex.One);
            //intantiate screens

            mSplashScreen = new SplashScreen(new EventHandler(SplashScreenEvent), pGraphics);
            mGameScreen = new GameScreen(new EventHandler(GameScreenEvent), pGraphics);
            mMenuScreen = new MainMenuScreen(new EventHandler(MenuScreenEvent), pGraphics);

            //mCurrentScreen = mGameScreen

            tempRenderTargetOne = new RenderTarget2D(mGraphics, screenWidth, screenHeight);
            tempRenderTargetTwo = new RenderTarget2D(mGraphics, screenWidth, screenHeight);
            tempBinding = mGraphics.GetRenderTargets();
            mGraphics.SetRenderTarget(tempRenderTargetOne);

            //effects
            noiseEffect = content.Load<Effect>("Noise");
            SepiaEffect = content.Load<Effect>("Sepia");

            noiseFilter = noiseEffect.Parameters["noisefilter"];
            blackLine = noiseEffect.Parameters["blkLine"];

            TempNoise = new Texture2D[3];
            TempNoise[0] = content.Load<Texture2D>("NOISE/noise1");
            TempNoise[1] = content.Load<Texture2D>("NOISE/noise2");
            TempNoise[2] = content.Load<Texture2D>("NOISE/noise3");
            rand = new Random();
            noise = 0;
        }
Ejemplo n.º 2
0
        public override void init(ContentManager content)
        {
            Texture2D temp;
            temp = content.Load<Texture2D>("FPO/Cursor");

            mMenuManager = new InputManager(mMenuPlayer);

            coolDown = 500;

            addListeners();

            mBG.init(content);
            mCursor.createSprite(temp, new Rectangle(0,0,temp.Width, temp.Height));
            mCourts = content.Load<Texture2D>("FPO/MenuScreen");
            mControls = content.Load<Texture2D>("FPO/Controls");

            mSelection = 0;
            mCursorLocation = new Vector2(mSelectionLocations[mSelection].X - 18, mSelectionLocations[mSelection].Y);

            showTime = MAX_CONTROL_TIME;
        }