AnimatedSprite2D.pkg 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. $#include "AnimatedSprite2D.h"
  2. enum LoopMode2D
  3. {
  4. LM_DEFAULT = 0,
  5. LM_FORCE_LOOPED,
  6. LM_FORCE_CLAMPED
  7. };
  8. class AnimatedSprite2D : Drawable
  9. {
  10. void SetLayer(int layer);
  11. void SetOrderInLayer(int orderInLayer);
  12. void SetBlendMode(BlendMode mode);
  13. void SetFlip(bool flipX, bool flipY);
  14. void SetFlipX(bool flipX);
  15. void SetFlipY(bool flipY);
  16. void SetColor(const Color& color);
  17. void SetSpeed(float speed);
  18. void SetAnimation(AnimationSet2D* animationSet, const String name, LoopMode2D loopMode = LM_DEFAULT);
  19. void SetAnimation(const String name, LoopMode2D loopMode = LM_DEFAULT);
  20. void SetAnimationSet(AnimationSet2D* animationSet);
  21. void SetLoopMode(LoopMode2D loopMode);
  22. int GetLayer() const;
  23. int GetOrderInLayer() const;
  24. BlendMode GetBlendMode() const;
  25. bool GetFlipX() const;
  26. bool GetFlipY() const;
  27. const Color& GetColor() const;
  28. float GetSpeed() const;
  29. const String GetAnimation() const;
  30. AnimationSet2D* GetAnimationSet() const;
  31. LoopMode2D GetLoopMode() const;
  32. tolua_property__get_set int layer;
  33. tolua_property__get_set int orderInLayer;
  34. tolua_property__get_set BlendMode blendMode;
  35. tolua_property__get_set bool flipX;
  36. tolua_property__get_set bool flipY;
  37. tolua_property__get_set Color& color;
  38. tolua_property__get_set float speed;
  39. tolua_property__get_set String animation;
  40. tolua_property__get_set AnimationSet2D* animationSet;
  41. tolua_property__get_set LoopMode2D loopMode;
  42. };