コード例 #1
0
ファイル: Game1.cs プロジェクト: mbreckon/LudumDare45
        /// <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();
        }
コード例 #2
0
ファイル: Bomb.cs プロジェクト: mbreckon/LudumDare45
 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;
 }
コード例 #3
0
ファイル: Map.cs プロジェクト: mbreckon/LudumDare45
 public Map(
     ScreenSpace gameArea,
     TileMap tileMap,
     GameGraphics graphics)
 {
     this.gameArea = gameArea;
     this.tileMap  = tileMap;
     this.graphics = graphics;
 }
コード例 #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);
 }
コード例 #5
0
 public IntroText(
     GameGraphics graphics,
     ScreenSpace screenSpace,
     string[] text)
 {
     foreach (var line in text)
     {
         lines.Add(new LineOfText(graphics, screenSpace, line));
     }
 }
コード例 #6
0
ファイル: LineOfText.cs プロジェクト: mbreckon/LudumDare45
        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;
        }
コード例 #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);
 }
コード例 #8
0
ファイル: Level.cs プロジェクト: mbreckon/LudumDare45
 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;
 }
コード例 #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;
        }