Refactor Weapon includes
This commit is contained in:
parent
4fa8210707
commit
1507846810
|
@ -4,6 +4,7 @@
|
||||||
#include "FireWandWeapon.h"
|
#include "FireWandWeapon.h"
|
||||||
|
|
||||||
#include "Kismet/KismetMathLibrary.h"
|
#include "Kismet/KismetMathLibrary.h"
|
||||||
|
#include "vampires/Projectile.h"
|
||||||
|
|
||||||
AFireWandWeapon::AFireWandWeapon()
|
AFireWandWeapon::AFireWandWeapon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
|
|
||||||
#include "GarlicWeapon.h"
|
#include "GarlicWeapon.h"
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
#include "vampires/EnemyCharacter.h"
|
||||||
|
|
||||||
AGarlicWeapon::AGarlicWeapon()
|
AGarlicWeapon::AGarlicWeapon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,10 +4,11 @@
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "../Weapon.h"
|
#include "../Weapon.h"
|
||||||
#include "Components/SphereComponent.h"
|
|
||||||
#include "vampires/EnemyCharacter.h"
|
|
||||||
#include "GarlicWeapon.generated.h"
|
#include "GarlicWeapon.generated.h"
|
||||||
|
|
||||||
|
class USphereComponent;
|
||||||
|
class AEnemyCharacter;
|
||||||
|
|
||||||
USTRUCT()
|
USTRUCT()
|
||||||
struct FOverlappedEnemy
|
struct FOverlappedEnemy
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,7 @@
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "Kismet/KismetMathLibrary.h"
|
#include "Kismet/KismetMathLibrary.h"
|
||||||
#include "vampires/PlayerCharacter.h"
|
#include "vampires/PlayerCharacter.h"
|
||||||
|
#include "vampires/Projectile.h"
|
||||||
#include "vampires/VampirePlayerController.h"
|
#include "vampires/VampirePlayerController.h"
|
||||||
|
|
||||||
AGunWeapon::AGunWeapon()
|
AGunWeapon::AGunWeapon()
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "vampires/PlayerCharacter.h"
|
#include "vampires/PlayerCharacter.h"
|
||||||
|
#include "vampires/Projectile.h"
|
||||||
|
|
||||||
AKnifeWeapon::AKnifeWeapon()
|
AKnifeWeapon::AKnifeWeapon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -2,6 +2,8 @@
|
||||||
|
|
||||||
|
|
||||||
#include "LightningRingWeapon.h"
|
#include "LightningRingWeapon.h"
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
#include "vampires/EnemyCharacter.h"
|
||||||
|
|
||||||
ALightningRingWeapon::ALightningRingWeapon()
|
ALightningRingWeapon::ALightningRingWeapon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,10 +4,10 @@
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "../Weapon.h"
|
#include "../Weapon.h"
|
||||||
#include "Components/SphereComponent.h"
|
|
||||||
#include "vampires/EnemyCharacter.h"
|
|
||||||
#include "LightningRingWeapon.generated.h"
|
#include "LightningRingWeapon.generated.h"
|
||||||
|
|
||||||
|
class AEnemyCharacter;
|
||||||
|
class USphereComponent;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
|
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "Kismet/KismetMathLibrary.h"
|
#include "Kismet/KismetMathLibrary.h"
|
||||||
|
#include "vampires/Projectile.h"
|
||||||
|
|
||||||
AMagicWandWeapon::AMagicWandWeapon()
|
AMagicWandWeapon::AMagicWandWeapon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -6,6 +6,9 @@
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "vampires/VampirePlayerController.h"
|
#include "vampires/VampirePlayerController.h"
|
||||||
#include "../PlayerCharacter.h"
|
#include "../PlayerCharacter.h"
|
||||||
|
#include "Components/BoxComponent.h"
|
||||||
|
#include "vampires/EnemyCharacter.h"
|
||||||
|
#include "vampires/Pickup.h"
|
||||||
|
|
||||||
APentagramWeapon::APentagramWeapon()
|
APentagramWeapon::APentagramWeapon()
|
||||||
{
|
{
|
||||||
|
|
|
@ -4,11 +4,11 @@
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "../Weapon.h"
|
#include "../Weapon.h"
|
||||||
#include "Components/BoxComponent.h"
|
|
||||||
#include "vampires/EnemyCharacter.h"
|
|
||||||
#include "vampires/Pickup.h"
|
|
||||||
#include "PentagramWeapon.generated.h"
|
#include "PentagramWeapon.generated.h"
|
||||||
|
|
||||||
|
class APickup;
|
||||||
|
class AEnemyCharacter;
|
||||||
|
class UBoxComponent;
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,6 +7,8 @@
|
||||||
#include "vampires/EnemyCharacter.h"
|
#include "vampires/EnemyCharacter.h"
|
||||||
#include "vampires/PlayerCharacter.h"
|
#include "vampires/PlayerCharacter.h"
|
||||||
#include "vampires/VampirePlayerController.h"
|
#include "vampires/VampirePlayerController.h"
|
||||||
|
#include "../Weapon.h"
|
||||||
|
#include "Components/BoxComponent.h"
|
||||||
|
|
||||||
AProjectileWeapon::AProjectileWeapon()
|
AProjectileWeapon::AProjectileWeapon()
|
||||||
{
|
{
|
||||||
|
@ -43,7 +45,8 @@ void AProjectileWeapon::BeginPlay()
|
||||||
}
|
}
|
||||||
|
|
||||||
void AProjectileWeapon::OnWeaponBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
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))
|
if (AEnemyCharacter* Enemy = Cast<AEnemyCharacter>(OtherActor))
|
||||||
{
|
{
|
||||||
|
@ -61,7 +64,8 @@ void AProjectileWeapon::OnWeaponEndOverlap(UPrimitiveComponent* OverlappedComp,
|
||||||
}
|
}
|
||||||
|
|
||||||
void AProjectileWeapon::OnProjectileBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
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))
|
if (AEnemyCharacter* Enemy = Cast<AEnemyCharacter>(OtherActor))
|
||||||
{
|
{
|
||||||
|
|
|
@ -3,11 +3,12 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
#include "../Weapon.h"
|
#include "vampires/Weapon.h"
|
||||||
#include "Components/BoxComponent.h"
|
|
||||||
#include "vampires/Projectile.h"
|
|
||||||
#include "ProjectileWeapon.generated.h"
|
#include "ProjectileWeapon.generated.h"
|
||||||
|
|
||||||
|
class AProjectile;
|
||||||
|
class UBoxComponent;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue