c# - Data structure for simple animations in games -


i'm trying create system in numbers changed according time elapsed since last update, target/destination value, etc.

in earlier project, created abstract class animation data contained tick(), isdone(), etc, implemented each facet of game object wanted animate, such position , opacity. animation data held game object, tick() function being called game object's tick() function, called engine's logic update loop using list of game objects.

however, have more things want animate, , looking in doing few classes possible, , not n+1 classes.

i looked in saving references variable being animated, using fact variables wanted animate floats. however, appears c# pointers analogs c pointers, , cannot save pointers values being animated, appears impossible clr in first place.

the alternative think of use reflection record argument being passed, use reflection again find value alter each tick. using dozens of reflection calls 60 times second did not appeal me.

since animating objects near universal feature in games, wondering if there established practices.


Comments

Popular posts from this blog

IF statement in MySQL trigger -

c++ - What does MSC in "// appease MSC" comments mean? -

javascript - Blogger related post gadget image Resize s72-c [ Need Expert Help ] -