Example #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()
        {
            gameGraphics = new GameGraphics(Content);
            spriteBatch  = new SpriteBatch(GraphicsDevice);
            screenSpace  = new ScreenSpace(GraphicsDevice);

            GoToIntro();
        }
Example #2
0
 public Bomb(GameGraphics graphics, int row, int column, int seconds, ScreenSpace screenSpace, TileMap tileMap)
 {
     this.graphics    = graphics;
     this.row         = row;
     this.column      = column;
     this.seconds     = seconds;
     this.screenSpace = screenSpace;
     this.tileMap     = tileMap;
 }
Example #3
0
 public Map(
     ScreenSpace gameArea,
     TileMap tileMap,
     GameGraphics graphics)
 {
     this.gameArea = gameArea;
     this.tileMap  = tileMap;
     this.graphics = graphics;
 }
Example #4
0
 public Intro(GameGraphics graphics, ScreenSpace screenSpace, ScreenController screenController)
 {
     this.graphics         = graphics;
     this.screenController = screenController;
     display         = new IntroText(graphics, screenSpace, introText);
     fadeInOutTimer  = new AnimationTimer(150, () => display.Animate());
     changeLineTimer = new AnimationTimer(3000, () => display.Transition());
     Thread.Sleep(200);
 }
Example #5
0
 public IntroText(
     GameGraphics graphics,
     ScreenSpace screenSpace,
     string[] text)
 {
     foreach (var line in text)
     {
         lines.Add(new LineOfText(graphics, screenSpace, line));
     }
 }
Example #6
0
        public LineOfText(
            GameGraphics graphics,
            ScreenSpace screenSpace,
            string text)
        {
            this.graphics = graphics;
            this.text     = text;

            textCentre   = graphics.MainFont.MeasureString(text) / 2;
            textPosition = screenSpace.ScreenCenter;
            CurrentFade  = Fade.Invisible;
        }
Example #7
0
 public Progress(
     ScreenSpace screenSpace,
     GameGraphics graphics,
     GameState gameState,
     ScreenController screenController)
 {
     this.graphics         = graphics;
     this.gameState        = gameState;
     this.screenController = screenController;
     position = screenSpace.ScreenCenter - new Vector2(200, 200);
     levelsCompletePosition   = screenSpace.ScreenCenter - new Vector2(100, 230);
     nextLevelPosition        = screenSpace.ScreenCenter + new Vector2(-100, 210);
     currentDetectivePosition = new Vector2(0, 550);
 }
Example #8
0
 protected Level(
     string levelName,
     GameGraphics graphics,
     ScreenController screenController,
     GameState gameState,
     ScreenSpace screenSpace
     )
 {
     this.levelName        = levelName;
     this.graphics         = graphics;
     this.screenController = screenController;
     this.gameState        = gameState;
     this.screenSpace      = screenSpace;
 }
Example #9
0
        public Player(
            GameState gameState,
            ScreenController screenController,
            GameGraphics graphics,
            ScreenSpace gameArea,
            Map level,
            LevelState state,
            Vector2 respawnPosition)
        {
            this.screenController = screenController;
            this.graphics         = graphics;
            this.screenSpace      = gameArea;
            this.level            = level;
            this.state            = state;
            this.gameState        = gameState;
            this.respawnPosition  = respawnPosition;
            position = respawnPosition;

            direction = Direction.Right;
        }