Added too much to list

main
Jers 9 months ago
parent db8e33edb3
commit be63f6c7e3

@ -63,9 +63,9 @@ VerticalDeviationFromGroundCompensation=0.000000
bForceRebuildOnLoad=True bForceRebuildOnLoad=True
[/Script/Engine.RendererSettings] [/Script/Engine.RendererSettings]
r.ReflectionMethod=1 r.ReflectionMethod=2
r.GenerateMeshDistanceFields=True r.GenerateMeshDistanceFields=True
r.DynamicGlobalIlluminationMethod=1 r.DynamicGlobalIlluminationMethod=2
r.Shadow.Virtual.Enable=1 r.Shadow.Virtual.Enable=1
r.Mobile.EnableNoPrecomputedLightingCSMShader=1 r.Mobile.EnableNoPrecomputedLightingCSMShader=1
r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=True
@ -74,6 +74,9 @@ r.DefaultFeature.AutoExposure.ExtendDefaultLuminanceRange=true
r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8 r.DefaultFeature.LocalExposure.HighlightContrastScale=0.8
r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8 r.DefaultFeature.LocalExposure.ShadowContrastScale=0.8
r.Nanite.ProjectEnabled=True
r.DefaultFeature.AutoExposure.Method=1
r.MSAACount=2
[/Script/WindowsTargetPlatform.WindowsTargetSettings] [/Script/WindowsTargetPlatform.WindowsTargetSettings]
DefaultGraphicsRHI=DefaultGraphicsRHI_DX12 DefaultGraphicsRHI=DefaultGraphicsRHI_DX12

@ -3,7 +3,9 @@ ProjectID=AB2871804EAE2524B4D807BF7C9A9978
ProjectName=Top Down BP Game Template ProjectName=Top Down BP Game Template
CopyrightNotice=Copyright Zelle Games CopyrightNotice=Copyright Zelle Games
LicensingTerms=No LIcense Available LicensingTerms=No LIcense Available
ProjectDisplayedTitle=NSLOCTEXT("[/Script/EngineSettings]", "EA4851D343916F753F6F739E5354CE05", "GutterPunkz")
[/Script/UnrealEd.ProjectPackagingSettings] [/Script/UnrealEd.ProjectPackagingSettings]
IncludeDebugFiles=False IncludeDebugFiles=False
bUseZenStore=False

BIN
Content/Audio/arggh.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Audio/argh.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Audio/croak.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Audio/oofwav.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Audio/oogh.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Audio/ouch.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/Audio/ugh.uasset (Stored with Git LFS)

Binary file not shown.

BIN
Content/BattleMap.umap (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

BIN
Content/Characters/McKee/mckee.uasset (Stored with Git LFS)

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -54,6 +54,6 @@ void ABasicProjectile::OnSphereOverlap(UPrimitiveComponent* OverlappedComponent,
DamageEvent.ShotDirection = UnitDirection; DamageEvent.ShotDirection = UnitDirection;
DamageEvent.Damage = Damage; DamageEvent.Damage = Damage;
OtherActor->TakeDamage(Damage, DamageEvent, nullptr, this); OtherActor->TakeDamage(Damage, DamageEvent, OwningController, this);
Destroy(); Destroy();
} }

@ -87,6 +87,7 @@ void ASPGameState::StartLevel(FLevelSetup InLevelSetup)
PCUnit->Cooldown = 1 / StatsSystem->AttackSpeed; PCUnit->Cooldown = 1 / StatsSystem->AttackSpeed;
PCUnit->CooldownTimer = PCUnit->Cooldown; PCUnit->CooldownTimer = PCUnit->Cooldown;
PCUnit->Dexterity = StatsSystem->Dexterity; PCUnit->Dexterity = StatsSystem->Dexterity;
PCUnit->ApplyStats();
Cast<AAIController>(PCUnit->GetController())->MoveToLocation(LevelSetup.RunupPoint); Cast<AAIController>(PCUnit->GetController())->MoveToLocation(LevelSetup.RunupPoint);

