InputHandlerNodeable.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. // script canvas
  10. #include <ScriptCanvas/Core/Nodeable.h>
  11. #include <ScriptCanvas/Core/NodeableNode.h>
  12. #include <ScriptCanvas/CodeGen/NodeableCodegen.h>
  13. #include <StartingPointInput/InputEventNotificationBus.h>
  14. #include <Source/InputHandlerNodeable.generated.h>
  15. namespace StartingPointInput
  16. {
  17. //////////////////////////////////////////////////////////////////////////
  18. /// Input handles raw input from any source and outputs Pressed, Held, and Released input events
  19. class InputHandlerNodeable
  20. : public ScriptCanvas::Nodeable
  21. , protected InputEventNotificationBus::Handler
  22. {
  23. SCRIPTCANVAS_NODE(InputHandlerNodeable)
  24. public:
  25. AZ_CLASS_ALLOCATOR(InputHandlerNodeable, AZ::SystemAllocator);
  26. ~InputHandlerNodeable() override;
  27. protected:
  28. void OnDeactivate() override;
  29. //////////////////////////////////////////////////////////////////////////
  30. /// InputEventNotificationBus::Handler
  31. void OnPressed(float value) override;
  32. void OnHeld(float value) override;
  33. void OnReleased(float value) override;
  34. };
  35. }