added main and pause menus
This commit is contained in:
@@ -89,6 +89,7 @@ void ANakedDesireCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInp
|
||||
EnhancedInputComponent->BindAction(EquipmentAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnEquipmentPress);
|
||||
EnhancedInputComponent->BindAction(InteractAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnInteractPress);
|
||||
EnhancedInputComponent->BindAction(PhoneAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnPhonePress);
|
||||
EnhancedInputComponent->BindAction(PauseAction, ETriggerEvent::Started, this, &ANakedDesireCharacter::OnPausePress);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -270,6 +271,11 @@ void ANakedDesireCharacter::OnPhonePress(const FInputActionValue& Value)
|
||||
HUD->GetGameLayoutWidget()->OpenPhone();
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::OnPausePress(const FInputActionValue& Value)
|
||||
{
|
||||
HUD->GetGameLayoutWidget()->OpenPauseMenu();
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::NotifyNoticed(ANPCAIController* NPCController)
|
||||
{
|
||||
OnNoticed.Broadcast(NPCController);
|
||||
|
||||
@@ -61,6 +61,9 @@ public:
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Input")
|
||||
UInputAction* PhoneAction;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, Category = "Input")
|
||||
UInputAction* PauseAction;
|
||||
|
||||
// Clothing slot meshes are spawned per equipped slot at runtime by ClothingVisualsComponent.
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Clothing")
|
||||
UClothingVisualsComponent* ClothingVisualsComponent;
|
||||
@@ -145,6 +148,7 @@ private:
|
||||
void OnEquipmentPress(const FInputActionValue& Value);
|
||||
void OnInteractPress(const FInputActionValue& Value);
|
||||
void OnPhonePress(const FInputActionValue& Value);
|
||||
void OnPausePress(const FInputActionValue& Value);
|
||||
|
||||
bool CheckSight(const FVector& StartLocation, const FVector& EndLocation, FHitResult& HitResult, const AActor* IgnoreActor);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user