Пример #1
0
        public ChunkedMapEngine(Rectangle ScreenRectangle, ChunkedMap map, MapCamera mapCamera, int threadSleepMilliseconds)
        {
            Map = map;

            MaxChunkIndices = new Vector2((Map.MapRectangle.Width / Map.ChunkSize.X) - 1, (Map.MapRectangle.Height / Map.ChunkSize.Y) - 1);

            ExclusiveContentManager = new ExclusiveContentManager(GameEnvironment.Game.Content.ServiceProvider, GameEnvironment.Game.Content.RootDirectory);

            MapCamera = mapCamera;

            Chunks = new List <int>();

            ChunkIndices = new List <Vector2>();

            ChunkIndicesToDraw = new List <Vector2>();

            ChunkTextures = new Dictionary <int, Texture2D>();

            LastLoadedChunks = new List <int>();

            CentralChunkPosition = new Vector2();

            CentralChunkIndices = new Vector2();

            LastCentralChunkIndices = new Vector2();

            HasUpdated = false;

            ThreadSleepMilliseconds = threadSleepMilliseconds;
        }
Пример #2
0
        public MapCamera(ChunkedMap map)
        {
            Map = map;

            Origin = new Vector2(0, 0);

            PanDirection = Vector2.Zero;

            PanSpeed = 1.0f;

            IsLockedOnMob = false;
        }
 public UnboundedMapEngine(Rectangle ScreenRectangle, ChunkedMap map, MapCamera mapCamera, int threadSleepMilliseconds, bool isRepeatRandom)
     : base(ScreenRectangle, map, mapCamera, threadSleepMilliseconds)
 {
     IsRepeatRandom = isRepeatRandom;
 }