public Adventurer(LevelGenerator levelGenerator, int x, int y) : base(levelGenerator, x, y) { _astar = new AStar(_levelGenerator.TileMap) {DiagonalMovesAllowed = true}; _neededPoints = new byte[_levelGenerator.TileMap.Width, _levelGenerator.TileMap.Height]; DetermineNeededPoints(); _startPoint = new Point(x, y); }
internal override void Init() { _gameWorld = new GameWorld(100, 100); levelGenerator = new LevelGenerator { RoomsMaxWidth = 10, RoomsMaxHeight = 15, RoomCount = 0, Scale = 0.5f, WallSmoothing = 0.5f }; levelGenerator.GenerationFinishedEvent += OnFinishGeneration; levelGenerator.Generate(_gameWorld); Game.g_Keyboard.KeyDown += GKeyboardOnKeyDown; }
public WayChecker(LevelGenerator levelGenerator, int x, int y) : base(levelGenerator, x, y) { _reachedPoints = new byte[levelGenerator.TileMap.Width, levelGenerator.TileMap.Height]; _startCell = new Point(x, y); }
public Miner(LevelGenerator levelGenerator, int x, int y) { _cell.X = x; _cell.Y = y; _levelGenerator = levelGenerator; }