Polished Greasy Rick

This commit is contained in:
Rafal Swierczek 2024-05-10 19:35:13 +01:00
parent 2c088ffb02
commit 0c7afe2bb5
16 changed files with 33 additions and 32 deletions

Binary file not shown.

View File

@ -133,7 +133,7 @@ void ABountyHunterCharacter::BeginPlay()
UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0); UGameplayStatics::SaveGameToSlot(GI->MainSaveGameInstanceRef, "MainSave", 0);
} }
InOpenWorld = true; InOpenWorld = true;
SpawnBikeUI(); //SpawnBikeUI();
SpawnSideBounties(GI); SpawnSideBounties(GI);
if (GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave.GetLocation() != FVector(0 ,0 ,0)) if (GI->MainSaveGameInstanceRef->PlayerOpenWorldSpawnTransformSave.GetLocation() != FVector(0 ,0 ,0))
{ {

View File

@ -11,6 +11,7 @@
#include "Kismet/GameplayStatics.h" #include "Kismet/GameplayStatics.h"
#include "AC_Dialogue.generated.h" #include "AC_Dialogue.generated.h"
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FStartedDialogue);
UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent))
class ENDLESSVENDETTA_API UAC_Dialogue : public UActorComponent class ENDLESSVENDETTA_API UAC_Dialogue : public UActorComponent
@ -22,6 +23,9 @@ public:
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Dialogue") UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Dialogue")
UDialogueTree* DialogueTree; UDialogueTree* DialogueTree;
UPROPERTY(BlueprintAssignable)
FStartedDialogue StartedDialogue;
}; };
inline void UAC_Dialogue::Interact() const inline void UAC_Dialogue::Interact() const
@ -32,4 +36,5 @@ inline void UAC_Dialogue::Interact() const
if (!IsValid(Cast<UAC_PlayerDialogueInterpreter>(Character->GetComponentByClass(UAC_PlayerDialogueInterpreter::StaticClass())))) return; if (!IsValid(Cast<UAC_PlayerDialogueInterpreter>(Character->GetComponentByClass(UAC_PlayerDialogueInterpreter::StaticClass())))) return;
Cast<UAC_PlayerDialogueInterpreter>(Character->GetComponentByClass(UAC_PlayerDialogueInterpreter::StaticClass()))->StartDialogue(DialogueTree); Cast<UAC_PlayerDialogueInterpreter>(Character->GetComponentByClass(UAC_PlayerDialogueInterpreter::StaticClass()))->StartDialogue(DialogueTree);
Character->bIsInDialogue = true; Character->bIsInDialogue = true;
StartedDialogue.Broadcast();
} }

View File

@ -326,10 +326,6 @@ void AEndlessVendettaCharacter::SetupPlayerInputComponent(class UInputComponent*
//Interacting //Interacting
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this,
&AEndlessVendettaCharacter::Interact); &AEndlessVendettaCharacter::Interact);
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Triggered, this,
&AEndlessVendettaCharacter::HoldInteract);
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Canceled, this,
&AEndlessVendettaCharacter::StoppedHoldingInteract);
} }
} }
@ -344,7 +340,7 @@ void AEndlessVendettaCharacter::Interact()
NextDialogue(); NextDialogue();
return; return;
} }
StartedHoldingInteract(1.f / HoldForInteractionDuration); //StartedHoldingInteract(1.f / HoldForInteractionDuration);
if (PlayerOnShip) if (PlayerOnShip)
{ {
SpaceShip->PlayerInteracting(); SpaceShip->PlayerInteracting();