Implemented Entering Apartment Through Vent Functionality
This commit is contained in:
parent
dfe50b6548
commit
acafc375d2
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:8cb0a97f1dd101c47bcf0507886ef4490543549181f2c8bb287089ad768a7518
|
||||
size 34179
|
||||
oid sha256:123098c81e710146723e193f367e1a4e2da65cacca48bf37d97c40e85bcf9dca
|
||||
size 35424
|
||||
|
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/DT_ConstructionWorker.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/DT_ConstructionWorker.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/Item_ScrewDriver.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/Item_ScrewDriver.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/M_ScrewPic.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/M_ScrewPic.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/M_ScrewPic_Rot.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/M_ScrewPic_Rot.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/ScrewDriverPic.png
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/ScrewDriverPic.png
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/ScrewDriverPic.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/BountySystem/ApartmentBounty/AI/ConstructionWorker/ScrewDriverPic.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ce69e2ea1ad759c5405fb0414aebf0bdcafdbe0420328736cedba27b41528521
|
||||
size 27320
|
||||
oid sha256:14cb75883d3e5bf3ca40441a9794c0e14a662b30170a45cadbb3d63a3271b83b
|
||||
size 36526
|
||||
|
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:ba1cd4efcaef5498d769e1db299d043470a1e6fa9bbe2b54927ed2962d4361dd
|
||||
size 41739957
|
||||
oid sha256:abff5f3419d080ed1bf2fe3f817bd0d67983bd472e364dc44c671829b3f736df
|
||||
size 41740404
|
||||
|
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.
@ -3,6 +3,9 @@
|
||||
|
||||
#include "ConstructionVent.h"
|
||||
|
||||
#include "EndlessVendetta/EndlessVendettaCharacter.h"
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
|
||||
// Sets default values
|
||||
AConstructionVent::AConstructionVent()
|
||||
{
|
||||
@ -11,22 +14,27 @@ AConstructionVent::AConstructionVent()
|
||||
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
void AConstructionVent::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
}
|
||||
|
||||
void AConstructionVent::Interact()
|
||||
{
|
||||
UE_LOG(LogTemp, Warning, TEXT("Interacting with VENT...sus"));
|
||||
APawn* PlayerPawn = GetWorld()->GetFirstPlayerController()->GetPawn();
|
||||
UInventoryComponent* PlayersInventory = Cast<UInventoryComponent>(PlayerPawn->GetComponentByClass(UInventoryComponent::StaticClass()));
|
||||
if (PlayersInventory->HasItemByItemID(6971))
|
||||
{
|
||||
Cast<UEVGameInstance>(GetGameInstance())->EnteredApartmentThroughVent = true;
|
||||
for (auto Item : PlayersInventory->GetAllItems())
|
||||
{
|
||||
if (Cast<UBaseItem>(Item.Key)->ItemID == 6971)
|
||||
{
|
||||
PlayersInventory->RemoveItem(Item.Key);
|
||||
break;
|
||||
}
|
||||
}
|
||||
EnterApartmentThroughVent();
|
||||
}
|
||||
else
|
||||
{
|
||||
FailToEnterVent();
|
||||
}
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void AConstructionVent::Tick(float DeltaTime)
|
||||
{
|
||||
Super::Tick(DeltaTime);
|
||||
|
||||
}
|
||||
|
||||
|
@ -17,13 +17,13 @@ public:
|
||||
AConstructionVent();
|
||||
|
||||
protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
void Interact() override;
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void EnterApartmentThroughVent();
|
||||
|
||||
public:
|
||||
// Called every frame
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void FailToEnterVent();
|
||||
|
||||
};
|
||||
|
@ -46,6 +46,9 @@ public:
|
||||
UFUNCTION(BlueprintCallable, Category = "DialogueFlags")
|
||||
bool HasDialogueFlag(EDialogueFlag Flag) const;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
bool EnteredApartmentThroughVent = false;
|
||||
|
||||
protected:
|
||||
virtual void OnStart() override;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user