public ModelBuilder(Game game, SpriteBatch spriteBatch, AdventureManager av, int ray = 10, Double propagationCoeff = 0.9999f, Double outryCoeff = 0.1f) { AV = av; Ray = ray; Size = 2 * ray + 1; Rooms = new Room[Size, Size]; Randomizer = new Random(); Game = game; SpriteBatch = spriteBatch; Entry = new Room(Game, SpriteBatch, RoomType.Entry, Vector2.Zero, AV); Rooms[Ray, Ray] = Entry; List <Vector2> neighbourPosition = new List <Vector2>() { new Vector2(0, 1), new Vector2(1, 0), new Vector2(0, -1), new Vector2(-1, 0) }; foreach (Vector2 neighbour in neighbourPosition) { Build(Rooms[Ray, Ray], neighbour, propagationCoeff, outryCoeff); } }
public Room(Game game, SpriteBatch spriteBatch, RoomType type, Vector2 position, AdventureManager av) : base(game) { AV = av; SpriteBatch = spriteBatch; RoomType = type; Position = position; Mobs = new List <MobEntity>(); DoorRoom = new Dictionary <Room, Door>(); RoomDone = false; LoadContent(); BuildRoom(); TextureMap = new Texture2D(GraphicsDevice, 16, 16); UnsetCurrentRoom(); }
public Map(Game game, SpriteBatch spriteBatch, AdventureManager av) : base(game) { ModelBuilder = new ModelBuilder(game, spriteBatch, av); SpriteBatch = spriteBatch; }