AnimationEvent.h 717 B

12345678910111213141516171819202122232425262728293031
  1. // Copyright (C) 2009-2021, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #include <AnKi/Scene/Events/Event.h>
  6. #include <AnKi/Resource/AnimationResource.h>
  7. namespace anki
  8. {
  9. /// @addtogroup scene
  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(const AnimationResourcePtr& anim, SceneNode* movableSceneNode);
  17. /// Implements Event::update
  18. ANKI_USE_RESULT Error update(Second prevUpdateTime, Second crntTime) override;
  19. private:
  20. AnimationResourcePtr m_anim;
  21. };
  22. /// @}
  23. } // end namespace anki