Final weapons quick refactor
This commit is contained in:
parent
eb4ce4cb79
commit
8d8da3ddc1
@ -27,7 +27,10 @@ void AFireWandWeapon::FireWeaponAction_Implementation()
|
|||||||
|
|
||||||
bool AFireWandWeapon::UpgradeWeapon_Implementation()
|
bool AFireWandWeapon::UpgradeWeapon_Implementation()
|
||||||
{
|
{
|
||||||
if (!Super::UpgradeWeapon_Implementation()) return false;
|
if (!Super::UpgradeWeapon_Implementation())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (CurrentLevel)
|
switch (CurrentLevel)
|
||||||
{
|
{
|
||||||
@ -67,26 +70,26 @@ void AFireWandWeapon::FireProjectile()
|
|||||||
{
|
{
|
||||||
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
||||||
{
|
{
|
||||||
AGameModeBase* gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
AGameModeBase* Gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
||||||
|
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(gamemode, UPools::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Gamemode, UPools::StaticClass()))
|
||||||
{
|
{
|
||||||
if (AObjectPoolManager* objectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(gamemode))
|
if (AObjectPoolManager* ObjectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(Gamemode))
|
||||||
{
|
{
|
||||||
AActor* projectile = objectPoolManager->GetObject();
|
AActor* Projectile = ObjectPoolManager->GetObject();
|
||||||
|
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(projectile, UProjectilable::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Projectile, UProjectilable::StaticClass()))
|
||||||
{
|
{
|
||||||
IProjectilable::Execute_LoadDataFromDataAsset(projectile, ProjectileTemplate);
|
IProjectilable::Execute_LoadDataFromDataAsset(Projectile, ProjectileTemplate);
|
||||||
projectile->SetOwner(this);
|
Projectile->SetOwner(this);
|
||||||
|
|
||||||
AActor* target = OverlappedEnemies[FMath::RandRange(0, OverlappedEnemies.Num() - 1)];
|
AActor* Target = OverlappedEnemies[FMath::RandRange(0, OverlappedEnemies.Num() - 1)];
|
||||||
FVector direction = UKismetMathLibrary::GetDirectionUnitVector(
|
FVector Direction = UKismetMathLibrary::GetDirectionUnitVector(
|
||||||
GetActorLocation(), target->GetActorLocation());
|
GetActorLocation(), Target->GetActorLocation());
|
||||||
direction.Z = 0.0;
|
Direction.Z = 0.0;
|
||||||
direction.Normalize();
|
Direction.Normalize();
|
||||||
|
|
||||||
IProjectilable::Execute_SetTargetDirection(projectile, direction);
|
IProjectilable::Execute_SetTargetDirection(Projectile, Direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
Super::FireProjectile();
|
Super::FireProjectile();
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
#include "GarlicWeapon.h"
|
#include "GarlicWeapon.h"
|
||||||
|
|
||||||
#include "MovieSceneTracksComponentTypes.h"
|
|
||||||
#include "Components/SphereComponent.h"
|
#include "Components/SphereComponent.h"
|
||||||
#include "vampires/EnemyCharacter.h"
|
#include "vampires/EnemyCharacter.h"
|
||||||
#include "vampires/HealthComponent.h"
|
#include "vampires/HealthComponent.h"
|
||||||
@ -14,13 +13,14 @@ AGarlicWeapon::AGarlicWeapon()
|
|||||||
SetRootComponent(SphereComponent);
|
SetRootComponent(SphereComponent);
|
||||||
SphereComponent->SetSphereRadius(150.0f);
|
SphereComponent->SetSphereRadius(150.0f);
|
||||||
SphereComponent->SetCollisionProfileName(TEXT("Weapon"));
|
SphereComponent->SetCollisionProfileName(TEXT("Weapon"));
|
||||||
|
|
||||||
Damage = 51.0f;
|
Damage = 51.0f;
|
||||||
Range = SphereComponent->GetScaledSphereRadius();
|
Range = SphereComponent->GetScaledSphereRadius();
|
||||||
|
|
||||||
VisualEffectMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Visual Layout Mesh Component"));
|
VisualEffectMeshComponent = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("Visual Layout Mesh Component"));
|
||||||
VisualEffectMeshComponent->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
|
VisualEffectMeshComponent->AttachToComponent(RootComponent, FAttachmentTransformRules::KeepRelativeTransform);
|
||||||
VisualEffectMeshComponent->SetWorldScale3D(FVector(3.0f, 3.0f, 3.0f)); // This is to match the size of our sphere component
|
// This is to match the size of our sphere component
|
||||||
|
VisualEffectMeshComponent->SetWorldScale3D(FVector(3.0f, 3.0f, 3.0f));
|
||||||
VisualEffectMeshComponent->SetCollisionProfileName("NoCollision");
|
VisualEffectMeshComponent->SetCollisionProfileName("NoCollision");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,15 +41,14 @@ void AGarlicWeapon::OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AAc
|
|||||||
{
|
{
|
||||||
if (AEnemyCharacter* Enemy = Cast<AEnemyCharacter>(OtherActor))
|
if (AEnemyCharacter* Enemy = Cast<AEnemyCharacter>(OtherActor))
|
||||||
{
|
{
|
||||||
FOverlappedEnemy overlappedEnemy = FOverlappedEnemy(Enemy);
|
FOverlappedEnemy OverlappedEnemy = FOverlappedEnemy(Enemy);
|
||||||
|
|
||||||
|
GetWorldTimerManager().SetTimer(OverlappedEnemy.OverlappedTimerHandle,
|
||||||
GetWorldTimerManager().SetTimer(overlappedEnemy.OverlappedTimerHandle,
|
|
||||||
FTimerDelegate::CreateUObject(this, &AGarlicWeapon::GarlicFireWeaponAction,
|
FTimerDelegate::CreateUObject(this, &AGarlicWeapon::GarlicFireWeaponAction,
|
||||||
overlappedEnemy),
|
OverlappedEnemy),
|
||||||
WeaponCooldown,
|
WeaponCooldown,
|
||||||
true);
|
true);
|
||||||
GarlicOverlappedEnemies.Add(overlappedEnemy);
|
GarlicOverlappedEnemies.Add(OverlappedEnemy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -79,22 +78,22 @@ void AGarlicWeapon::GarlicFireWeaponAction(FOverlappedEnemy EnemyCharacter)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
AController* ownerController = nullptr;
|
AController* OwnerController = nullptr;
|
||||||
if (AVampireCharacter* character = Cast<AVampireCharacter>(GetOwner()))
|
if (AVampireCharacter* Character = Cast<AVampireCharacter>(GetOwner()))
|
||||||
{
|
{
|
||||||
ownerController = character->GetController();
|
OwnerController = Character->GetController();
|
||||||
}
|
}
|
||||||
|
|
||||||
EnemyHealthComponent->TakeDamage(EnemyCharacter.OverlappedEnemyCharacter, Damage, nullptr,
|
EnemyHealthComponent->TakeDamage(EnemyCharacter.OverlappedEnemyCharacter, Damage, nullptr,
|
||||||
ownerController, this);
|
OwnerController, this);
|
||||||
|
|
||||||
if (!EnemyHealthComponent->GetIsDead())
|
if (!EnemyHealthComponent->GetIsDead())
|
||||||
{
|
{
|
||||||
FVector Direction = EnemyCharacter.OverlappedEnemyCharacter->GetActorLocation() - this->GetActorLocation();
|
FVector Direction = EnemyCharacter.OverlappedEnemyCharacter->GetActorLocation() - this->GetActorLocation();
|
||||||
Direction.Normalize();
|
Direction.Normalize();
|
||||||
Direction.Z = 0.0f;
|
Direction.Z = 0.0f;
|
||||||
float distance = SphereComponent->GetScaledSphereRadius();
|
float Distance = SphereComponent->GetScaledSphereRadius();
|
||||||
Direction *= distance;
|
Direction *= Distance;
|
||||||
EnemyCharacter.OverlappedEnemyCharacter->SetActorLocation(
|
EnemyCharacter.OverlappedEnemyCharacter->SetActorLocation(
|
||||||
EnemyCharacter.OverlappedEnemyCharacter->GetActorLocation() + Direction);
|
EnemyCharacter.OverlappedEnemyCharacter->GetActorLocation() + Direction);
|
||||||
}
|
}
|
||||||
@ -102,48 +101,55 @@ void AGarlicWeapon::GarlicFireWeaponAction(FOverlappedEnemy EnemyCharacter)
|
|||||||
|
|
||||||
bool AGarlicWeapon::UpgradeWeapon_Implementation()
|
bool AGarlicWeapon::UpgradeWeapon_Implementation()
|
||||||
{
|
{
|
||||||
if (!Super::UpgradeWeapon_Implementation()) return false;
|
if (!Super::UpgradeWeapon_Implementation())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (CurrentLevel)
|
switch (CurrentLevel)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
Range *= 1.4f;
|
Range *= 1.4f;
|
||||||
SphereComponent->SetSphereRadius(Range);
|
SphereComponent->SetSphereRadius(Range);
|
||||||
Damage += 2.0f;
|
Damage += 2.0f;
|
||||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.4f);
|
VisualEffectMeshComponent->SetWorldScale3D(
|
||||||
break;
|
VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.4f);
|
||||||
case 2:
|
break;
|
||||||
WeaponCooldown -= 0.1f;
|
case 2:
|
||||||
Damage += 1;
|
WeaponCooldown -= 0.1f;
|
||||||
break;
|
Damage += 1;
|
||||||
case 3:
|
break;
|
||||||
Range *= 1.2f;
|
case 3:
|
||||||
SphereComponent->SetSphereRadius(Range);
|
Range *= 1.2f;
|
||||||
Damage += 1.0f;
|
SphereComponent->SetSphereRadius(Range);
|
||||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
Damage += 1.0f;
|
||||||
break;
|
VisualEffectMeshComponent->SetWorldScale3D(
|
||||||
case 4:
|
VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
||||||
WeaponCooldown -= 0.1f;
|
break;
|
||||||
Damage += 2;
|
case 4:
|
||||||
break;
|
WeaponCooldown -= 0.1f;
|
||||||
case 5:
|
Damage += 2;
|
||||||
Range *= 1.2f;
|
break;
|
||||||
SphereComponent->SetSphereRadius(Range);
|
case 5:
|
||||||
Damage += 1.0f;
|
Range *= 1.2f;
|
||||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
SphereComponent->SetSphereRadius(Range);
|
||||||
break;
|
Damage += 1.0f;
|
||||||
case 6:
|
VisualEffectMeshComponent->SetWorldScale3D(
|
||||||
WeaponCooldown -= 0.1f;
|
VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
||||||
Damage += 1;
|
break;
|
||||||
break;
|
case 6:
|
||||||
case 7:
|
WeaponCooldown -= 0.1f;
|
||||||
Range *= 1.2f;
|
Damage += 1;
|
||||||
SphereComponent->SetSphereRadius(Range);
|
break;
|
||||||
Damage += 1.0f;
|
case 7:
|
||||||
VisualEffectMeshComponent->SetWorldScale3D(VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
Range *= 1.2f;
|
||||||
break;
|
SphereComponent->SetSphereRadius(Range);
|
||||||
default:
|
Damage += 1.0f;
|
||||||
return false;
|
VisualEffectMeshComponent->SetWorldScale3D(
|
||||||
|
VisualEffectMeshComponent->GetComponentTransform().GetScale3D() * 1.2f);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetWeaponTimer();
|
ResetWeaponTimer();
|
||||||
|
@ -27,7 +27,8 @@ UCLASS()
|
|||||||
class VAMPIRES_API AGarlicWeapon : public AWeapon
|
class VAMPIRES_API AGarlicWeapon : public AWeapon
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
public:
|
|
||||||
|
protected:
|
||||||
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"), Category = "Weapon | Garlic")
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, meta = (AllowPrivateAccess = "true"), Category = "Weapon | Garlic")
|
||||||
TObjectPtr<USphereComponent> SphereComponent;
|
TObjectPtr<USphereComponent> SphereComponent;
|
||||||
|
|
||||||
@ -38,6 +39,7 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
float Range;
|
float Range;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AGarlicWeapon();
|
AGarlicWeapon();
|
||||||
|
|
||||||
@ -49,9 +51,9 @@ public:
|
|||||||
|
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void GarlicFireWeaponAction(FOverlappedEnemy EnemyCharacter);
|
void GarlicFireWeaponAction(FOverlappedEnemy EnemyCharacter);
|
||||||
|
|
||||||
virtual bool UpgradeWeapon_Implementation() override;
|
virtual bool UpgradeWeapon_Implementation() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
void OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
||||||
|
@ -29,7 +29,10 @@ void AGunWeapon::FireWeaponAction_Implementation()
|
|||||||
|
|
||||||
bool AGunWeapon::UpgradeWeapon_Implementation()
|
bool AGunWeapon::UpgradeWeapon_Implementation()
|
||||||
{
|
{
|
||||||
if (!Super::UpgradeWeapon_Implementation()) return false;
|
if (!Super::UpgradeWeapon_Implementation())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (CurrentLevel)
|
switch (CurrentLevel)
|
||||||
{
|
{
|
||||||
@ -67,11 +70,11 @@ void AGunWeapon::FireProjectile()
|
|||||||
{
|
{
|
||||||
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
||||||
{
|
{
|
||||||
AGameModeBase* gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
AGameModeBase* Gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
||||||
|
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(gamemode, UPools::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Gamemode, UPools::StaticClass()))
|
||||||
{
|
{
|
||||||
if (AObjectPoolManager* objectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(gamemode))
|
if (AObjectPoolManager* ObjectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(Gamemode))
|
||||||
{
|
{
|
||||||
FVector2d ViewportSize;
|
FVector2d ViewportSize;
|
||||||
GEngine->GameViewport->GetViewportSize(ViewportSize);
|
GEngine->GameViewport->GetViewportSize(ViewportSize);
|
||||||
@ -92,20 +95,20 @@ void AGunWeapon::FireProjectile()
|
|||||||
PlayerController->DeprojectScreenPositionToWorld(ViewportSize.X, ViewportSize.Y, BottomRight,
|
PlayerController->DeprojectScreenPositionToWorld(ViewportSize.X, ViewportSize.Y, BottomRight,
|
||||||
BottomRightDir);
|
BottomRightDir);
|
||||||
|
|
||||||
FVector actorLocation = GetActorLocation();
|
FVector ActorLocation = GetActorLocation();
|
||||||
TopLeft.Z = actorLocation.Z;
|
TopLeft.Z = ActorLocation.Z;
|
||||||
TopRight.Z = actorLocation.Z;
|
TopRight.Z = ActorLocation.Z;
|
||||||
BottomLeft.Z = actorLocation.Z;
|
BottomLeft.Z = ActorLocation.Z;
|
||||||
BottomRight.Z = actorLocation.Z;
|
BottomRight.Z = ActorLocation.Z;
|
||||||
|
|
||||||
AActor* projectile = objectPoolManager->GetObject();
|
AActor* projectile = ObjectPoolManager->GetObject();
|
||||||
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(actorLocation, TopLeft));
|
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(ActorLocation, TopLeft));
|
||||||
projectile = objectPoolManager->GetObject();
|
projectile = ObjectPoolManager->GetObject();
|
||||||
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(actorLocation, TopRight));
|
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(ActorLocation, TopRight));
|
||||||
projectile = objectPoolManager->GetObject();
|
projectile = ObjectPoolManager->GetObject();
|
||||||
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(actorLocation, BottomLeft));
|
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(ActorLocation, BottomLeft));
|
||||||
projectile = objectPoolManager->GetObject();
|
projectile = ObjectPoolManager->GetObject();
|
||||||
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(actorLocation, BottomRight));
|
SpawnProjectile(projectile, UKismetMathLibrary::GetDirectionUnitVector(ActorLocation, BottomRight));
|
||||||
|
|
||||||
Super::FireProjectile();
|
Super::FireProjectile();
|
||||||
}
|
}
|
||||||
@ -113,12 +116,12 @@ void AGunWeapon::FireProjectile()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AGunWeapon::SpawnProjectile(AActor* projectile, FVector direction)
|
void AGunWeapon::SpawnProjectile(AActor* Projectile, const FVector& Direction)
|
||||||
{
|
{
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(projectile, UProjectilable::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Projectile, UProjectilable::StaticClass()))
|
||||||
{
|
{
|
||||||
IProjectilable::Execute_LoadDataFromDataAsset(projectile, ProjectileTemplate);
|
IProjectilable::Execute_LoadDataFromDataAsset(Projectile, ProjectileTemplate);
|
||||||
projectile->SetOwner(this);
|
Projectile->SetOwner(this);
|
||||||
IProjectilable::Execute_SetTargetDirection(projectile, direction);
|
IProjectilable::Execute_SetTargetDirection(Projectile, Direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,5 +29,5 @@ protected:
|
|||||||
virtual void FireProjectile() override;
|
virtual void FireProjectile() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void SpawnProjectile(AActor* projectile, FVector direction);
|
void SpawnProjectile(AActor* Projectile, const FVector& Direction);
|
||||||
};
|
};
|
||||||
|
@ -27,37 +27,40 @@ void AKnifeWeapon::FireWeaponAction_Implementation()
|
|||||||
|
|
||||||
bool AKnifeWeapon::UpgradeWeapon_Implementation()
|
bool AKnifeWeapon::UpgradeWeapon_Implementation()
|
||||||
{
|
{
|
||||||
if (!Super::UpgradeWeapon_Implementation()) return false;
|
if (!Super::UpgradeWeapon_Implementation())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (CurrentLevel)
|
switch (CurrentLevel)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
Damage += 5.0f;
|
Damage += 5.0f;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
ProjectileTemplate->DamageableEnemies++;
|
ProjectileTemplate->DamageableEnemies++;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
Damage += 5.0f;
|
Damage += 5.0f;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
ProjectileTemplate->DamageableEnemies++;
|
ProjectileTemplate->DamageableEnemies++;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -67,24 +70,24 @@ void AKnifeWeapon::FireProjectile()
|
|||||||
{
|
{
|
||||||
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
||||||
{
|
{
|
||||||
AGameModeBase* gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
AGameModeBase* Gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
||||||
|
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(gamemode, UPools::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Gamemode, UPools::StaticClass()))
|
||||||
{
|
{
|
||||||
if (AObjectPoolManager* objectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(gamemode))
|
if (AObjectPoolManager* ObjectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(Gamemode))
|
||||||
{
|
{
|
||||||
AActor* projectile = objectPoolManager->GetObject();
|
AActor* Projectile = ObjectPoolManager->GetObject();
|
||||||
|
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(projectile, UProjectilable::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Projectile, UProjectilable::StaticClass()))
|
||||||
{
|
{
|
||||||
IProjectilable::Execute_LoadDataFromDataAsset(projectile, ProjectileTemplate);
|
IProjectilable::Execute_LoadDataFromDataAsset(Projectile, ProjectileTemplate);
|
||||||
projectile->SetOwner(this);
|
Projectile->SetOwner(this);
|
||||||
|
|
||||||
FVector direction = FVector(IInputable::Execute_Input_GetPreviousMovementDirection(GetOwner()),
|
FVector Direction = FVector(IInputable::Execute_Input_GetPreviousMovementDirection(GetOwner()),
|
||||||
0.0);
|
0.0);
|
||||||
direction.Normalize();
|
Direction.Normalize();
|
||||||
|
|
||||||
IProjectilable::Execute_SetTargetDirection(projectile, direction);
|
IProjectilable::Execute_SetTargetDirection(Projectile, Direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
Super::FireProjectile();
|
Super::FireProjectile();
|
||||||
|
@ -13,7 +13,7 @@ UCLASS()
|
|||||||
class VAMPIRES_API AKnifeWeapon : public AProjectileWeapon
|
class VAMPIRES_API AKnifeWeapon : public AProjectileWeapon
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AKnifeWeapon();
|
AKnifeWeapon();
|
||||||
|
|
||||||
|
@ -21,40 +21,40 @@ void ALightningRingWeapon::FireWeaponAction_Implementation()
|
|||||||
{
|
{
|
||||||
Super::FireWeaponAction_Implementation();
|
Super::FireWeaponAction_Implementation();
|
||||||
|
|
||||||
TArray<AActor*> targetableEnemies = OverlappedEnemies;
|
TArray<AActor*> TargetableEnemies = OverlappedEnemies;
|
||||||
|
|
||||||
for (int i = 0; i < LightningBolts && targetableEnemies.Num() > 0; i++)
|
for (int i = 0; i < LightningBolts && TargetableEnemies.Num() > 0; i++)
|
||||||
{
|
{
|
||||||
AActor* target = targetableEnemies[FMath::RandRange(0, targetableEnemies.Num() - 1)];
|
AActor* Target = TargetableEnemies[FMath::RandRange(0, TargetableEnemies.Num() - 1)];
|
||||||
|
|
||||||
TArray<TEnumAsByte<EObjectTypeQuery>> traceObjectTypes;
|
TArray<TEnumAsByte<EObjectTypeQuery>> traceObjectTypes;
|
||||||
traceObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECC_Pawn));
|
traceObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECC_Pawn));
|
||||||
|
|
||||||
TArray<AActor*> actorsToIgnore = TArray<AActor*>({GetOwner()});
|
TArray<AActor*> ActorsToIgnore = TArray<AActor*>({GetOwner()});
|
||||||
|
|
||||||
TArray<AActor*> hitResults;
|
TArray<AActor*> HitResults;
|
||||||
|
|
||||||
UKismetSystemLibrary::SphereOverlapActors(GetWorld(),
|
UKismetSystemLibrary::SphereOverlapActors(GetWorld(),
|
||||||
target->GetActorLocation(),
|
Target->GetActorLocation(),
|
||||||
LightingBoltRadius,
|
LightingBoltRadius,
|
||||||
traceObjectTypes,
|
traceObjectTypes,
|
||||||
AEnemyCharacter::StaticClass(),
|
AEnemyCharacter::StaticClass(),
|
||||||
actorsToIgnore,
|
ActorsToIgnore,
|
||||||
hitResults);
|
HitResults);
|
||||||
|
|
||||||
if (LightningEffectSystem)
|
if (LightningEffectSystem)
|
||||||
{
|
{
|
||||||
float scale = FMath::FloorToFloat((CurrentLevel + 2.0f) / 2.0f);
|
float Scale = FMath::FloorToFloat((CurrentLevel + 2.0f) / 2.0f);
|
||||||
UNiagaraFunctionLibrary::SpawnSystemAtLocation(this, LightningEffectSystem, target->GetActorLocation(),
|
UNiagaraFunctionLibrary::SpawnSystemAtLocation(this, LightningEffectSystem, Target->GetActorLocation(),
|
||||||
GetActorRotation(), FVector(scale));
|
GetActorRotation(), FVector(Scale));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (AActor* EnemyHitResult : hitResults)
|
for (AActor* EnemyHitResult : HitResults)
|
||||||
{
|
{
|
||||||
UGameplayStatics::ApplyDamage(EnemyHitResult, Damage, nullptr, this, nullptr);
|
UGameplayStatics::ApplyDamage(EnemyHitResult, Damage, nullptr, this, nullptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
targetableEnemies.Remove(target);
|
TargetableEnemies.Remove(Target);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ class VAMPIRES_API ALightningRingWeapon : public AWeapon
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
protected:
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon | Lightning Ring")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon | Lightning Ring")
|
||||||
int LightningBolts = 1;
|
int LightningBolts = 1;
|
||||||
|
|
||||||
@ -26,11 +26,9 @@ public:
|
|||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon | Lightning Ring")
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon | Lightning Ring")
|
||||||
TObjectPtr<UNiagaraSystem> LightningEffectSystem;
|
TObjectPtr<UNiagaraSystem> LightningEffectSystem;
|
||||||
|
|
||||||
public:
|
|
||||||
ALightningRingWeapon();
|
ALightningRingWeapon();
|
||||||
|
|
||||||
protected:
|
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -27,37 +27,40 @@ void AMagicWandWeapon::FireWeaponAction_Implementation()
|
|||||||
|
|
||||||
bool AMagicWandWeapon::UpgradeWeapon_Implementation()
|
bool AMagicWandWeapon::UpgradeWeapon_Implementation()
|
||||||
{
|
{
|
||||||
if (!Super::UpgradeWeapon_Implementation()) return false;
|
if (!Super::UpgradeWeapon_Implementation())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (CurrentLevel)
|
switch (CurrentLevel)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
WeaponCooldown -= 0.2;
|
WeaponCooldown -= 0.2;
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Damage += 10;
|
Damage += 10;
|
||||||
break;
|
break;
|
||||||
case 5:
|
case 5:
|
||||||
ProjectilesPerActivation++;
|
ProjectilesPerActivation++;
|
||||||
break;
|
break;
|
||||||
case 6:
|
case 6:
|
||||||
ProjectileTemplate->DamageableEnemies++;
|
ProjectileTemplate->DamageableEnemies++;
|
||||||
break;
|
break;
|
||||||
case 7:
|
case 7:
|
||||||
Damage += 10;
|
Damage += 10;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
ResetWeaponTimer();
|
ResetWeaponTimer();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -65,30 +68,29 @@ void AMagicWandWeapon::FireProjectile()
|
|||||||
{
|
{
|
||||||
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
if (ProjectileTemplate && OverlappedEnemies.Num() > 0)
|
||||||
{
|
{
|
||||||
float distance = 0.0f;
|
float Distance = 0.0f;
|
||||||
AActor* nearestActor = UGameplayStatics::FindNearestActor(GetActorLocation(), OverlappedEnemies, distance);
|
|
||||||
|
|
||||||
if (nearestActor)
|
if (AActor* nearestActor = UGameplayStatics::FindNearestActor(GetActorLocation(), OverlappedEnemies, Distance))
|
||||||
{
|
{
|
||||||
AGameModeBase* gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
AGameModeBase* Gamemode = UGameplayStatics::GetGameMode(GetWorld());
|
||||||
|
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(gamemode, UPools::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Gamemode, UPools::StaticClass()))
|
||||||
{
|
{
|
||||||
if (AObjectPoolManager* objectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(gamemode))
|
if (AObjectPoolManager* ObjectPoolManager = IPools::Execute_GetProjectileObjectPoolManager(Gamemode))
|
||||||
{
|
{
|
||||||
AActor* projectile = objectPoolManager->GetObject();
|
AActor* Projectile = ObjectPoolManager->GetObject();
|
||||||
|
|
||||||
if (UKismetSystemLibrary::DoesImplementInterface(projectile, UProjectilable::StaticClass()))
|
if (UKismetSystemLibrary::DoesImplementInterface(Projectile, UProjectilable::StaticClass()))
|
||||||
{
|
{
|
||||||
IProjectilable::Execute_LoadDataFromDataAsset(projectile, ProjectileTemplate);
|
IProjectilable::Execute_LoadDataFromDataAsset(Projectile, ProjectileTemplate);
|
||||||
projectile->SetOwner(this);
|
Projectile->SetOwner(this);
|
||||||
|
|
||||||
FVector direction = UKismetMathLibrary::GetDirectionUnitVector(
|
FVector Direction = UKismetMathLibrary::GetDirectionUnitVector(
|
||||||
GetActorLocation(), nearestActor->GetActorLocation());
|
GetActorLocation(), nearestActor->GetActorLocation());
|
||||||
direction.Z = 0.0;
|
Direction.Z = 0.0;
|
||||||
direction.Normalize();
|
Direction.Normalize();
|
||||||
|
|
||||||
IProjectilable::Execute_SetTargetDirection(projectile, direction);
|
IProjectilable::Execute_SetTargetDirection(Projectile, Direction);
|
||||||
}
|
}
|
||||||
|
|
||||||
Super::FireProjectile();
|
Super::FireProjectile();
|
||||||
|
@ -25,6 +25,6 @@ public:
|
|||||||
|
|
||||||
virtual bool UpgradeWeapon_Implementation() override;
|
virtual bool UpgradeWeapon_Implementation() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void FireProjectile() override;
|
virtual void FireProjectile() override;
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,7 @@ APentagramWeapon::APentagramWeapon()
|
|||||||
BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("Sphere Component"));
|
BoxComponent = CreateDefaultSubobject<UBoxComponent>(TEXT("Sphere Component"));
|
||||||
BoxComponent->SetupAttachment(RootComponent);
|
BoxComponent->SetupAttachment(RootComponent);
|
||||||
BoxComponent->SetCollisionProfileName(TEXT("Weapon"));
|
BoxComponent->SetCollisionProfileName(TEXT("Weapon"));
|
||||||
|
|
||||||
WeaponCooldown = 90.0f;
|
WeaponCooldown = 90.0f;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +36,10 @@ void APentagramWeapon::FireWeaponAction_Implementation()
|
|||||||
|
|
||||||
bool APentagramWeapon::UpgradeWeapon_Implementation()
|
bool APentagramWeapon::UpgradeWeapon_Implementation()
|
||||||
{
|
{
|
||||||
if (!Super::UpgradeWeapon_Implementation()) return false;
|
if (!Super::UpgradeWeapon_Implementation())
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
switch (CurrentLevel)
|
switch (CurrentLevel)
|
||||||
{
|
{
|
||||||
@ -66,25 +69,27 @@ bool APentagramWeapon::UpgradeWeapon_Implementation()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ResetWeaponTimer();
|
ResetWeaponTimer();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void APentagramWeapon::OnWeaponBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
void APentagramWeapon::OnWeaponBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
||||||
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult)
|
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
|
||||||
|
const FHitResult& SweepResult)
|
||||||
{
|
{
|
||||||
if (APickup* Pickup = Cast<APickup>(OtherActor))
|
if (APickup* Pickup = Cast<APickup>(OtherActor))
|
||||||
{
|
{
|
||||||
OverlappedPickups.Add(Pickup);
|
OverlappedPickups.Add(Pickup);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Super::OnWeaponBeginOverlap(OverlappedComponent, OtherActor, OtherComp, OtherBodyIndex, bFromSweep, SweepResult);
|
Super::OnWeaponBeginOverlap(OverlappedComponent, OtherActor, OtherComp, OtherBodyIndex, bFromSweep,
|
||||||
}
|
SweepResult);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void APentagramWeapon::OnWeaponEndOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor,
|
void APentagramWeapon::OnWeaponEndOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor,
|
||||||
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
|
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex)
|
||||||
{
|
{
|
||||||
if (APickup* Pickup = Cast<APickup>(OtherActor))
|
if (APickup* Pickup = Cast<APickup>(OtherActor))
|
||||||
{
|
{
|
||||||
|
@ -17,19 +17,19 @@ class VAMPIRES_API APentagramWeapon : public AWeapon
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
private:
|
|
||||||
TArray<TObjectPtr<APickup>> OverlappedPickups = TArray<TObjectPtr<APickup>>();
|
TArray<TObjectPtr<APickup>> OverlappedPickups = TArray<TObjectPtr<APickup>>();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
APentagramWeapon();
|
APentagramWeapon();
|
||||||
|
|
||||||
virtual void FireWeaponAction_Implementation() override;
|
virtual void FireWeaponAction_Implementation() override;
|
||||||
|
|
||||||
bool UpgradeWeapon_Implementation() override;
|
virtual bool UpgradeWeapon_Implementation() override;
|
||||||
|
|
||||||
virtual void OnWeaponBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
virtual void OnWeaponBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor,
|
||||||
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult) override;
|
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep,
|
||||||
|
const FHitResult& SweepResult) override;
|
||||||
|
|
||||||
virtual void OnWeaponEndOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor,
|
virtual void OnWeaponEndOverlap(UPrimitiveComponent* OverlappedComp, AActor* OtherActor,
|
||||||
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex) override;
|
UPrimitiveComponent* OtherComp, int32 OtherBodyIndex) override;
|
||||||
};
|
};
|
||||||
|
@ -47,12 +47,12 @@ void ASwarmAgent::OnSwarmAgentBeginOverlap(UPrimitiveComponent* OverlappedCompon
|
|||||||
|
|
||||||
if (!EnemyHealthComponent->GetIsDead())
|
if (!EnemyHealthComponent->GetIsDead())
|
||||||
{
|
{
|
||||||
if (AWeapon* ownerWeapon = Cast<AWeapon>(GetOwner()))
|
if (AWeapon* OwnerWeapon = Cast<AWeapon>(GetOwner()))
|
||||||
{
|
{
|
||||||
if (AVampireCharacter* character = Cast<AVampireCharacter>(ownerWeapon->GetOwner()))
|
if (AVampireCharacter* Character = Cast<AVampireCharacter>(OwnerWeapon->GetOwner()))
|
||||||
{
|
{
|
||||||
AController* ownerController = character->GetController();
|
AController* OwnerController = Character->GetController();
|
||||||
EnemyHealthComponent->TakeDamage(Enemy, ownerWeapon->GetDamage(), nullptr, ownerController, this);
|
EnemyHealthComponent->TakeDamage(Enemy, OwnerWeapon->GetDamage(), nullptr, OwnerController, this);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ class VAMPIRES_API ASwarmAgent : public AActor
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
protected:
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||||
TObjectPtr<USphereComponent> SphereComponent = nullptr;
|
TObjectPtr<USphereComponent> SphereComponent = nullptr;
|
||||||
|
|
||||||
@ -27,7 +27,6 @@ public:
|
|||||||
// Sets default values for this actor's properties
|
// Sets default values for this actor's properties
|
||||||
ASwarmAgent();
|
ASwarmAgent();
|
||||||
|
|
||||||
protected:
|
|
||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
virtual void BeginPlay() override;
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ void ASwarmWeapon::BeginPlay()
|
|||||||
TimelineComponent->PlayFromStart();
|
TimelineComponent->PlayFromStart();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ASwarmWeapon::TimelineCallback(float val)
|
void ASwarmWeapon::TimelineCallback(float Val)
|
||||||
{
|
{
|
||||||
float num = SwarmActors.Num();
|
float num = SwarmActors.Num();
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ void ASwarmWeapon::TimelineCallback(float val)
|
|||||||
float offset = (actorIndex / num) * 360.0f;
|
float offset = (actorIndex / num) * 360.0f;
|
||||||
FVector CenterLocation = GetActorLocation();
|
FVector CenterLocation = GetActorLocation();
|
||||||
FVector Direction = FVector(0.0, 1, 0.0);
|
FVector Direction = FVector(0.0, 1, 0.0);
|
||||||
FVector RotatedDirection = Direction.RotateAngleAxis(val * 360.0f + offset, FVector(0.0f, 0.0f, 1.0f));
|
FVector RotatedDirection = Direction.RotateAngleAxis(Val * 360.0f + offset, FVector(0.0f, 0.0f, 1.0f));
|
||||||
FVector NewLocation = CenterLocation + (RotatedDirection * Distance);
|
FVector NewLocation = CenterLocation + (RotatedDirection * Distance);
|
||||||
NewLocation.Z = 190.0f;
|
NewLocation.Z = 190.0f;
|
||||||
SwarmActors[i]->SetActorLocation(NewLocation);
|
SwarmActors[i]->SetActorLocation(NewLocation);
|
||||||
|
@ -14,20 +14,20 @@ class VAMPIRES_API ASwarmWeapon : public AWeapon
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
public:
|
protected:
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Weapon | Swarm")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Weapon | Swarm")
|
||||||
TObjectPtr<UTimelineComponent> TimelineComponent = nullptr;
|
TObjectPtr<UTimelineComponent> TimelineComponent = nullptr;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon | Swarm")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon | Swarm")
|
||||||
TObjectPtr<UCurveFloat> SwarmCurve;
|
TObjectPtr<UCurveFloat> SwarmCurve;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon | Swarm")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon | Swarm")
|
||||||
float TimelinePlayRate = 1;
|
float TimelinePlayRate = 1;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon | Swarm")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon | Swarm")
|
||||||
TSubclassOf<ASwarmAgent> SwarmActor;
|
TSubclassOf<ASwarmAgent> SwarmActor;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Weapon | Swarm")
|
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = "Weapon | Swarm")
|
||||||
float Distance = 250.0f;
|
float Distance = 250.0f;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -45,7 +45,7 @@ protected:
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
UFUNCTION()
|
UFUNCTION()
|
||||||
void TimelineCallback(float val);
|
void TimelineCallback(float Val);
|
||||||
|
|
||||||
virtual bool UpgradeWeapon_Implementation() override;
|
virtual bool UpgradeWeapon_Implementation() override;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user