AnimGraphEventHandlerCounter.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #pragma once
  9. #include <EMotionFX/Source/EventHandler.h>
  10. namespace EMotionFX
  11. {
  12. class AnimGraphEventHandlerCounter
  13. : public AnimGraphInstanceEventHandler
  14. {
  15. public:
  16. AZ_CLASS_ALLOCATOR_DECL
  17. virtual ~AnimGraphEventHandlerCounter() = default;
  18. const AZStd::vector<EventTypes> GetHandledEventTypes() const override;
  19. void OnStateEntering(AnimGraphInstance* animGraphInstance, AnimGraphNode* state) override;
  20. void OnStateEnter(AnimGraphInstance* animGraphInstance, AnimGraphNode* state) override;
  21. void OnStateExit(AnimGraphInstance* animGraphInstance, AnimGraphNode* state) override;
  22. void OnStateEnd(AnimGraphInstance* animGraphInstance, AnimGraphNode* state) override;
  23. void OnStartTransition(AnimGraphInstance* animGraphInstance, AnimGraphStateTransition* transition) override;
  24. void OnEndTransition(AnimGraphInstance* animGraphInstance, AnimGraphStateTransition* transition) override;
  25. int m_numStatesEntering = 0;
  26. int m_numStatesEntered = 0;
  27. int m_numStatesExited = 0;
  28. int m_numStatesEnded = 0;
  29. int m_numTransitionsStarted = 0;
  30. int m_numTransitionsEnded = 0;
  31. };
  32. }