Beispiel #1
0
        public static AbstractCameraTracker CreateTracker(ViewportAdapter viewPort, IFocusAble following, TiledMap map)
        {
            AbstractCameraTracker tracker;

            if (map.Width < 20)
            {
                tracker = new IndoorCameraTracker(viewPort, following);
            }
            else
            {
                tracker = new OutdoorCameraTracker(viewPort, following, map);
            }
            return(tracker);
        }
Beispiel #2
0
        public static AbstractCameraTracker CreateCamera(ViewportAdapter viewPort, IFocusAble following, TiledMap map)
        {
            AbstractCameraTracker camera;
            var width = map.Width;

            if (width < 30)
            {
                camera = new IndoorCameraTracker(viewPort, following);
            }
            else
            {
                camera = new OutdoorCameraTracker(viewPort, following);
            }
            return(camera);
        }