EventNode.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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 "AnimNode.h"
  10. class CUiAnimEventNode
  11. : public CUiAnimNode
  12. {
  13. public:
  14. AZ_CLASS_ALLOCATOR(CUiAnimEventNode, AZ::SystemAllocator);
  15. AZ_RTTI(CUiAnimEventNode, "{51C82937-293D-4E20-8966-5288D1580615}", CUiAnimNode);
  16. CUiAnimEventNode();
  17. CUiAnimEventNode(const int id);
  18. //////////////////////////////////////////////////////////////////////////
  19. // Overrides from CUiAnimNode
  20. //////////////////////////////////////////////////////////////////////////
  21. virtual void Animate(SUiAnimContext& ec);
  22. virtual void CreateDefaultTracks();
  23. virtual void OnReset();
  24. //////////////////////////////////////////////////////////////////////////
  25. // Supported tracks description.
  26. //////////////////////////////////////////////////////////////////////////
  27. virtual unsigned int GetParamCount() const;
  28. virtual CUiAnimParamType GetParamType(unsigned int nIndex) const;
  29. virtual bool GetParamInfoFromType(const CUiAnimParamType& paramId, SParamInfo& info) const;
  30. static void Reflect(AZ::SerializeContext* serializeContext);
  31. private:
  32. void SetScriptValue();
  33. private:
  34. //! Last animated key in track.
  35. int m_lastEventKey;
  36. };