From 9e01262b2b16cb7b6c07586fd1c39b2a6844dc1b Mon Sep 17 00:00:00 2001 From: MH261677 Date: Thu, 14 Dec 2023 10:18:06 +0000 Subject: [PATCH] Created basic weapon workbench functionality --- .../BP_WeaponWorkbench.uasset | 3 ++ .../WeaponWorkbenchClass.cpp | 36 +++++++++++++++++++ .../WeaponWorkbenchClass.h | 29 +++++++++++++++ 3 files changed, 68 insertions(+) create mode 100644 EndlessVendetta/Content/FirstPerson/Blueprints/Workbench_WeaponAttachments/BP_WeaponWorkbench.uasset create mode 100644 EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.cpp create mode 100644 EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.h diff --git a/EndlessVendetta/Content/FirstPerson/Blueprints/Workbench_WeaponAttachments/BP_WeaponWorkbench.uasset b/EndlessVendetta/Content/FirstPerson/Blueprints/Workbench_WeaponAttachments/BP_WeaponWorkbench.uasset new file mode 100644 index 00000000..adf7c5a3 --- /dev/null +++ b/EndlessVendetta/Content/FirstPerson/Blueprints/Workbench_WeaponAttachments/BP_WeaponWorkbench.uasset @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:04cfc7fe61d70436448fef9aab937104318ff0f55b78ff073901898ebba5427b +size 30633 diff --git a/EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.cpp b/EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.cpp new file mode 100644 index 00000000..7dda702e --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.cpp @@ -0,0 +1,36 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "WeaponWorkbenchClass.h" + + +// Sets default values +AWeaponWorkbenchClass::AWeaponWorkbenchClass() +{ + // Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it. + PrimaryActorTick.bCanEverTick = true; +} + +// Called when the game starts or when spawned +void AWeaponWorkbenchClass::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AWeaponWorkbenchClass::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + +void AWeaponWorkbenchClass::Interact() +{ + UE_LOG(LogTemp, Display, TEXT("Interacted with weapon workbench")); +} + +void AWeaponWorkbenchClass::InteractPrompt() +{ + +} + diff --git a/EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.h b/EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.h new file mode 100644 index 00000000..6cf64981 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/Workbench&Attachments/WeaponWorkbenchClass.h @@ -0,0 +1,29 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "EndlessVendetta/InteractionInterface.h" +#include "GameFramework/Actor.h" +#include "WeaponWorkbenchClass.generated.h" + +UCLASS() +class ENDLESSVENDETTA_API AWeaponWorkbenchClass : public AActor, public IInteractionInterface +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + AWeaponWorkbenchClass(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; + + void Interact() override; + void InteractPrompt() override; +};