| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- $#include "AnimationController.h"
- struct AnimationControl
- {
- AnimationControl();
- ~AnimationControl();
- StringHash hash_;
- float speed_;
- float targetWeight_;
- float fadeTime_;
- float autoFadeTime_;
- float setTimeTtl_;
- float setWeightTtl_;
- unsigned short setTime_;
- unsigned char setWeight_;
- unsigned char setTimeRev_;
- unsigned char setWeightRev_;
- };
- class AnimationController : public Component
- {
- bool Play(const String name, unsigned char layer, bool looped, float fadeInTime = 0.0f);
- bool PlayExclusive(const String name, unsigned char layer, bool looped, float fadeTime = 0.0f);
- bool Stop(const String name, float fadeOutTime = 0.0f);
- void StopLayer(unsigned char layer, float fadeOutTime = 0.0f);
- void StopAll(float fadeTime = 0.0f);
-
- bool Fade(const String name, float targetWeight, float fadeTime);
- bool FadeOthers(const String name, float targetWeight, float fadeTime);
- bool SetLayer(const String name, unsigned char layer);
- bool SetStartBone(const String name, const String startBoneName);
- bool SetTime(const String name, float time);
- bool SetWeight(const String name, float weight);
- bool SetLooped(const String name, bool enable);
- bool SetSpeed(const String name, float speed);
- bool SetAutoFade(const String name, float fadeOutTime);
- bool IsPlaying(const String name) const;
- bool IsFadingIn(const String name) const;
- bool IsFadingOut(const String name) const;
- unsigned char GetLayer(const String name) const;
- Bone* GetStartBone(const String name) const;
- const String GetStartBoneName(const String name) const;
- float GetTime(const String name) const;
- float GetWeight(const String name) const;
- bool IsLooped(const String name) const;
- float GetLength(const String name) const;
- float GetSpeed(const String name) const;
- float GetFadeTarget(const String name) const;
- float GetFadeTime(const String name) const;
- float GetAutoFade(const String name) const;
-
- AnimationState* GetAnimationState(const String name) const;
- AnimationState* GetAnimationState(StringHash nameHash) const;
- };
|