About Animation System
Posted: Wed Mar 16, 2011 07:51
Requirement: A point moves from Place.1 to Place.2 with uniform speed.
case 1:
duration of time is 1s
case 2:
duration of time is 5s
case 3:
duraiton of time is 10s
case 4:
....
....
If there are 1,000 situations,we need 1,000 configurations.Kind of unacceptable
So,is there any convenient way to do this?
-------------------------------------------------------
I think it looks like:
(If we have "anim" configuration for the case:duration of time is 1s)
CEGUI::AnimationInstance* instance = CEGUI::AnimationManager::getSingleton().instantiateAnimation(anim);
instance->setSpeedFactor(1);
instance->setSpeedFactor(5);
instance->setSpeedFactor(10)
..
case 1:
duration of time is 1s
case 2:
duration of time is 5s
case 3:
duraiton of time is 10s
case 4:
....
....
If there are 1,000 situations,we need 1,000 configurations.Kind of unacceptable
So,is there any convenient way to do this?
-------------------------------------------------------
I think it looks like:
(If we have "anim" configuration for the case:duration of time is 1s)
CEGUI::AnimationInstance* instance = CEGUI::AnimationManager::getSingleton().instantiateAnimation(anim);
instance->setSpeedFactor(1);
instance->setSpeedFactor(5);
instance->setSpeedFactor(10)
..