public void DrawLevel() { d = new Dungeon (); var p = new Map (d, rng, levels[level]); p.buildMap (); d.RenderAll (); GameObject.FindGameObjectWithTag ("Player").transform.position = d.Scaled(new Vector3(2f, 20f, 2f)); }
public override void drawRoom(LevelGen.Dungeon d_in, LevelGen.Brush b_in, Map m_in) { base.drawRoom (d_in, b_in, m_in); for ( int i = -1; i > -8; i-- ) { for ( int x = 2; x <= 4; x++ ) for ( int y = 0; y <= 2; y++ ) d_in.Place (new LevelGen.Position(ActualLocation.x+x+1,i,ActualLocation.y+y+1),b_in); for ( int x = 12; x <= 14; x++ ) for ( int y = 2; y <= 4; y++ ) d_in.Place (new LevelGen.Position(ActualLocation.x+x+1,i,ActualLocation.y+y+1),b_in); for ( int x = 10; x <= 12; x++ ) for ( int y = 12; y <= 14; y++ ) d_in.Place (new LevelGen.Position(ActualLocation.x+x+1,i,ActualLocation.y+y+1),b_in); for ( int x = 0; x <= 2; x++ ) for ( int y = 10; y <= 12; y++ ) d_in.Place (new LevelGen.Position(ActualLocation.x+x+1,i,ActualLocation.y+y+1),b_in); } d_in.Place(new LevelGen.Position(ActualLocation.x+4,-6,ActualLocation.y+2), endBrush); d_in.Place(new LevelGen.Position(ActualLocation.x+14,-6,ActualLocation.y+4), endBrush); d_in.Place(new LevelGen.Position(ActualLocation.x+12,-6,ActualLocation.y+14), endBrush); d_in.Place(new LevelGen.Position(ActualLocation.x+2,-6,ActualLocation.y+12), endBrush); }