parent
bb3f9f8e7d
commit
652d630ccb
Binary file not shown.
Binary file not shown.
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Meshes/AnimBP_Khaimera_Rigging.uasset (Stored with Git LFS)
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Meshes/AnimBP_Khaimera_Rigging.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Meshes/Khaimera.uasset (Stored with Git LFS)
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Meshes/Khaimera.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Meshes/Khaimera_Skeleton.uasset (Stored with Git LFS)
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Meshes/Khaimera_Skeleton.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Skins/Tier1/CS_Snake/Mesh/Khaimera_Snakekiller.uasset (Stored with Git LFS)
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Skins/Tier1/CS_Snake/Mesh/Khaimera_Snakekiller.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Skins/Tier1/T1_Bengal/Mesh/Khaimera_Bengal.uasset (Stored with Git LFS)
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Skins/Tier1/T1_Bengal/Mesh/Khaimera_Bengal.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Skins/Tier2/GruxPelt/Meshes/Khaimera_GruxPelt.uasset (Stored with Git LFS)
BIN
Content/ParagonKhaimera/Characters/Heroes/Khaimera/Skins/Tier2/GruxPelt/Meshes/Khaimera_GruxPelt.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyBeetleMoltenBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyBeetleMoltenBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyBeetleRedBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyBeetleRedBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyChestPlateBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyChestPlateBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyGruxBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyGruxBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyGruxBeetleMoltenBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyGruxBeetleMoltenBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyGruxBeetleRedBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyGruxBeetleRedBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyGruxChestPlateBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyGruxChestPlateBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyGruxHalloweenBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyGruxHalloweenBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyGruxQilinBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyGruxQilinBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyGruxWarChiefBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyGruxWarChiefBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyHalloweenBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyHalloweenBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/EnemyWarChiefBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/EnemyWarChiefBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/Animations/EnemyAttack.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/Animations/EnemyAttack.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/Animations/EnemyDeath.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/Animations/EnemyDeath.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/Animations/EnemyHit.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/Animations/EnemyHit.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/EnemyGruxBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/EnemyGruxBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/EnemyGruxBeetleMoltenBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/EnemyGruxBeetleMoltenBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/EnemyGruxBeetleRedBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/EnemyGruxBeetleRedBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/EnemyGruxChestPlateBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/EnemyGruxChestPlateBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/EnemyGruxHalloweenBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/EnemyGruxHalloweenBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/EnemyGruxQilinBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/EnemyGruxQilinBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/EnemyGruxWarChiefBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/EnemyGruxWarChiefBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/Grux/GruxAnimBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Grux/GruxAnimBP.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Enemies/GruxAnimBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/GruxAnimBP.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/Animations/HitReact_Front.uasset (Stored with Git LFS)
Normal file
BIN
Content/_Game/Enemies/Khaimera/Animations/HitReact_Front.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/Animations/KhaimeraAttack.uasset (Stored with Git LFS)
Normal file
BIN
Content/_Game/Enemies/Khaimera/Animations/KhaimeraAttack.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/Animations/KhaimeraDeath.uasset (Stored with Git LFS)
Normal file
BIN
Content/_Game/Enemies/Khaimera/Animations/KhaimeraDeath.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/Animations/Khaimera_Idle2Run.uasset (Stored with Git LFS)
Normal file
BIN
Content/_Game/Enemies/Khaimera/Animations/Khaimera_Idle2Run.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraBP.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraHalloweenBP.uasset (Stored with Git LFS)
Normal file
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraHalloweenBP.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraSnakeKillerBP.uasset (Stored with Git LFS)
Normal file
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraSnakeKillerBP.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraWhiteTigerBP.uasset (Stored with Git LFS)
Normal file
BIN
Content/_Game/Enemies/Khaimera/EnemyKhaimeraWhiteTigerBP.uasset (Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Enemies/Khaimera/testmontage.uasset (Stored with Git LFS)
BIN
Content/_Game/Enemies/Khaimera/testmontage.uasset (Stored with Git LFS)
Binary file not shown.
BIN
Content/_Game/Explosives/ExplosiveBP.uasset (Stored with Git LFS)
BIN
Content/_Game/Explosives/ExplosiveBP.uasset (Stored with Git LFS)
Binary file not shown.
Binary file not shown.
BIN
Content/_Game/Maps/DefaultMap.umap (Stored with Git LFS)
BIN
Content/_Game/Maps/DefaultMap.umap (Stored with Git LFS)
Binary file not shown.
|
@ -24,5 +24,5 @@ class SHOOTER_API IBulletHitInterface
|
||||||
public:
|
public:
|
||||||
|
|
||||||
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
UFUNCTION(BlueprintNativeEvent, BlueprintCallable)
|
||||||
void BulletHit(FHitResult HitResult);
|
void BulletHit(FHitResult HitResult, AActor* Shooter, AController* ShooterController);
|
||||||
};
|
};
|
||||||
|
|
|
@ -209,6 +209,8 @@ void AEnemy::AgroSphereOverlap(UPrimitiveComponent* OverlappedComponent, AActor*
|
||||||
if (!Character) return;
|
if (!Character) return;
|
||||||
|
|
||||||
// Set the value of the Target blackboard key
|
// Set the value of the Target blackboard key
|
||||||
|
if (!EnemyController) return;
|
||||||
|
if (!EnemyController->GetBlackboardComponent()) return;
|
||||||
EnemyController->GetBlackboardComponent()->SetValueAsObject(TEXT("Target"), Character);
|
EnemyController->GetBlackboardComponent()->SetValueAsObject(TEXT("Target"), Character);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -385,7 +387,7 @@ void AEnemy::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AEnemy::BulletHit_Implementation(FHitResult HitResult)
|
void AEnemy::BulletHit_Implementation(FHitResult HitResult, AActor* Shooter, AController* ShooterController)
|
||||||
{
|
{
|
||||||
if (ImpactSound)
|
if (ImpactSound)
|
||||||
{
|
{
|
||||||
|
@ -396,19 +398,6 @@ void AEnemy::BulletHit_Implementation(FHitResult HitResult)
|
||||||
{
|
{
|
||||||
UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ImpactParticles, HitResult.Location, FRotator(0.f), true);
|
UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ImpactParticles, HitResult.Location, FRotator(0.f), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (bDying) return;
|
|
||||||
|
|
||||||
ShowHealthBar();
|
|
||||||
|
|
||||||
// Determine whether bullet hit stuns
|
|
||||||
const float Stunned = FMath::FRandRange(0.f, 1.f);
|
|
||||||
if (Stunned <= StunChance)
|
|
||||||
{
|
|
||||||
// Stun the Enemy
|
|
||||||
PlayHitMontage(FName("HitReactFront"));
|
|
||||||
SetStunned(true);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
float AEnemy::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator,
|
float AEnemy::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator,
|
||||||
|
@ -431,6 +420,20 @@ float AEnemy::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AC
|
||||||
{
|
{
|
||||||
Health -= DamageAmount;
|
Health -= DamageAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (bDying) return DamageInflicted;
|
||||||
|
|
||||||
|
ShowHealthBar();
|
||||||
|
|
||||||
|
// Determine whether bullet hit stuns
|
||||||
|
const float Stunned = FMath::FRandRange(0.f, 1.f);
|
||||||
|
if (Stunned <= StunChance)
|
||||||
|
{
|
||||||
|
// Stun the Enemy
|
||||||
|
PlayHitMontage(FName("HitReactFront"));
|
||||||
|
SetStunned(true);
|
||||||
|
}
|
||||||
|
|
||||||
return DamageInflicted;
|
return DamageInflicted;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -249,7 +249,7 @@ public:
|
||||||
// Called to bind functionality to input
|
// Called to bind functionality to input
|
||||||
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||||
|
|
||||||
virtual void BulletHit_Implementation(FHitResult HitResult) override;
|
virtual void BulletHit_Implementation(FHitResult HitResult, AActor* Shooter, AController* ShooterController) override;
|
||||||
|
|
||||||
virtual float TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override;
|
virtual float TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, AActor* DamageCauser) override;
|
||||||
|
|
||||||
|
|
|
@ -2,16 +2,25 @@
|
||||||
|
|
||||||
|
|
||||||
#include "Explosive.h"
|
#include "Explosive.h"
|
||||||
|
|
||||||
|
#include "Components/SphereComponent.h"
|
||||||
|
#include "GameFramework/Character.h"
|
||||||
#include "Kismet/GameplayStatics.h"
|
#include "Kismet/GameplayStatics.h"
|
||||||
#include "Sound/SoundCue.h"
|
#include "Sound/SoundCue.h"
|
||||||
#include "Particles/ParticleSystemComponent.h"
|
#include "Particles/ParticleSystemComponent.h"
|
||||||
|
|
||||||
// Sets default values
|
// Sets default values
|
||||||
AExplosive::AExplosive()
|
AExplosive::AExplosive() :
|
||||||
|
Damage(40.f)
|
||||||
{
|
{
|
||||||
// Set this actor to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
// 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;
|
PrimaryActorTick.bCanEverTick = true;
|
||||||
|
|
||||||
|
ExplosiveMesh = CreateDefaultSubobject<UStaticMeshComponent>(TEXT("ExplosiveMesh"));
|
||||||
|
SetRootComponent(ExplosiveMesh);
|
||||||
|
|
||||||
|
OverlapSphere = CreateDefaultSubobject<USphereComponent>(TEXT("OverlapSphere"));
|
||||||
|
OverlapSphere->SetupAttachment(GetRootComponent());
|
||||||
}
|
}
|
||||||
|
|
||||||
// Called when the game starts or when spawned
|
// Called when the game starts or when spawned
|
||||||
|
@ -28,7 +37,7 @@ void AExplosive::Tick(float DeltaTime)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AExplosive::BulletHit_Implementation(FHitResult HitResult)
|
void AExplosive::BulletHit_Implementation(FHitResult HitResult, AActor* Shooter, AController* ShooterController)
|
||||||
{
|
{
|
||||||
if (ExplosionSound)
|
if (ExplosionSound)
|
||||||
{
|
{
|
||||||
|
@ -40,7 +49,14 @@ void AExplosive::BulletHit_Implementation(FHitResult HitResult)
|
||||||
UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ExplosionParticles, HitResult.Location, FRotator(0.f), true);
|
UGameplayStatics::SpawnEmitterAtLocation(GetWorld(), ExplosionParticles, HitResult.Location, FRotator(0.f), true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Apply explosive damage
|
// Apply explosive damage
|
||||||
|
TArray<AActor*> OverlappingActors;
|
||||||
|
GetOverlappingActors(OverlappingActors, ACharacter::StaticClass());
|
||||||
|
|
||||||
|
for (auto Actor : OverlappingActors)
|
||||||
|
{
|
||||||
|
UGameplayStatics::ApplyDamage(Actor, Damage, ShooterController, Shooter, UDamageType::StaticClass());
|
||||||
|
}
|
||||||
|
|
||||||
Destroy();
|
Destroy();
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
|
|
||||||
class UParticleSystem;
|
class UParticleSystem;
|
||||||
class USoundCue;
|
class USoundCue;
|
||||||
|
class USphereComponent;
|
||||||
|
class UStaticMeshComponent;
|
||||||
|
|
||||||
UCLASS()
|
UCLASS()
|
||||||
class SHOOTER_API AExplosive : public AActor, public IBulletHitInterface
|
class SHOOTER_API AExplosive : public AActor, public IBulletHitInterface
|
||||||
|
@ -33,9 +35,20 @@ private:
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
||||||
USoundCue* ExplosionSound;
|
USoundCue* ExplosionSound;
|
||||||
|
|
||||||
|
/** Mesh for the explosive */
|
||||||
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Combat, meta = (AllowPrivateAccess = true))
|
||||||
|
UStaticMeshComponent* ExplosiveMesh;
|
||||||
|
|
||||||
|
/** Used to determine what actors overlap during explosion */
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
||||||
|
USphereComponent* OverlapSphere;
|
||||||
|
|
||||||
|
/** Damage amount for explosive */
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Combat, meta = (AllowPrivateAccess = true))
|
||||||
|
float Damage;
|
||||||
public:
|
public:
|
||||||
// Called every frame
|
// Called every frame
|
||||||
virtual void Tick(float DeltaTime) override;
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
|
||||||
virtual void BulletHit_Implementation(FHitResult HitResult) override;
|
virtual void BulletHit_Implementation(FHitResult HitResult, AActor* Shooter, AController* ShooterController) override;
|
||||||
};
|
};
|
||||||
|
|
|
@ -766,7 +766,7 @@ void AShooterCharacter::SendBullet()
|
||||||
{
|
{
|
||||||
if (IBulletHitInterface* BulletHitInterface = Cast<IBulletHitInterface>(BeamHitResult.GetActor()))
|
if (IBulletHitInterface* BulletHitInterface = Cast<IBulletHitInterface>(BeamHitResult.GetActor()))
|
||||||
{
|
{
|
||||||
BulletHitInterface->BulletHit_Implementation(BeamHitResult);
|
BulletHitInterface->BulletHit_Implementation(BeamHitResult, this, GetController());
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue