CVarNode.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. #ifndef CRYINCLUDE_CRYMOVIE_CVARNODE_H
  9. #define CRYINCLUDE_CRYMOVIE_CVARNODE_H
  10. #pragma once
  11. #include "AnimNode.h"
  12. class CAnimCVarNode
  13. : public CAnimNode
  14. {
  15. public:
  16. AZ_CLASS_ALLOCATOR(CAnimCVarNode, AZ::SystemAllocator);
  17. AZ_RTTI(CAnimCVarNode, "{9059B454-EE73-4865-9B76-8C8430E3BB82}", CAnimNode);
  18. CAnimCVarNode(const int id);
  19. CAnimCVarNode();
  20. //////////////////////////////////////////////////////////////////////////
  21. // Overrides from CAnimNode
  22. //////////////////////////////////////////////////////////////////////////
  23. void SetName(const char* name) override;
  24. void Animate(SAnimContext& ec) override;
  25. void CreateDefaultTracks() override;
  26. void OnReset() override;
  27. void OnResume() override;
  28. unsigned int GetParamCount() const override;
  29. CAnimParamType GetParamType(unsigned int nIndex) const override;
  30. int GetDefaultKeyTangentFlags() const override;
  31. static void Reflect(AZ::ReflectContext* context);
  32. protected:
  33. bool GetParamInfoFromType(const CAnimParamType& paramId, SParamInfo& info) const override;
  34. private:
  35. float m_value;
  36. };
  37. #endif // CRYINCLUDE_CRYMOVIE_CVARNODE_H