Refactor Weapon includes
This commit is contained in:
parent
4fa8210707
commit
1507846810
|
@ -4,6 +4,7 @@
|
|||
#include "FireWandWeapon.h"
|
||||
|
||||
#include "Kismet/KismetMathLibrary.h"
|
||||
#include "vampires/Projectile.h"
|
||||
|
||||
AFireWandWeapon::AFireWandWeapon()
|
||||
{
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
|
||||
#include "GarlicWeapon.h"
|
||||
#include "Components/SphereComponent.h"
|
||||
#include "vampires/EnemyCharacter.h"
|
||||
|
||||
AGarlicWeapon::AGarlicWeapon()
|
||||
{
|
||||
|
|
|
@ -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
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "vampires/PlayerCharacter.h"
|
||||
#include "vampires/Projectile.h"
|
||||
|
||||
AKnifeWeapon::AKnifeWeapon()
|
||||
{
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
|
||||
#include "LightningRingWeapon.h"
|
||||
#include "Components/SphereComponent.h"
|
||||
#include "vampires/EnemyCharacter.h"
|
||||
|
||||
ALightningRingWeapon::ALightningRingWeapon()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
|
||||
#include "Kismet/GameplayStatics.h"
|
||||
#include "Kismet/KismetMathLibrary.h"
|
||||
#include "vampires/Projectile.h"
|
||||
|
||||
AMagicWandWeapon::AMagicWandWeapon()
|
||||
{
|
||||
|
|
|
@ -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()
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
|
@ -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))
|
||||
{
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue