Refactor Weapon includes

This commit is contained in:
baz 2024-11-13 23:47:47 +00:00
parent 4fa8210707
commit 1507846810
12 changed files with 30 additions and 13 deletions

View File

@ -4,6 +4,7 @@
#include "FireWandWeapon.h"
#include "Kismet/KismetMathLibrary.h"
#include "vampires/Projectile.h"
AFireWandWeapon::AFireWandWeapon()
{

View File

@ -2,6 +2,8 @@
#include "GarlicWeapon.h"
#include "Components/SphereComponent.h"
#include "vampires/EnemyCharacter.h"
AGarlicWeapon::AGarlicWeapon()
{

View File

@ -4,10 +4,11 @@
#include "CoreMinimal.h"
#include "../Weapon.h"
#include "Components/SphereComponent.h"
#include "vampires/EnemyCharacter.h"
#include "GarlicWeapon.generated.h"
class USphereComponent;
class AEnemyCharacter;
USTRUCT()
struct FOverlappedEnemy
{

View File

@ -6,6 +6,7 @@
#include "Kismet/GameplayStatics.h"
#include "Kismet/KismetMathLibrary.h"
#include "vampires/PlayerCharacter.h"
#include "vampires/Projectile.h"
#include "vampires/VampirePlayerController.h"
AGunWeapon::AGunWeapon()

View File

@ -5,6 +5,7 @@
#include "Kismet/GameplayStatics.h"
#include "vampires/PlayerCharacter.h"
#include "vampires/Projectile.h"
AKnifeWeapon::AKnifeWeapon()
{

View File

@ -2,6 +2,8 @@
#include "LightningRingWeapon.h"
#include "Components/SphereComponent.h"
#include "vampires/EnemyCharacter.h"
ALightningRingWeapon::ALightningRingWeapon()
{

View File

@ -4,10 +4,10 @@
#include "CoreMinimal.h"
#include "../Weapon.h"
#include "Components/SphereComponent.h"
#include "vampires/EnemyCharacter.h"
#include "LightningRingWeapon.generated.h"
class AEnemyCharacter;
class USphereComponent;
/**
*
*/

View File

@ -5,6 +5,7 @@
#include "Kismet/GameplayStatics.h"
#include "Kismet/KismetMathLibrary.h"
#include "vampires/Projectile.h"
AMagicWandWeapon::AMagicWandWeapon()
{

View File

@ -6,6 +6,9 @@
#include "Kismet/GameplayStatics.h"
#include "vampires/VampirePlayerController.h"
#include "../PlayerCharacter.h"
#include "Components/BoxComponent.h"
#include "vampires/EnemyCharacter.h"
#include "vampires/Pickup.h"
APentagramWeapon::APentagramWeapon()
{

View File

@ -4,11 +4,11 @@
#include "CoreMinimal.h"
#include "../Weapon.h"
#include "Components/BoxComponent.h"
#include "vampires/EnemyCharacter.h"
#include "vampires/Pickup.h"
#include "PentagramWeapon.generated.h"
class APickup;
class AEnemyCharacter;
class UBoxComponent;
/**
*
*/

View File

@ -7,6 +7,8 @@
#include "vampires/EnemyCharacter.h"
#include "vampires/PlayerCharacter.h"
#include "vampires/VampirePlayerController.h"
#include "../Weapon.h"
#include "Components/BoxComponent.h"
AProjectileWeapon::AProjectileWeapon()
{
@ -43,7 +45,8 @@ void AProjectileWeapon::BeginPlay()
}
void AProjectileWeapon::OnWeaponBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
const FHitResult& SweepResult)
{
if (AEnemyCharacter* Enemy = Cast<AEnemyCharacter>(OtherActor))
{
@ -52,7 +55,7 @@ void AProjectileWeapon::OnWeaponBeginOverlap(UPrimitiveComponent* OverlappedComp
}
void AProjectileWeapon::OnWeaponEndOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor,
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
{
if (AEnemyCharacter* Enemy = Cast<AEnemyCharacter>(OtherActor))
{
@ -61,7 +64,8 @@ void AProjectileWeapon::OnWeaponEndOverlap(UPrimitiveComponent* OverlappedComp,
}
void AProjectileWeapon::OnProjectileBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
const FHitResult& SweepResult)
{
if (AEnemyCharacter* Enemy = Cast<AEnemyCharacter>(OtherActor))
{

View File

@ -3,11 +3,12 @@
#pragma once
#include "CoreMinimal.h"
#include "../Weapon.h"
#include "Components/BoxComponent.h"
#include "vampires/Projectile.h"
#include "vampires/Weapon.h"
#include "ProjectileWeapon.generated.h"
class AProjectile;
class UBoxComponent;
/**
*
*/