/// <summary> /// Initializes map block with 4 NONEXISTENT entrances and coordinates. /// </summary> /// <param name="x">X coordinate of this block.</param> /// <param name="y">Y coordinate of this block.</param> public MapBlock(int x, int y) { entrances = new Entrance[4]; for (int i = 0; i < entrances.Length; i++) { entrances[i] = new Entrance(); } this.x = x; this.y = y; }
/// <summary> /// Creates OPEN entrance in given direction. /// </summary> /// <param name="direction">Direction in which entrance will be created.</param> public void CreateEntrance(Direction direction) { entrances[(int)direction] = new Entrance(EntranceState.OPEN); }