示例#1
0
 public MainGame()
 {
     graphics = new GraphicsDeviceManager(this);
     Content.RootDirectory = "Content";
     cols = new CollideableManager();
     input = new Input();
 }
示例#2
0
 public MainGame(Game g, SpriteBatch sB, GraphicsDeviceManager graph)
 {
     game = g;
     spriteBatch = sB;
     graphics = graph;
     cols = new CollideableManager();
 }
示例#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();
 }