Пример #1
0
 public Door(Texture2D texture, int row, int column, ScreenSpace screenSpace, LevelState levelState)
 {
     this.texture     = texture;
     this.row         = row;
     this.column      = column;
     this.screenSpace = screenSpace;
     this.levelState  = levelState;
 }
Пример #2
0
 public Evidence(LevelState levelState, Texture2D texture, int row, int column, ScreenSpace gameArea)
 {
     this.levelState = levelState;
     this.texture    = texture;
     this.row        = row;
     this.column     = column;
     this.gameArea   = gameArea;
 }
Пример #3
0
 public EnemyStyle1(Texture2D texture, Map map, int row, int column, ScreenSpace gameArea)
 {
     this.texture  = texture;
     position      = gameArea.GetTilePosition(row, column);
     velocity      = new Vector2(-1.0f, 0);
     this.map      = map;
     this.gameArea = gameArea;
 }
Пример #4
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();
        }
Пример #5
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;
 }
Пример #6
0
 public Map(
     ScreenSpace gameArea,
     TileMap tileMap,
     GameGraphics graphics)
 {
     this.gameArea = gameArea;
     this.tileMap  = tileMap;
     this.graphics = graphics;
 }
Пример #7
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);
 }
Пример #8
0
 public IntroText(
     GameGraphics graphics,
     ScreenSpace screenSpace,
     string[] text)
 {
     foreach (var line in text)
     {
         lines.Add(new LineOfText(graphics, screenSpace, line));
     }
 }
Пример #9
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;
        }
Пример #10
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);
 }
Пример #11
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;
 }
Пример #12
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;
        }
Пример #13
0
 public LivesIndicator(Texture2D life, ScreenSpace gameArea, GameState gameState)
 {
     this.gameState = gameState;
     this.gameArea  = gameArea;
     this.life      = life;
 }