Exemple #1
0
        public GameWorld(int width, int height)
        {
            Width = width;
            Height = height;
            TileMap = new TileMap(Width, Height);

            _gameObjects = new List<GameObject>();
            _quadTree = new QuadTree<GameObject>(new Rectangle(0,0, Width * 64, Height * 64));
            _quadTree.MaxGeneration = 4;
            _addNewObjectsQueue = new Queue<GameObject>();
            _deleteObjectsQueue = new Queue<GameObject>();

            Camera = new Camera(Game.g_screenSize, new Point(Game.g_screenSize.Width / 2, Game.g_screenSize.Height / 2), true);
            Camera.ScaleTo(1f);
            Camera.MoveSpeed = 7;

            background = new ParallaxBackground(this);
            BloodSystem = new BloodSystem(this);
            BloodSystem.Init();
            BloodSystem.BlendWith(back);

            mback = new MagicBackground();

            UpdateObjectsEnqueues();
        }
Exemple #2
0
 public AStar(TileMap tileMap, Creature creature = null)
 {
     _tileMap = tileMap;
     this.Creature = creature;
 }