AnimationEvent.h 669 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Scene/Events/Event.h>
  7. #include <AnKi/Resource/AnimationResource.h>
  8. namespace anki {
  9. /// @addtogroup scene
  10. /// @{
  11. /// Event controled by animation resource.
  12. class AnimationEvent : public Event
  13. {
  14. public:
  15. AnimationEvent(CString animationFilename, CString channel, SceneNode* movableSceneNode);
  16. void update(Second prevUpdateTime, Second crntTime) override;
  17. private:
  18. AnimationResourcePtr m_anim;
  19. U32 m_channelIndex = 0;
  20. };
  21. /// @}
  22. } // end namespace anki