Jewel.h 782 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #pragma once
  2. #include "oxygine-framework.h"
  3. using namespace oxygine;
  4. DECLARE_SMART(Jewel, spJewel);
  5. extern const Vector2 JewelSize;
  6. class Jewel: public Object
  7. {
  8. public:
  9. Jewel();
  10. spActor getView() const;
  11. int getType() const;
  12. bool isExploding() const {return _exploding;}
  13. bool isSwaping() const {return _swaping;}
  14. bool isDead() const {return _dead;}
  15. bool isFalling() const {return _falling;}
  16. void explode();
  17. void select();
  18. void unselect();
  19. void fall(const Vector2& pos);
  20. spTween swap(const Vector2& pos);
  21. private:
  22. void exploded(Event*);
  23. void fallen(Event*);
  24. void swapped(Event*);
  25. bool _exploding;
  26. bool _swaping;
  27. bool _dead;
  28. bool _falling;
  29. spSprite _view;
  30. int _type;
  31. };