public TilePaletteAnimation(TilePaletteAnimationManager manager, PaletteItem animatedPaletteData)
        {
            Manager = manager;
            AnimatedPaletteData = animatedPaletteData;
            Frames = new List<TilePaletteAnimationFrame>();

        }
        public void CacheTiles()
        {

            Console.Time("tileCache");
            TilePaletteAnimationManager = new TilePaletteAnimationManager(this);
            TileAnimationManager = new TileAnimationManager(this);
            foreach (var chunk in SonicLevel.TileChunks)
            {
                chunk.InitCache();
                chunk.WarmCache();
            }
            Console.TimeEnd("tileCache");


            if (SonicToon != null)
            {
                Console.Time("collisionCache");
                foreach (var chunk in SonicLevel.TileChunks)
                {
                    SonicToon.SensorManager.BuildChunk(chunk, false);
                    SonicToon.SensorManager.BuildChunk(chunk, true);
                }
                Console.TimeEnd("collisionCache");
            }


            if (false)
            {
                debugDraw();
            }
        }