示例#1
0
 /// <summary>
 /// Constructor for Class Sea.
 /// </summary>
 /// <param name="game">The Game class for DrawableGameComponent.</param>
 public Sea(Game game)
     : base(game)
 {
     WidthPerTile = 80;
     HeightPerTile = 80;
     totalNodeX = 6;
     totalNodeY = 6;
     Tile = new Node[totalNodeY][];
     for (int i = 0; i < totalNodeY; i++)
     {
         Tile[i] = new Node[totalNodeX];
         for (int j = 0; j < totalNodeX; j++)
         {
             Tile[i][j] = new Node();
         }
     }
 }
示例#2
0
 /// <summary>
 /// Constructor for Class Sea.
 /// </summary>
 /// <param name="game">The Game class for DrawableGameComponent.</param>
 /// <param name="map">The Sea to be copied.</param>
 public Sea(Game game, Sea map)
     : base(game)
 {
     path = map.path;
     WidthPerTile = map.WidthPerTile;
     HeightPerTile = map.HeightPerTile;
     totalNodeX = map.totalNodeX;
     totalNodeY = map.totalNodeY;
     Tile = new Node[totalNodeY][];
     for (int i = 0; i < totalNodeY; i++)
     {
         Tile[i] = new Node[totalNodeX];
         for (int j = 0; j < totalNodeX; j++)
         {
             Tile[i][j] = new Node(map.getNode(i,j));
         }
     }
 }
示例#3
0
 /// <summary>
 /// Constructor for Class Sea.
 /// </summary>
 /// <param name="game">The Game class for DrawableGameComponent.</param>
 /// <param name="W">The width per tile for the map.</param>
 /// <param name="H">The heigth per tile for the map.</param>
 /// <param name="totalNodeX_">Total absis x for the map.</param>
 /// <param name="totalNodeY_">Total ordinat y for the map.</param>
 /// <param name="Path">The path to load the level.</param>
 public Sea(Game game, int W, int H, int totalNodeX_, int totalNodeY_, String Path)
     : base(game)
 {
     path = Path;
     WidthPerTile = W;
     HeightPerTile = H;
     totalNodeX = totalNodeX_;
     totalNodeY = totalNodeY_;
     Tile = new Node[totalNodeY][];
     for (int i = 0; i < totalNodeY; i++)
     {
         Tile[i] = new Node[totalNodeX];
         for (int j = 0; j < totalNodeX; j++)
         {
             Tile[i][j] = new Node();
         }
     }
 }
示例#4
0
 /// <summary>
 /// Constructor for Node Class.
 /// </summary>
 /// <param name="n">Node to be copied.</param>
 public Node(Node n)
 {
     status = n.status;
     statussebenarnya = n.statussebenarnya;
 }