From a8c66b20467f40650a7cc511577a9661bbb4e570 Mon Sep 17 00:00:00 2001 From: Marcel Hara Date: Wed, 27 Sep 2023 13:45:21 +0100 Subject: [PATCH] Added all basic weapon needed classes --- .../EndlessVendetta/BaseWeaponClass.cpp | 26 ++++++++++++++ .../Source/EndlessVendetta/BaseWeaponClass.h | 25 +++++++++++++ .../Source/EndlessVendetta/PistolClass.cpp | 26 ++++++++++++++ .../Source/EndlessVendetta/PistolClass.h | 25 +++++++++++++ .../EndlessVendetta/WeaponInventory.cpp | 35 +++++++++++++++++++ .../Source/EndlessVendetta/WeaponInventory.h | 26 ++++++++++++++ .../EndlessVendetta/WeaponItemClass.cpp | 26 ++++++++++++++ .../Source/EndlessVendetta/WeaponItemClass.h | 25 +++++++++++++ 8 files changed, 214 insertions(+) create mode 100644 EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp create mode 100644 EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h create mode 100644 EndlessVendetta/Source/EndlessVendetta/PistolClass.cpp create mode 100644 EndlessVendetta/Source/EndlessVendetta/PistolClass.h create mode 100644 EndlessVendetta/Source/EndlessVendetta/WeaponInventory.cpp create mode 100644 EndlessVendetta/Source/EndlessVendetta/WeaponInventory.h create mode 100644 EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp create mode 100644 EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h diff --git a/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp new file mode 100644 index 00000000..ade25671 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "BaseWeaponClass.h" + + +// Sets default values +ABaseWeaponClass::ABaseWeaponClass() +{ + // 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 ABaseWeaponClass::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void ABaseWeaponClass::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + diff --git a/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h new file mode 100644 index 00000000..57604d02 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h @@ -0,0 +1,25 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "WeaponItemClass.h" +#include "BaseWeaponClass.generated.h" + +UCLASS() +class ENDLESSVENDETTA_API ABaseWeaponClass : public AWeaponItemClass +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + ABaseWeaponClass(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; +}; diff --git a/EndlessVendetta/Source/EndlessVendetta/PistolClass.cpp b/EndlessVendetta/Source/EndlessVendetta/PistolClass.cpp new file mode 100644 index 00000000..c40b9fdc --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/PistolClass.cpp @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "PistolClass.h" + + +// Sets default values +APistolClass::APistolClass() +{ + // 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 APistolClass::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void APistolClass::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + diff --git a/EndlessVendetta/Source/EndlessVendetta/PistolClass.h b/EndlessVendetta/Source/EndlessVendetta/PistolClass.h new file mode 100644 index 00000000..4ad676b2 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/PistolClass.h @@ -0,0 +1,25 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "BaseWeaponClass.h" +#include "PistolClass.generated.h" + +UCLASS() +class ENDLESSVENDETTA_API APistolClass : public ABaseWeaponClass +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + APistolClass(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; +}; diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponInventory.cpp b/EndlessVendetta/Source/EndlessVendetta/WeaponInventory.cpp new file mode 100644 index 00000000..14c10a17 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponInventory.cpp @@ -0,0 +1,35 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "WeaponInventory.h" + + +// Sets default values for this component's properties +UWeaponInventory::UWeaponInventory() +{ + // Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features + // off to improve performance if you don't need them. + PrimaryComponentTick.bCanEverTick = true; + + // ... +} + + +// Called when the game starts +void UWeaponInventory::BeginPlay() +{ + Super::BeginPlay(); + + // ... + +} + + +// Called every frame +void UWeaponInventory::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) +{ + Super::TickComponent(DeltaTime, TickType, ThisTickFunction); + + // ... +} + diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponInventory.h b/EndlessVendetta/Source/EndlessVendetta/WeaponInventory.h new file mode 100644 index 00000000..5ac32b02 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponInventory.h @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "Components/ActorComponent.h" +#include "WeaponInventory.generated.h" + + +UCLASS(ClassGroup=(Custom), meta=(BlueprintSpawnableComponent)) +class ENDLESSVENDETTA_API UWeaponInventory : public UActorComponent +{ + GENERATED_BODY() + +public: + // Sets default values for this component's properties + UWeaponInventory(); + +protected: + // Called when the game starts + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override; +}; diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp new file mode 100644 index 00000000..90d8f5ac --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp @@ -0,0 +1,26 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "WeaponItemClass.h" + + +// Sets default values +AWeaponItemClass::AWeaponItemClass() +{ + // 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 AWeaponItemClass::BeginPlay() +{ + Super::BeginPlay(); + +} + +// Called every frame +void AWeaponItemClass::Tick(float DeltaTime) +{ + Super::Tick(DeltaTime); +} + diff --git a/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h new file mode 100644 index 00000000..e7042620 --- /dev/null +++ b/EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h @@ -0,0 +1,25 @@ +// Fill out your copyright notice in the Description page of Project Settings. + +#pragma once + +#include "CoreMinimal.h" +#include "GameFramework/Actor.h" +#include "WeaponItemClass.generated.h" + +UCLASS() +class ENDLESSVENDETTA_API AWeaponItemClass : public AActor +{ + GENERATED_BODY() + +public: + // Sets default values for this actor's properties + AWeaponItemClass(); + +protected: + // Called when the game starts or when spawned + virtual void BeginPlay() override; + +public: + // Called every frame + virtual void Tick(float DeltaTime) override; +};