Exemplo n.º 1
0
 public GridTexture(Game game, Camera camera, int cellSize)
     : base(game)
 {
     this.game = game;
     cell = cellSize;
     this.camera = camera;
 }
Exemplo n.º 2
0
        public Level(TowerDefense game, int cellSize, int rows, int columns, Point end, List<Wave> waves, int id)
            : base(game)
        {
            this.cellSize = cellSize;
            this.end = end;
            this.Id = id;
            InitializeMap(rows, columns);
            Lost = false;
            Won = false;
            this.game = game;
            componentList = new List<GameComponent>();

            towerManager = new TowerManager(game);
            enemyManager = new EnemyManager(game);
            projectileManager = new ProjectileManager(game);
            spawner = new Spawner(game, enemyManager.enemies, waves);
            camera = new Camera(game, Vector2.Zero, columns*cellSize, rows*cellSize);
            Paused = false;

            pathfinding = Pathfinding.createPath(IntObjectMap, new Point(0, 0), End);
        }