Implemented Exiting Hover Bike along with its UI
This commit is contained in:
parent
b4fcc23c50
commit
82a4951990
BIN
EndlessVendetta/Content/FirstPerson/BlueRoundedBox.png
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/FirstPerson/BlueRoundedBox.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/BlueRoundedBox.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/FirstPerson/BlueRoundedBox.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/BP_FirstPersonCharacter.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/WBP_HoverBike.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/FirstPerson/Blueprints/WBP_HoverBike.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Interact.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/FirstPerson/Input/Actions/IA_Interact.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/Levels/MainMenuLevel.umap
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Levels/MainMenuLevel.umap
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Blueprints/Blueprint_CeilingLight.uasset
(Stored with Git LFS)
Binary file not shown.
@ -216,6 +216,7 @@ void AEndlessVendettaCharacter::SetupPlayerInputComponent(class UInputComponent*
|
|||||||
//Interacting
|
//Interacting
|
||||||
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, &AEndlessVendettaCharacter::Interact);
|
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, &AEndlessVendettaCharacter::Interact);
|
||||||
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Triggered, this, &AEndlessVendettaCharacter::HoldInteract);
|
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Triggered, this, &AEndlessVendettaCharacter::HoldInteract);
|
||||||
|
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Canceled, this, &AEndlessVendettaCharacter::StoppedHoldingInteract);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -228,6 +229,7 @@ void AEndlessVendettaCharacter::Interact()
|
|||||||
Cast<UAC_PlayerDialogueInterpreter>(GetComponentByClass(UAC_PlayerDialogueInterpreter::StaticClass()))->NextDialogue();
|
Cast<UAC_PlayerDialogueInterpreter>(GetComponentByClass(UAC_PlayerDialogueInterpreter::StaticClass()))->NextDialogue();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
StartedHoldingInteract(1.f / HoldForInteractionDuration);
|
||||||
if (PlayerOnShip)
|
if (PlayerOnShip)
|
||||||
{
|
{
|
||||||
SpaceShip->PlayerInteracting();
|
SpaceShip->PlayerInteracting();
|
||||||
@ -743,7 +745,12 @@ void AEndlessVendettaCharacter::UpdateInventorySize(int Cols, int Rows)
|
|||||||
|
|
||||||
void AEndlessVendettaCharacter::HoldInteract()
|
void AEndlessVendettaCharacter::HoldInteract()
|
||||||
{
|
{
|
||||||
if (PlayerOnShip || InPauseMenu) return;
|
if (InPauseMenu) return;
|
||||||
|
if (PlayerOnShip)
|
||||||
|
{
|
||||||
|
ExitShip(GetActorTransform());
|
||||||
|
return;
|
||||||
|
}
|
||||||
FTransform TakeOffTransform = GetActorTransform();
|
FTransform TakeOffTransform = GetActorTransform();
|
||||||
FVector NewLoc = TakeOffTransform.GetLocation();
|
FVector NewLoc = TakeOffTransform.GetLocation();
|
||||||
NewLoc.Z += BikeRideHeight;
|
NewLoc.Z += BikeRideHeight;
|
||||||
|
@ -129,6 +129,7 @@ public:
|
|||||||
UPROPERTY(BlueprintReadWrite)
|
UPROPERTY(BlueprintReadWrite)
|
||||||
bool bIsInDialogue = false;
|
bool bIsInDialogue = false;
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
virtual void Tick(float DeltaTime) override;
|
virtual void Tick(float DeltaTime) override;
|
||||||
@ -228,7 +229,12 @@ protected:
|
|||||||
UPROPERTY(EditDefaultsOnly, Category = "Interaction")
|
UPROPERTY(EditDefaultsOnly, Category = "Interaction")
|
||||||
float InteractionRange = 250;
|
float InteractionRange = 250;
|
||||||
void Interact();
|
void Interact();
|
||||||
|
UPROPERTY(EditDefaultsOnly, Category = "Interaction")
|
||||||
|
float HoldForInteractionDuration = 0.5f;
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void StartedHoldingInteract(float Duration);
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void StoppedHoldingInteract();
|
||||||
protected:
|
protected:
|
||||||
// Used by vault it plugin to run vaulting animations
|
// Used by vault it plugin to run vaulting animations
|
||||||
USkeletalMeshComponent* FP_SkeletalMesh = nullptr;
|
USkeletalMeshComponent* FP_SkeletalMesh = nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user