Added all basic weapon needed classes
This commit is contained in:
parent
720620b7d0
commit
a8c66b2046
26
EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp
Normal file
26
EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.cpp
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
25
EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h
Normal file
25
EndlessVendetta/Source/EndlessVendetta/BaseWeaponClass.h
Normal file
@ -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;
|
||||||
|
};
|
26
EndlessVendetta/Source/EndlessVendetta/PistolClass.cpp
Normal file
26
EndlessVendetta/Source/EndlessVendetta/PistolClass.cpp
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
25
EndlessVendetta/Source/EndlessVendetta/PistolClass.h
Normal file
25
EndlessVendetta/Source/EndlessVendetta/PistolClass.h
Normal file
@ -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;
|
||||||
|
};
|
35
EndlessVendetta/Source/EndlessVendetta/WeaponInventory.cpp
Normal file
35
EndlessVendetta/Source/EndlessVendetta/WeaponInventory.cpp
Normal file
@ -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);
|
||||||
|
|
||||||
|
// ...
|
||||||
|
}
|
||||||
|
|
26
EndlessVendetta/Source/EndlessVendetta/WeaponInventory.h
Normal file
26
EndlessVendetta/Source/EndlessVendetta/WeaponInventory.h
Normal file
@ -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;
|
||||||
|
};
|
26
EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp
Normal file
26
EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.cpp
Normal file
@ -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);
|
||||||
|
}
|
||||||
|
|
25
EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h
Normal file
25
EndlessVendetta/Source/EndlessVendetta/WeaponItemClass.h
Normal file
@ -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;
|
||||||
|
};
|
Loading…
Reference in New Issue
Block a user