示例#1
0
        public Navigation(Map map, int targetX, int targetY)
        {
            _map = map;
            _targetX = targetX;
            _targetY = targetY;
            Console.WriteLine("Target x,y = " + targetX + ", " + targetY);

            if(!Rebuild(null))
                throw new InvalidOperationException("Could not build path grid for the map.");
        }
示例#2
0
        public Background(Renderer r, Map m)
        {
            _r = r;
            _hscroll = 0.0f;
            _vscroll = 0.0f;
            _width = m.Width;
            _height = m.Height;

            _blocks = m.Blocks;
            _tilemapNames = m.TilemapNames;

            _material = r.GetMaterial("default");
        }