Added Basic WeaponWorkbench Code
This commit is contained in:
parent
247ab29a61
commit
4743e4e792
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.
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:04cfc7fe61d70436448fef9aab937104318ff0f55b78ff073901898ebba5427b
|
||||
size 30633
|
||||
oid sha256:8d5cfa689a3e0540b6d9d02b7c7f52a810fc65740e4831b3fc1e97070cae84ff
|
||||
size 40168
|
||||
|
@ -15,7 +15,7 @@ AWeaponWorkbenchClass::AWeaponWorkbenchClass()
|
||||
void AWeaponWorkbenchClass::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
PlayerCharacterRef = Cast<AEndlessVendettaCharacter>(GetWorld()->GetFirstPlayerController()->GetCharacter());
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
@ -26,11 +26,13 @@ void AWeaponWorkbenchClass::Tick(float DeltaTime)
|
||||
|
||||
void AWeaponWorkbenchClass::Interact()
|
||||
{
|
||||
UE_LOG(LogTemp, Display, TEXT("Interacted with weapon workbench"));
|
||||
if (!PlayerCharacterRef->bHasRifle) return;
|
||||
UE_LOG(LogTemp, Display, TEXT("Opening Workbench"));
|
||||
WorkbenchUI();
|
||||
}
|
||||
|
||||
void AWeaponWorkbenchClass::InteractPrompt()
|
||||
{
|
||||
|
||||
//THIS IS PROMPT WHERE WILL BE PRESS F TO INTERACT OR WHATEVER
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "EndlessVendetta/EndlessVendettaCharacter.h"
|
||||
#include "EndlessVendetta/InteractionInterface.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "WeaponWorkbenchClass.generated.h"
|
||||
@ -26,4 +27,9 @@ public:
|
||||
|
||||
void Interact() override;
|
||||
void InteractPrompt() override;
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void WorkbenchUI();
|
||||
|
||||
AEndlessVendettaCharacter* PlayerCharacterRef;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user