diff --git a/content/setting/animation.yaml b/content/setting/animation.yaml index b4b3899..fb94869 100644 --- a/content/setting/animation.yaml +++ b/content/setting/animation.yaml @@ -117,6 +117,9 @@ Transitions: StartLeftClicTransition: from: jump to: grab + StartLeftClicTransition: + from: air + to: grab StartLeftClicTransition: from: sleep to: grab diff --git a/include/Game/AnimationTransitions.hpp b/include/Game/AnimationTransitions.hpp index 5a2ff20..0ef67c3 100644 --- a/include/Game/AnimationTransitions.hpp +++ b/include/Game/AnimationTransitions.hpp @@ -87,6 +87,11 @@ struct EndLeftClicTransition : public StateMachine::Node::Transition bool leftWasPressed = false; public: + void onEnter(GameData& blackBoard) final + { + leftWasPressed = blackBoard.leftButtonEvent == GLFW_PRESS; + }; + bool canTransition(GameData& blackBoard) final { if (blackBoard.leftButtonEvent == GLFW_PRESS)