/// <summary>
 /// Creates a grid space that considers itself at position (posX, posY) in the parent grid.
 /// </summary>
 /// <param name="spaceTypeSelector">Chooses the texture for this space. Does not affect the properties of it otherwise.</param>
 /// <param name="posX">Horizontal position in the grid</param>
 /// <param name="posY">Vertical position in the grid</param>
 /// <param name="elevation"></param>
 /// <param name="Parent"></param>
 public SimpleGridSpace(int spaceTypeSelector, int posX, int posY, int elevation, SimpleGrid Parent)
 {
     holder       = EnvironmentTextureHolder.Holder;
     currentActor = null;
     isOccupied   = false;
     moveCost     = 1;
     parent       = Parent;
     gridPos      = new Vector2(posX, posY);
     spaceSprite  = holder.MainHexagonSprites[spaceTypeSelector].copySprite();
     spaceType    = spaceTypeSelector;
     walls        = new Wall[3];
     for (int i = 0; i < 3; ++i)
     {
         walls[i] = new Wall();
     }
     this.elevation = elevation;
 }
 /// <summary>
 /// Creates a grid space that considers itself at position (posX, posY) in the parent grid.
 /// </summary>
 /// <param name="spaceTypeSelector">Chooses the texture for this space. Does not affect the properties of it otherwise.</param>
 /// <param name="posX">Horizontal position in the grid</param>
 /// <param name="posY">Vertical position in the grid</param>
 /// <param name="elevation"></param>
 /// <param name="Parent"></param>
 public SimpleGridSpace(int spaceTypeSelector, int posX, int posY, int elevation, SimpleGrid Parent)
 {
     holder = EnvironmentTextureHolder.Holder;
     currentActor = null;
     isOccupied = false;
     moveCost = 1;
     parent = Parent;
     gridPos = new Vector2(posX, posY);
     spaceSprite = holder.MainHexagonSprites[spaceTypeSelector].copySprite();
     spaceType = spaceTypeSelector;
     walls = new Wall[3];
     for (int i = 0; i < 3; ++i)
     {
         walls[i] = new Wall();
     }
     this.elevation = elevation;
 }
示例#3
0
 public Level(int SizeX, int SizeY, String name)
 {
     simpleLevelGrid = new SimpleGrid(SizeX, SizeY);
     for (int x = 0; x < SizeX; ++x)
     {
         for (int y = 0; y < SizeY; ++y)
         {
             simpleLevelGrid.GridSpaces[x, y] = new SimpleGridSpace(0, x, y, 0, simpleLevelGrid);
         }
     }
     enemies = new List<Person>();
     playerTeam = new List<Hero>();
     LevelName = name;
 }