I have a class that loads the drawing code for a bunch of graphics. It goes something sort of like this:
if (type == RabbitGraphic)
{
//a whole bunch of drawing code gets loaded into an object
}
else if (type == FrogGraphic)...
This file is getting quite long with the more graphics I've added to it and the compilation / loading the file are taking a while. I'm wondering, is there a way I can split these graphics into separate files without having to create a new object? IE is there some mechanism I can do like:
if (type == RabbitGraphic)
{
load file that has rabbit graphic code
}