Animatable.pkg 1.1 KB

1234567891011121314151617181920212223242526
  1. $#include "Scene/Animatable.h"
  2. enum WrapMode{};
  3. class Animatable : Serializable
  4. {
  5. void SetAnimationEnabled(bool enable);
  6. void SetAnimationTime(float time);
  7. void SetObjectAnimation(ObjectAnimation* objectAnimation);
  8. void SetAttributeAnimation(const String name, ValueAnimation* attributeAnimation, WrapMode wrapMode = WM_LOOP, float speed = 1.0f);
  9. void SetAttributeAnimationWrapMode(const String name, WrapMode wrapMode);
  10. void SetAttributeAnimationSpeed(const String name, float speed);
  11. void SetAttributeAnimationTime(const String& name, float time);
  12. void RemoveObjectAnimation();
  13. void RemoveAttributeAnimation(const String name);
  14. bool GetAnimationEnabled() const;
  15. ObjectAnimation* GetObjectAnimation() const;
  16. ValueAnimation* GetAttributeAnimation(const String name) const;
  17. WrapMode GetAttributeAnimationWrapMode(const String name) const;
  18. float GetAttributeAnimationSpeed(const String name) const;
  19. float GetAttributeAnimationTime(const String name) const;
  20. tolua_property__get_set bool animationEnabled;
  21. tolua_property__get_set ObjectAnimation* objectAnimation;
  22. };