2
0

AnimationEvent.h 717 B

123456789101112131415161718192021222324252627282930
  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. /// @addtogroup scene
  9. /// @{
  10. /// Event controled by animation resource.
  11. class AnimationEvent : public Event
  12. {
  13. public:
  14. AnimationEvent(EventManager* manager);
  15. ANKI_USE_RESULT Error init(const AnimationResourcePtr& anim, SceneNode* movableSceneNode);
  16. /// Implements Event::update
  17. ANKI_USE_RESULT Error update(Second prevUpdateTime, Second crntTime) override;
  18. private:
  19. AnimationResourcePtr m_anim;
  20. };
  21. /// @}
  22. } // end namespace anki