Esempio n. 1
0
 /// <summary>
 /// Create cell of grid
 /// </summary>
 /// <param name="left">Left bound</param>
 /// <param name="top">Top bound</param>
 /// <param name="width">Width</param>
 /// <param name="height">Height</param>
 /// <param name="index">Location of cell in grid</param>
 public Cell(Griding grid, int left, int top, int width, int height, Vector2 index)
 {
     this.Components = new List<IGridable>();
     this.Grid = grid;
     this.Range = new Rectangle(left, top, width, height);
     this.Index = index;
 }
Esempio n. 2
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            SpriteBank.SetGame(this);
            GSound.SetGame(this);
            this.SetAnimationData();

            grid = new Griding.Griding(this, this.GraphicsDevice.Viewport.Bounds, 5, 9);
            ZMan = new Zombies.Managers.ZombiesManager(this.grid);

            base.Initialize();
        }