Ejemplo n.º 1
0
 public void UpdateCamera(Camera camera)
 {
     if (lastCamera != NormaliseRect(camera.Bounds) || this.ReqestDrawMapUpdate)
     {
         lastTiles  = areamap.Get(camera.Bounds);
         lastCamera = camera.Bounds;
         this.ReqestDrawMapUpdate = false;
     }
 }
Ejemplo n.º 2
0
        public override void Update(GameTime gameTime)
        {
            foreach (var block in sections.Get(lastCamera))
            {
                if (!block.Loaded)
                {
                    LoadBlock(block.ToString());
                    block.Loaded = true;
                }
            }

            base.Update(gameTime);
        }