Changeset View
Changeset View
Standalone View
Standalone View
source/simulation2/components/ICmpVisual.h
Show First 20 Lines • Show All 100 Lines • ▼ Show 20 Lines | public: | ||||
* @param name animation name (e.g. "idle", "walk", "melee"; the names are determined by actor XML files) | * @param name animation name (e.g. "idle", "walk", "melee"; the names are determined by actor XML files) | ||||
* @param once if true then the animation will play once and freeze at the final frame, else it will loop | * @param once if true then the animation will play once and freeze at the final frame, else it will loop | ||||
* @param speed animation speed multiplier (typically 1.0 for the default speed) | * @param speed animation speed multiplier (typically 1.0 for the default speed) | ||||
* @param soundgroup VFS path of sound group .xml, relative to audio/, or empty string for none | * @param soundgroup VFS path of sound group .xml, relative to audio/, or empty string for none | ||||
*/ | */ | ||||
virtual void SelectAnimation(const std::string& name, bool once, fixed speed) = 0; | virtual void SelectAnimation(const std::string& name, bool once, fixed speed) = 0; | ||||
/** | /** | ||||
* Replaces a specified animation with another. Only affects the special speed-based | * Tell the visual actor that the unit is currently moving at the given speed. | ||||
* animation determination behaviour. | * If speed is 0, the unit will become idle. | ||||
* @param name Animation to match. | |||||
* @param replace Animation that should replace the matched animation. | |||||
*/ | */ | ||||
virtual void ReplaceMoveAnimation(const std::string& name, const std::string& replace) = 0; | virtual void SetMovingSpeed(fixed movingSpeed) = 0; | ||||
/** | |||||
* Ensures that the given animation will be used when it normally would be, | |||||
* removing reference to any animation that might replace it. | |||||
* @param name Animation name to remove from the replacement map. | |||||
*/ | |||||
virtual void ResetMoveAnimation(const std::string& name) = 0; | |||||
/** | |||||
* Start playing the walk/run animations, scaled to the unit's movement speed. | |||||
* @param runThreshold movement speed at which to switch to the run animation | |||||
*/ | |||||
virtual void SelectMovementAnimation(fixed runThreshold) = 0; | |||||
/** | /** | ||||
* Adjust the speed of the current animation, so it can match simulation events. | * Adjust the speed of the current animation, so it can match simulation events. | ||||
* @param repeattime time for complete loop of animation, in msec | * @param repeattime time for complete loop of animation, in msec | ||||
*/ | */ | ||||
virtual void SetAnimationSyncRepeat(fixed repeattime) = 0; | virtual void SetAnimationSyncRepeat(fixed repeattime) = 0; | ||||
/** | /** | ||||
▲ Show 20 Lines • Show All 50 Lines • Show Last 20 Lines |
Wildfire Games · Phabricator