Fix mouse input handling
This commit is contained in:
parent
4c98117a4c
commit
77b55963fa
BIN
Content/Blueprints/BP_CustomGameInstance.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/BP_CustomGameInstance.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/BP_PlayerController.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Blueprints/BP_PlayerController.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Blueprints/GameModes/BP_MainGameMode.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/GameModes/BP_MainGameMode.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Minigames/Fishing/BP_Minigame_FishingManager.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Minigames/Fishing/BP_Minigame_FishingManager.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Blueprints/Minigames/Fishing/UI_Minigame_Fishing.uasset
(Stored with Git LFS)
BIN
Content/Blueprints/Minigames/Fishing/UI_Minigame_Fishing.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Actions/IA_CutsceneSkip.uasset
(Stored with Git LFS)
BIN
Content/Input/Actions/IA_CutsceneSkip.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Actions/IA_DialogueSkip.uasset
(Stored with Git LFS)
BIN
Content/Input/Actions/IA_DialogueSkip.uasset
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Input/Actions/IA_OpenMenu.uasset
(Stored with Git LFS)
BIN
Content/Input/Actions/IA_OpenMenu.uasset
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Input/Interactables/Actions/IA_InteractableMoveActivateL.uasset
(Stored with Git LFS)
BIN
Content/Input/Interactables/Actions/IA_InteractableMoveActivateL.uasset
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_CrossyRoad_Left.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_CrossyRoad_Left.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_CrossyRoad_Right.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_CrossyRoad_Right.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_CrossyRoad_Up.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_CrossyRoad_Up.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_Fishing.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_Fishing.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Down.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Down.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Left.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Left.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Right.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Right.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Up.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/Actions/IA_Minigame_SubwaySurf_Up.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Input/Minigame/IMC_Minigame_Fishing.uasset
(Stored with Git LFS)
BIN
Content/Input/Minigame/IMC_Minigame_Fishing.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Levels/Level_4/L_Level4.umap
(Stored with Git LFS)
BIN
Content/Levels/Level_4/L_Level4.umap
(Stored with Git LFS)
Binary file not shown.
@ -156,6 +156,9 @@ void UCutsceneManager::OnSequenceEnd()
|
||||
|
||||
_lastPlayer = nullptr;
|
||||
}
|
||||
|
||||
_lastlySkipped = false;
|
||||
_holding = false;
|
||||
}
|
||||
|
||||
void UCutsceneManager::OnInputHold()
|
||||
|
@ -3,6 +3,9 @@
|
||||
|
||||
#include "FishingManager.h"
|
||||
|
||||
#include "EnhancedInputComponent.h"
|
||||
#include "InputMappingContext.h"
|
||||
|
||||
#include "MainGameModeBase.h"
|
||||
#include "PlayerBase.h"
|
||||
|
||||
@ -20,10 +23,17 @@ void AFishingManager::Start(APlayerBase* playerPawn, FMinigameEndCallback delega
|
||||
AMinigame::Start(playerPawn, delegate);
|
||||
|
||||
player->LockPlayer(FPlayerLock::All());
|
||||
|
||||
auto& mapping = input.LoadSynchronous()->GetMapping(0);
|
||||
handler1 = player->inputComponent->BindAction(mapping.Action, ETriggerEvent::Started, this, &AFishingManager::OnInputHold).GetHandle();
|
||||
handler2 = player->inputComponent->BindAction(mapping.Action, ETriggerEvent::Completed, this, &AFishingManager::OnInputUnhold).GetHandle();
|
||||
}
|
||||
|
||||
void AFishingManager::End()
|
||||
{
|
||||
player->inputComponent->RemoveBindingByHandle(handler1);
|
||||
player->inputComponent->RemoveBindingByHandle(handler2);
|
||||
|
||||
player->UnlockPlayer(FPlayerLock::All());
|
||||
|
||||
AMinigame::End();
|
||||
|
@ -43,4 +43,12 @@ public:
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
||||
void CatchFailed();
|
||||
|
||||
protected:
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void OnInputHold();
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void OnInputUnhold();
|
||||
|
||||
int32 handler1, handler2;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user