setup equipment ui
This commit is contained in:
@@ -17,7 +17,9 @@
|
||||
#include "NakedDesire/Clothing/ClothingItemInstance.h"
|
||||
#include "NakedDesire/Clothing/ClothingSlotsData.h"
|
||||
#include "NakedDesire/Global/Constants.h"
|
||||
#include "NakedDesire/Global/NakedDesireHUD.h"
|
||||
#include "NakedDesire/Global/NakedDesireUserSettings.h"
|
||||
#include "NakedDesire/UI/GameLayoutWidget.h"
|
||||
#include "NakedDesire/UI/RadialMenu/RadialMenuController.h"
|
||||
#include "Perception/AIPerceptionStimuliSourceComponent.h"
|
||||
#include "Perception/AISense_Sight.h"
|
||||
@@ -166,6 +168,8 @@ void ANakedDesireCharacter::BeginPlay()
|
||||
|
||||
ClothingManager->OnClothingEquip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingEquip);
|
||||
ClothingManager->OnClothingUnequip.AddUniqueDynamic(this, &ANakedDesireCharacter::OnClothingUnequip);
|
||||
|
||||
HUD = Cast<ANakedDesireHUD>(UGameplayStatics::GetPlayerController(GetWorld(), 0)->GetHUD());
|
||||
|
||||
UNakedDesireUserSettings::GetNakedDesireUserSettings()->OnSettingsChanged.AddUniqueDynamic(this, &ANakedDesireCharacter::OnSettingsChanged);
|
||||
}
|
||||
@@ -258,7 +262,7 @@ void ANakedDesireCharacter::OnEndOverlap(UPrimitiveComponent* OverlappedComponen
|
||||
}
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::OnClothingEquip(const UClothingItemInstance* ClothingItemInstance)
|
||||
void ANakedDesireCharacter::OnClothingEquip(UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
if (ClothingItemInstance->GetClothingItem()->HiddenBodyParts.Contains(EBodyPart::Ass))
|
||||
{
|
||||
@@ -275,7 +279,7 @@ void ANakedDesireCharacter::OnClothingEquip(const UClothingItemInstance* Clothin
|
||||
}
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance)
|
||||
void ANakedDesireCharacter::OnClothingUnequip(UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
if (!UNakedDesireUserSettings::GetNakedDesireUserSettings()->GetIsCensorshipEnabled() && !IS_DEMO)
|
||||
return;
|
||||
@@ -366,8 +370,7 @@ void ANakedDesireCharacter::OnCrouchToggle(const FInputActionValue& Value)
|
||||
|
||||
void ANakedDesireCharacter::OnEquipmentPress(const FInputActionValue& Value)
|
||||
{
|
||||
BuildRadialMenuEntries();
|
||||
RadialMenuController->OpenMenu();
|
||||
HUD->GetGameLayout()->OpenInventory();
|
||||
}
|
||||
|
||||
void ANakedDesireCharacter::BuildRadialMenuEntries()
|
||||
|
||||
@@ -13,6 +13,8 @@
|
||||
#include "Perception/AISightTargetInterface.h"
|
||||
#include "NakedDesireCharacter.generated.h"
|
||||
|
||||
class ANakedDesireHUD;
|
||||
class UClothingItemInstance;
|
||||
class UClothingSlotsData;
|
||||
class URadialMenuController;
|
||||
class UAIPerceptionStimuliSourceComponent;
|
||||
@@ -187,10 +189,10 @@ private:
|
||||
int32 OtherBodyIndex);
|
||||
|
||||
UFUNCTION()
|
||||
void OnClothingEquip(const UClothingItemInstance* ClothingItemInstance);
|
||||
void OnClothingEquip(UClothingItemInstance* ClothingItemInstance);
|
||||
|
||||
UFUNCTION()
|
||||
void OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance);
|
||||
void OnClothingUnequip(UClothingItemInstance* ClothingItemInstance);
|
||||
|
||||
UFUNCTION()
|
||||
void OnSettingsChanged(UNakedDesireUserSettings* Settings);
|
||||
@@ -205,4 +207,7 @@ private:
|
||||
void BuildRadialMenuEntries();
|
||||
|
||||
bool CheckSight(const FVector& StartLocation, const FVector& EndLocation, FHitResult& HitResult, const AActor* IgnoreActor);
|
||||
|
||||
UPROPERTY()
|
||||
TObjectPtr<ANakedDesireHUD> HUD;
|
||||
};
|
||||
|
||||
@@ -60,12 +60,12 @@ void APlayerCinematic::BeginPlay()
|
||||
}
|
||||
}
|
||||
|
||||
void APlayerCinematic::OnClothingEquip(const UClothingItemInstance* ClothingItemInstance)
|
||||
void APlayerCinematic::OnClothingEquip(UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
EquipClothing(ClothingItemInstance);
|
||||
}
|
||||
|
||||
void APlayerCinematic::OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance)
|
||||
void APlayerCinematic::OnClothingUnequip(UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
UnequipClothing(ClothingItemInstance);
|
||||
}
|
||||
|
||||
@@ -60,16 +60,15 @@ class NAKEDDESIRE_API APlayerCinematic : public ACharacter
|
||||
|
||||
public:
|
||||
APlayerCinematic();
|
||||
|
||||
protected:
|
||||
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
private:
|
||||
UFUNCTION()
|
||||
void OnClothingEquip(const UClothingItemInstance* ClothingItemInstance);
|
||||
void OnClothingEquip(UClothingItemInstance* ClothingItemInstance);
|
||||
|
||||
UFUNCTION()
|
||||
void OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance);
|
||||
void OnClothingUnequip(UClothingItemInstance* ClothingItemInstance);
|
||||
|
||||
USkeletalMeshComponent* GetMeshByType(const EClothingSlotType SlotType) const;
|
||||
void EquipClothing(const UClothingItemInstance* ClothingItemInstance);
|
||||
|
||||
@@ -46,12 +46,12 @@ APlayerImpostor::APlayerImpostor()
|
||||
ShoesMeshComponent->SetupAttachment(GetMesh());
|
||||
}
|
||||
|
||||
void APlayerImpostor::OnClothingEquip(const UClothingItemInstance* ClothingItemInstance)
|
||||
void APlayerImpostor::OnClothingEquip(UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
EquipClothing(ClothingItemInstance);
|
||||
}
|
||||
|
||||
void APlayerImpostor::OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance)
|
||||
void APlayerImpostor::OnClothingUnequip(UClothingItemInstance* ClothingItemInstance)
|
||||
{
|
||||
UnequipClothing(ClothingItemInstance);
|
||||
}
|
||||
|
||||
@@ -71,10 +71,10 @@ public:
|
||||
|
||||
private:
|
||||
UFUNCTION()
|
||||
void OnClothingEquip(const UClothingItemInstance* ClothingItemInstance);
|
||||
void OnClothingEquip(UClothingItemInstance* ClothingItemInstance);
|
||||
|
||||
UFUNCTION()
|
||||
void OnClothingUnequip(const UClothingItemInstance* ClothingItemInstance);
|
||||
void OnClothingUnequip(UClothingItemInstance* ClothingItemInstance);
|
||||
|
||||
USkeletalMeshComponent* GetMesh() const { return Mesh; };
|
||||
USkeletalMeshComponent* GetMeshByType(const EClothingSlotType SlotType) const;
|
||||
|
||||
Reference in New Issue
Block a user