metulburr/Plants-VS-Zombies — pull request #15 by Mekire (2013-07-18 01:54:29+00:00)
Title: Reduced calls to pygame.time.get_ticks(); sun rotations are cached.

pygame.time.get_ticks is called in the Control class now every frame and passes the time to states rather than letting every state call it on a need by need basis. It will occasionally be necessary to call it directly in your states but only in very narrow cases. This push makes minor changes to all modules reflecting this change.

I also added surface caching for my sun sprites as rotozoom gets very expensive. previously after about 15 sun sprites the frame rate would start dropping. Now it should be able to go over 100 with no issues.

-Mek