/// <summary>
        /// Creates a new instance.
        /// </summary>
        /// <param name="game">Associated game object.</param>
        /// <param name="gamePlayScreen">Gameplay screen where the component will be presented.</param>
        public TexturedDrawableGameComponent(Game game, GameplayScreen gamePlayScreen)
            : base(game)
        {
            this.GamePlayScreen = gamePlayScreen;

            SpriteBatch = (SpriteBatch) Game.Services.GetService(typeof (SpriteBatch));
        }
Пример #2
0
        /// <summary>
        /// Creates a new Block instance.
        /// </summary>
        /// <param name="game">The game object.</param>
        /// <param name="gamePlayScreen">The gameplay screen.</param>
        /// <param name="texture">The texture representing the Block.</param>
        /// <param name="position">The Block's position.</param>
        public Block(Game game, GameplayScreen gamePlayScreen, Texture2D texture, Vector2 position)
            : base(game, gamePlayScreen)
        {
            this.Texture = texture;
            this.Position = position;

            DrawOrder = (int)position.Y;
        }
        /// <summary>
        /// Load the screen resources
        /// </summary>
        public override void LoadContent()
        {
            font = Load<SpriteFont>(@"Fonts\MenuFont");

            // Create a new instance of the gameplay screen

            gameplayScreen = new GameplayScreen(DifficultyMode.Easy);
            gameplayScreen.ScreenManager = ScreenManager;
        }
Пример #4
0
 /// <summary>
 /// Load screen resources
 /// </summary>
 public override void LoadContent()
 {
     if (difficultyMode.HasValue)
     {
         gameplayScreen = new GameplayScreen(difficultyMode.Value);
         gameplayScreen.ScreenManager = ScreenManager;
     }
     font36px = ScreenManager.Game.Content.Load<SpriteFont>("Fonts/GameScreenFont36px");
     font16px = ScreenManager.Game.Content.Load<SpriteFont>("Fonts/GameScreenFont16px");
     textSize = font36px.MeasureString(text);
 }
Пример #5
0
 /// <summary>
 /// Creates a new bee instance.
 /// </summary>
 /// <param name="game">
 /// The game object.
 /// </param>
 /// <param name="gamePlayScreen">
 /// The gameplay screen.
 /// </param>
 public BombBase(Game game, GameplayScreen gamePlayScreen)
     : base(game, gamePlayScreen)
 {
     DrawOrder = Int32.MaxValue - 20;
 }
Пример #6
0
 public Bomb(Game game, GameplayScreen gamePlayScreen, Vector2 position)
     : base(game, gamePlayScreen)
 {
     this.Position = position;
     DrawOrder = (int)position.Y;
 }
Пример #7
0
 /// <summary>
 /// Creates a new beekeeper instance.
 /// </summary>
 /// <param name="game">The game object.</param>
 /// <param name="gamePlayScreen">The gameplay screen.</param>
 public Bomberman(Game game, GameplayScreen gamePlayScreen, Vector2 position)
     : base(game, gamePlayScreen)
 {
     this.Position = position;
 }