AnimationEvent.h 681 B

1234567891011121314151617181920212223242526272829303132
  1. // Copyright (C) 2009-2016, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <anki/event/Event.h>
  6. #include <anki/resource/Animation.h>
  7. namespace anki
  8. {
  9. /// @addtogroup event
  10. /// @{
  11. /// Event controled by animation resource
  12. class AnimationEvent : public Event
  13. {
  14. public:
  15. AnimationEvent(EventManager* manager);
  16. ANKI_USE_RESULT Error init(
  17. const AnimationResourcePtr& anim, SceneNode* movableSceneNode);
  18. /// Implements Event::update
  19. ANKI_USE_RESULT Error update(F32 prevUpdateTime, F32 crntTime) override;
  20. private:
  21. AnimationResourcePtr m_anim;
  22. };
  23. /// @}
  24. } // end namespace anki