@ -42,6 +42,7 @@ AUnit::AUnit()
void AUnit::BeginPlay() void AUnit::BeginPlay()
{ {
Super::BeginPlay(); Super::BeginPlay();
ApplyStats();
DamageNumbersOriginalPosition = DamageNumberWidget->GetRelativeLocation(); DamageNumbersOriginalPosition = DamageNumberWidget->GetRelativeLocation();
} }
@ -107,6 +108,7 @@ void AUnit::LaunchProjectileSignal()
ABasicProjectile* AsProjectile = Cast<ABasicProjectile>(NewProjectile); ABasicProjectile* AsProjectile = Cast<ABasicProjectile>(NewProjectile);
NewProjectile->SetLifeSpan(5.0f); NewProjectile->SetLifeSpan(5.0f);
AsProjectile->Damage = Attack; AsProjectile->Damage = Attack;
AsProjectile->OwningController = GetController();
if(ActorHasTag("Enemy")) if(ActorHasTag("Enemy"))
{ {
AsProjectile->SphereComponent->SetCollisionProfileName("EnemyProjectile"); AsProjectile->SphereComponent->SetCollisionProfileName("EnemyProjectile");
@ -130,6 +132,11 @@ void AUnit::SetTarget(AUnit* InTarget)
AUnit* AUnit::FindNearestEnemy() AUnit* AUnit::FindNearestEnemy()
{ {
if(TargetUnit && !TargetUnit->IsDead() && FVector::Distance(GetActorLocation(), TargetUnit->GetActorLocation()) <= Range + 300)
{
return TargetUnit;
}
const bool IsEnemy = ActorHasTag("Enemy"); const bool IsEnemy = ActorHasTag("Enemy");
const FName TagToSearch = IsEnemy ? "Player" : "Enemy"; const FName TagToSearch = IsEnemy ? "Player" : "Enemy";
@ -162,6 +169,18 @@ AUnit* AUnit::FindNearestEnemy()
float AUnit::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator, float AUnit::TakeDamage(float DamageAmount, FDamageEvent const& DamageEvent, AController* EventInstigator,
AActor* DamageCauser) AActor* DamageCauser)
{ {
AUnit* Attacker = Cast<AUnit>(EventInstigator->GetPawn());
if(Attacker)
{
float DodgeChance = 0.05 + (Dexterity * 0.008f) - (Attacker->Dexterity * 0.008f);
float DodgeRoll = FMath::RandRange(0.0f, 1.0f);
if(DodgeRoll <= DodgeChance)
{
EventMiss();
return 0;
}
}
FVector HitFromDirection = GetActorLocation() - DamageCauser->GetActorLocation(); FVector HitFromDirection = GetActorLocation() - DamageCauser->GetActorLocation();
HitFromDirection.Z = 0; HitFromDirection.Z = 0;
HitFromDirection.Normalize(); HitFromDirection.Normalize();
@ -180,6 +199,12 @@ bool AUnit::IsDead() const
return HP <= 0; return HP <= 0;
} }
void AUnit::ApplyStats()
{
GetCharacterMovement()->RotationRate.Yaw = 180 + Dexterity * 2;
GetCharacterMovement()->MaxWalkSpeed = 600 + Dexterity * 15;
}
void AUnit::HideDamageNumbers() const void AUnit::HideDamageNumbers() const
{ {
DamageNumberWidget->SetVisibility(false, true); DamageNumberWidget->SetVisibility(false, true);

@ -28,6 +28,9 @@ public:
UPROPERTY(BlueprintReadWrite, EditAnywhere) UPROPERTY(BlueprintReadWrite, EditAnywhere)
UProjectileMovementComponent* ProjectileMovementComponent; UProjectileMovementComponent* ProjectileMovementComponent;
UPROPERTY(BlueprintReadWrite, EditAnywhere)
AController* OwningController;
protected: protected:
// Called when the game starts or when spawned // Called when the game starts or when spawned

@ -117,6 +117,12 @@ public:
UFUNCTION(BlueprintCallable) UFUNCTION(BlueprintCallable)
bool IsDead() const; bool IsDead() const;
UFUNCTION(BlueprintImplementableEvent)
void EventMiss();
UFUNCTION()
void ApplyStats();
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;
void HideDamageNumbers() const; void HideDamageNumbers() const;

Loading…
Cancel
Save