diff --git a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp index 5fff2b7..b2c29ff 100644 --- a/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp +++ b/Source/the_twilight_abyss/TurnBasedCombatV2/TurnBaseCombatV2.cpp @@ -42,17 +42,16 @@ void ATurnBaseCombatV2::StartCombat(AActor* Enemy) IronResource = 10; SulfurResource = 10; - if (APlayerController* PC = Cast(GetWorld()->GetFirstPlayerController())) - { - PC->bShowMouseCursor = true; - PC->bEnableClickEvents = true; - PC->bEnableMouseOverEvents = true; - } //Disable Character Movement if (ACharacter* PlayerCharacter = Cast(GetWorld()->GetFirstPlayerController()->GetPawn())) { PlayerCharacter->DisableInput(GetWorld()->GetFirstPlayerController()); } + //Set to UI Mode Only + APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetInputMode(FInputModeUIOnly()); + PlayerController->bShowMouseCursor = true; + CurrentComboString = ""; UpdateComboString(CurrentComboString); RevertActionPoints(); @@ -73,17 +72,10 @@ void ATurnBaseCombatV2::EndCombat() { PlayerCharacter->EnableInput(GetWorld()->GetFirstPlayerController()); } - if (APlayerController* PC = Cast(GetWorld()->GetFirstPlayerController())) - { - PC->bShowMouseCursor = false; - PC->bEnableClickEvents = false; - PC->bEnableMouseOverEvents = false; - } - GetWorld()->GetFirstPlayerController()->SetIgnoreLookInput(false); - GetWorld()->GetFirstPlayerController()->SetIgnoreMoveInput(false); - GetWorld()->GetFirstPlayerController()->bShowMouseCursor = false; - GetWorld()->GetFirstPlayerController()->bEnableClickEvents = false; - GetWorld()->GetFirstPlayerController()->bEnableMouseOverEvents = false; + //Set to Game Mode Only + APlayerController* PlayerController = GetWorld()->GetFirstPlayerController(); + PlayerController->SetInputMode(FInputModeGameOnly()); + PlayerController->bShowMouseCursor = false; } void ATurnBaseCombatV2::FKeyPressed()