and sorry for the weird title.
There is my class hierarchy :
TimedObject
SpeedModifer
ImediateSpeedModifier
LinearSeedModifier
- .. More classes ..
- .. More classes ..
In the files, all TimedObject's instances are in the same array (so, a List<TimedObject>
). I want, after the data are loaded, I want to move every SpeedModifier or child class to another array for performance issue. I already know the Enumerable.OfType<T>()
function, but is this function works in my case ? So, will it work for ImediateSpeedModifier
, and other SpeedModifier
?
If not, what do I need to do for my case ?
Thanks you for yours answers !