Example #1
0
 public MainGame()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     cols = new CollideableManager();
     input = new Input();
 }
Example #2
0
 public MainGame(Game g, SpriteBatch sB, GraphicsDeviceManager graph)
 {
     game = g;
     spriteBatch = sB;
     graphics = graph;
     cols = new CollideableManager();
 }
Example #3
0
 public void SetMap(string[] data, CollideableManager cols)
 {
     for (int i = 0; i < grid.Length; i++)
     {
         for (int j = 0; j < grid[i].Length; j++)
         {
             AssignMap(j,i, data[i][j]);
             if (grid[i][j] is Player)
             {
                 cols.Add(grid[i][j], true);
                 grid[i][j] = null;
             }
             else if (grid[i][j] != null)
             {
                 cols.Add(grid[i][j], false);
             }
         }
     }
     TileMap();
 }