Merge branch 'SJW1024' into develop
# Conflicts: # Content/Maps/DevMap.umap
This commit is contained in:
BIN
Content/Character/Allium/BP_Allium.uasset
(Stored with Git LFS)
BIN
Content/Character/Allium/BP_Allium.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Character/BP_Folder/BP_DefaultPlayerCharacter.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Character/BP_Folder/DefaultClass.uasset
(Stored with Git LFS)
BIN
Content/Character/BP_Folder/DefaultClass.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Lb/Animation/ABP_Lb.uasset
(Stored with Git LFS)
BIN
Content/Character/Lb/Animation/ABP_Lb.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Lb/Animation/R1_Anim.uasset
(Stored with Git LFS)
BIN
Content/Character/Lb/Animation/R1_Anim.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Lb/Animation/R2_Anim.uasset
(Stored with Git LFS)
BIN
Content/Character/Lb/Animation/R2_Anim.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset
(Stored with Git LFS)
BIN
Content/Character/Lb/Animation/Treasure_Attack1_Anim.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Lb/BP_Lb.uasset
(Stored with Git LFS)
BIN
Content/Character/Lb/BP_Lb.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Lb/EskillBuff.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Character/Lb/EskillBuff.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Character/Lb/LB_Bolla_Throw.uasset
(Stored with Git LFS)
BIN
Content/Character/Lb/LB_Bolla_Throw.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Riana/Animation/ABP_Riana.uasset
(Stored with Git LFS)
Normal file
BIN
Content/Character/Riana/Animation/ABP_Riana.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Character/Riana/Animation/Skill3_Anim.uasset
(Stored with Git LFS)
BIN
Content/Character/Riana/Animation/Skill3_Anim.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Riana/Animation/Skill4_3_Anim.uasset
(Stored with Git LFS)
BIN
Content/Character/Riana/Animation/Skill4_3_Anim.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Character/Riana/BP_Riana.uasset
(Stored with Git LFS)
BIN
Content/Character/Riana/BP_Riana.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Effect/ETC/Burning.uasset
(Stored with Git LFS)
BIN
Content/Effect/ETC/Burning.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Effect/LB/Arrow/Arrow_Flash.uasset
(Stored with Git LFS)
BIN
Content/Effect/LB/Arrow/Arrow_Flash.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/Effect/LB/LB_Sprint.uasset
(Stored with Git LFS)
BIN
Content/Effect/LB/LB_Sprint.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/InputActions/InputMappingContext.uasset
(Stored with Git LFS)
BIN
Content/InputActions/InputMappingContext.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/InputActions/ObjectSelect.uasset
(Stored with Git LFS)
BIN
Content/InputActions/ObjectSelect.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/InputActions/Skill4.uasset
(Stored with Git LFS)
BIN
Content/InputActions/Skill4.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/InputActions/Skill4_End.uasset
(Stored with Git LFS)
Normal file
BIN
Content/InputActions/Skill4_End.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/Maps/Untitled.umap
(Stored with Git LFS)
BIN
Content/Maps/Untitled.umap
(Stored with Git LFS)
Binary file not shown.
BIN
Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/StarterContent/Materials/M_Basic_Floor.uasset
(Stored with Git LFS)
BIN
Content/StarterContent/Materials/M_Basic_Floor.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/StarterContent/Particles/Materials/M_Radial_Gradient.uasset
(Stored with Git LFS)
BIN
Content/StarterContent/Particles/Materials/M_Radial_Gradient.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/StarterContent/Particles/Materials/M_radial_ramp.uasset
(Stored with Git LFS)
BIN
Content/StarterContent/Particles/Materials/M_radial_ramp.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/StarterContent/Particles/Materials/m_flare_01.uasset
(Stored with Git LFS)
BIN
Content/StarterContent/Particles/Materials/m_flare_01.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
Content/UI/NameBar_UI/Hp_UI.uasset
(Stored with Git LFS)
Normal file
BIN
Content/UI/NameBar_UI/Hp_UI.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
Content/UI/NameBar_UI/NameBar_UI.uasset
(Stored with Git LFS)
Normal file
BIN
Content/UI/NameBar_UI/NameBar_UI.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
14
Source/Promether/AnimNotify/AN_Skill4_End.cpp
Normal file
14
Source/Promether/AnimNotify/AN_Skill4_End.cpp
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "AN_Skill4_End.h"
|
||||||
|
|
||||||
|
#include "../PlayerGeneric/DefaultPlayerCharacter.h"
|
||||||
|
|
||||||
|
void UAN_Skill4_End::Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference)
|
||||||
|
{
|
||||||
|
ADefaultPlayerCharacter* MyCharacter = MeshComp->GetOwner<ADefaultPlayerCharacter>();
|
||||||
|
if (!MyCharacter) return;
|
||||||
|
|
||||||
|
MyCharacter->Skill4_End();
|
||||||
|
}
|
||||||
19
Source/Promether/AnimNotify/AN_Skill4_End.h
Normal file
19
Source/Promether/AnimNotify/AN_Skill4_End.h
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "Animation/AnimNotifies/AnimNotify.h"
|
||||||
|
#include "AN_Skill4_End.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class PROMETHER_API UAN_Skill4_End : public UAnimNotify
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Notify(USkeletalMeshComponent* MeshComp, UAnimSequenceBase* Animation, const FAnimNotifyEventReference& EventReference) override;
|
||||||
|
};
|
||||||
@@ -133,7 +133,7 @@ FString ADeathmatch::InitNewPlayer(APlayerController* NewPlayerController, const
|
|||||||
//DebugPerpose
|
//DebugPerpose
|
||||||
if (Type == CharacterType::Lukriel)
|
if (Type == CharacterType::Lukriel)
|
||||||
{
|
{
|
||||||
Type = CharacterType::Allium;
|
Type = CharacterType::Lb;
|
||||||
}
|
}
|
||||||
if (Team == TeamType::Null)
|
if (Team == TeamType::Null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -24,40 +24,12 @@ ADefaultPlayerCharacter::ADefaultPlayerCharacter()
|
|||||||
|
|
||||||
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
|
Camera = CreateDefaultSubobject<UCameraComponent>(TEXT("Camera"));
|
||||||
Camera->SetupAttachment(CameraSpringArm, USpringArmComponent::SocketName);
|
Camera->SetupAttachment(CameraSpringArm, USpringArmComponent::SocketName);
|
||||||
|
|
||||||
|
for (uint8 i = 0; i < (uint8)EStats::SIZE; i++)
|
||||||
|
DefaultStats.Add((EStats)i, 0.0f);
|
||||||
|
|
||||||
Health = 0.0f;
|
for (uint8 i = 0; i < (uint8)CooldownType::SIZE; i++)
|
||||||
HPRegeneration = 0.0f;
|
CooldownDuration.Add((CooldownType)i, 0.0f);
|
||||||
HealAndShieldpower = 0.0f;
|
|
||||||
Armor = 0.0f;
|
|
||||||
MagicResistance = 0.0f;
|
|
||||||
Tenacity = 0.0f;
|
|
||||||
SlowRisist = 0.0f;
|
|
||||||
AttackSpeed = 0.0f;
|
|
||||||
AttackDamage = 0.0f;
|
|
||||||
AbilityPower = 0.0f;
|
|
||||||
CriticalStrikeChance = 0.0f;
|
|
||||||
CriticalStrikeDamage = 0.0f;
|
|
||||||
ArmorPenetration = 0.0f;
|
|
||||||
MagicPenetration = 0.0f;
|
|
||||||
LifeSteal = 0.0f;
|
|
||||||
PhysicalVamp = 0.0f;
|
|
||||||
Omnivamp = 0.0f;
|
|
||||||
AbilityHaste = 0.0f;
|
|
||||||
Mana = 0.0f;
|
|
||||||
ManaRegeneration = 0.0f;
|
|
||||||
Energy = 0.0f;
|
|
||||||
EnergyRegeneration = 0.0f;
|
|
||||||
AttackRange = 0.0f;
|
|
||||||
MovementSpeed = 0.0f;
|
|
||||||
GoldGeneration = 0.0f;
|
|
||||||
AttackDamageGrowth = 0.0f;
|
|
||||||
AttackSpeedGrowth = 0.0f;
|
|
||||||
ArmorGrowth = 0.0f;
|
|
||||||
MagicResistanceGrowth = 0.0f;
|
|
||||||
HealthGrowth = 0.0f;
|
|
||||||
HealthRegenerationGrowth = 0.0f;
|
|
||||||
ManaGrowth = 0.0f;
|
|
||||||
ManaRegenerationGrowth = 0.0f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerCharacter::Tick(float DeltaTime)
|
void ADefaultPlayerCharacter::Tick(float DeltaTime)
|
||||||
@@ -104,15 +76,15 @@ float ADefaultPlayerCharacter::TakeDamage_Implementation(float DamageAmount, str
|
|||||||
float ADDamageMultiplier = 0;
|
float ADDamageMultiplier = 0;
|
||||||
float APDamageMultiplier = 0;
|
float APDamageMultiplier = 0;
|
||||||
|
|
||||||
if (MyState->Stats.Armor >= 0)
|
if (MyState->Stats[(uint8)EStats::Armor] >= 0)
|
||||||
ADDamageMultiplier = 100 / (100 + MyState->Stats.Armor);
|
ADDamageMultiplier = 100 / (100 + MyState->Stats[(uint8)EStats::Armor]);
|
||||||
else
|
else
|
||||||
ADDamageMultiplier = 2 - 100 / (100 - MyState->Stats.Armor);
|
ADDamageMultiplier = 2 - 100 / (100 - MyState->Stats[(uint8)EStats::Armor]);
|
||||||
|
|
||||||
if (MyState->Stats.MagicResistance >= 0)
|
if (MyState->Stats[(uint8)EStats::MagicResistance] >= 0)
|
||||||
APDamageMultiplier = 100 / (100 + MyState->Stats.MagicResistance);
|
APDamageMultiplier = 100 / (100 + MyState->Stats[(uint8)EStats::MagicResistance]);
|
||||||
else
|
else
|
||||||
APDamageMultiplier = 2 - 100 / (100 - MyState->Stats.MagicResistance);
|
APDamageMultiplier = 2 - 100 / (100 - MyState->Stats[(uint8)EStats::MagicResistance]);
|
||||||
|
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("%s : ADDamageMultiplier : %f CalculatedDamage : %f"), *DamageCauser->GetName(), ADDamageMultiplier, DamageAmount * ADDamageMultiplier);
|
UE_LOG(LogTemp, Warning, TEXT("%s : ADDamageMultiplier : %f CalculatedDamage : %f"), *DamageCauser->GetName(), ADDamageMultiplier, DamageAmount * ADDamageMultiplier);
|
||||||
@@ -120,19 +92,19 @@ float ADefaultPlayerCharacter::TakeDamage_Implementation(float DamageAmount, str
|
|||||||
|
|
||||||
if (Cast<UBaseAttack>(DamageEvent.DamageTypeClass->GetDefaultObject()))
|
if (Cast<UBaseAttack>(DamageEvent.DamageTypeClass->GetDefaultObject()))
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Warning, TEXT("DamageType : BaseAttack"));
|
UE_LOG(LogTemp, Warning, TEXT("DamageType : BaseAttack"));
|
||||||
|
|
||||||
float UpdatedHealth = MyState->Stats.Health - EventInstigatorState->Stats.AttackDamage * ADDamageMultiplier;
|
float UpdatedHealth = MyState->Stats[(uint8)EStats::Health] - EventInstigatorState->Stats[(uint8)EStats::AttackDamage] * ADDamageMultiplier;
|
||||||
if (UpdatedHealth < 0)
|
if (UpdatedHealth < 0)
|
||||||
{
|
{
|
||||||
MyState->Stats.Health = 0;
|
MyState->Stats[(uint8)EStats::Health] = 0;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
MyState->Stats.Health = UpdatedHealth;
|
MyState->Stats[(uint8)EStats::Health] = UpdatedHealth;
|
||||||
}
|
}
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Current Health : %f"), MyState->Stats.Health);
|
UE_LOG(LogTemp, Warning, TEXT("Current Health : %f"), MyState->Stats[(uint8)EStats::Health]);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -186,6 +158,16 @@ void ADefaultPlayerCharacter::NetMulticast_Skill4_Implementation()
|
|||||||
BP_Skill4();
|
BP_Skill4();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ADefaultPlayerCharacter::Skill4_End_Implementation()
|
||||||
|
{
|
||||||
|
NetMulticast_Skill4_End();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADefaultPlayerCharacter::NetMulticast_Skill4_End_Implementation()
|
||||||
|
{
|
||||||
|
BP_Skill4_End();
|
||||||
|
}
|
||||||
|
|
||||||
void ADefaultPlayerCharacter::Skill5_Implementation()
|
void ADefaultPlayerCharacter::Skill5_Implementation()
|
||||||
{
|
{
|
||||||
NetMulticast_Skill5();
|
NetMulticast_Skill5();
|
||||||
|
|||||||
@@ -65,6 +65,14 @@ public:
|
|||||||
UFUNCTION(NetMulticast, Reliable)
|
UFUNCTION(NetMulticast, Reliable)
|
||||||
void NetMulticast_Skill4();
|
void NetMulticast_Skill4();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Server, Reliable)
|
||||||
|
void Skill4_End();
|
||||||
|
//Override me
|
||||||
|
UFUNCTION(BlueprintImplementableEvent)
|
||||||
|
void BP_Skill4_End();
|
||||||
|
UFUNCTION(NetMulticast, Reliable)
|
||||||
|
void NetMulticast_Skill4_End();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Server, Reliable)
|
UFUNCTION(BlueprintCallable, Server, Reliable)
|
||||||
void Skill5();
|
void Skill5();
|
||||||
//Override me
|
//Override me
|
||||||
@@ -89,121 +97,14 @@ public:
|
|||||||
UFUNCTION(NetMulticast, Reliable)
|
UFUNCTION(NetMulticast, Reliable)
|
||||||
void NetMulticast_Skill7();
|
void NetMulticast_Skill7();
|
||||||
|
|
||||||
float GetHealth() const { return Health; }
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats")
|
||||||
float GetHPRegeneration() const { return HPRegeneration; }
|
TMap<EStats, float> DefaultStats;
|
||||||
float GetHealAndShieldpower() const { return HealAndShieldpower; }
|
|
||||||
float GetArmor() const { return Armor; }
|
|
||||||
float GetMagicResistance() const { return MagicResistance; }
|
|
||||||
float GetTenacity() const { return Tenacity; }
|
|
||||||
float GetSlowRisist() const { return SlowRisist; }
|
|
||||||
float GetAttackSpeed() const { return AttackSpeed; }
|
|
||||||
float GetAttackDamage() const { return AttackDamage; }
|
|
||||||
float GetAbilityPower() const { return AbilityPower; }
|
|
||||||
float GetCriticalStrikeChance() const { return CriticalStrikeChance; }
|
|
||||||
float GetCriticalStrikeDamage() const { return CriticalStrikeDamage; }
|
|
||||||
float GetArmorPenetration() const { return ArmorPenetration; }
|
|
||||||
float GetMagicPenetration() const { return MagicPenetration; }
|
|
||||||
float GetLifeSteal() const { return LifeSteal; }
|
|
||||||
float GetPhysicalVamp() const { return PhysicalVamp; }
|
|
||||||
float GetOmnivamp() const { return Omnivamp; }
|
|
||||||
float GetAbilityHaste() const { return AbilityHaste; }
|
|
||||||
const float* GetCooldownDuration() const { return CooldownDuration; }
|
|
||||||
float GetMana() const { return Mana; }
|
|
||||||
float GetManaRegeneration() const { return ManaRegeneration; }
|
|
||||||
float GetEnergy() const { return Energy; }
|
|
||||||
float GetEnergyRegeneration() const { return EnergyRegeneration; }
|
|
||||||
float GetAttackRange() const { return AttackRange; }
|
|
||||||
float GetMovementSpeed() const { return MovementSpeed; }
|
|
||||||
float GetGoldGeneration() const { return GoldGeneration; }
|
|
||||||
float GetAttackDamageGrowth() const { return AttackDamageGrowth; }
|
|
||||||
float GetAttackSpeedGrowth() const { return AttackSpeedGrowth; }
|
|
||||||
float GetArmorGrowth() const { return ArmorGrowth; }
|
|
||||||
float GetMagicResistanceGrowth() const { return MagicResistanceGrowth; }
|
|
||||||
float GetHealthGrowth() const { return HealthGrowth; }
|
|
||||||
float GetHealthRegenerationGrowth() const { return HealthRegenerationGrowth; }
|
|
||||||
float GetManaGrowth() const { return ManaGrowth; }
|
|
||||||
float GetManaRegenerationGrowth() const { return ManaRegenerationGrowth; }
|
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats")
|
||||||
|
TMap<CooldownType, float> CooldownDuration;
|
||||||
protected:
|
protected:
|
||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
USpringArmComponent* CameraSpringArm;
|
USpringArmComponent* CameraSpringArm;
|
||||||
UPROPERTY(EditAnywhere)
|
UPROPERTY(EditAnywhere)
|
||||||
UCameraComponent* Camera;
|
UCameraComponent* Camera;
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
|
|
||||||
float Health;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
|
|
||||||
float HPRegeneration;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
|
|
||||||
float HealAndShieldpower;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
|
|
||||||
float Armor;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
|
|
||||||
float MagicResistance;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
|
|
||||||
float Tenacity;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Defensive")
|
|
||||||
float SlowRisist;
|
|
||||||
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float AttackSpeed;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float AttackDamage;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float AbilityPower;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float CriticalStrikeChance;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float CriticalStrikeDamage;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float ArmorPenetration;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float MagicPenetration;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float LifeSteal;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float PhysicalVamp;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Offensive")
|
|
||||||
float Omnivamp;
|
|
||||||
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Haste")
|
|
||||||
float AbilityHaste;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, Category = "Stats|Utility|Haste")
|
|
||||||
float CooldownDuration[(uint8)CooldownType::SIZE] = { 0.0f, };
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
|
|
||||||
float Mana;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
|
|
||||||
float ManaRegeneration;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
|
|
||||||
float Energy;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Resource")
|
|
||||||
float EnergyRegeneration;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility")
|
|
||||||
float AttackRange;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility")
|
|
||||||
float MovementSpeed;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Utility|Non-Combat")
|
|
||||||
float GoldGeneration;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float AttackDamageGrowth;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float AttackSpeedGrowth;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float ArmorGrowth;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float MagicResistanceGrowth;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float HealthGrowth;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float HealthRegenerationGrowth;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float ManaGrowth;
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Stats|Increasing Statistics")
|
|
||||||
float ManaRegenerationGrowth;
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -18,17 +18,19 @@ void ADefaultPlayerController::BeginPlay()
|
|||||||
{
|
{
|
||||||
Super::BeginPlay();
|
Super::BeginPlay();
|
||||||
|
|
||||||
if (ULocalPlayer* LocalPlayer = Cast<ULocalPlayer>(Player)) {
|
ULocalPlayer* LocalPlayer = Cast<ULocalPlayer>(Player);
|
||||||
if (UEnhancedInputLocalPlayerSubsystem* InputSystem = LocalPlayer->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>()) {
|
if (!LocalPlayer) return;
|
||||||
if (!PlayerInputMapping.IsNull()) {
|
|
||||||
InputSystem->AddMappingContext(PlayerInputMapping.LoadSynchronous(), 0);
|
UEnhancedInputLocalPlayerSubsystem* InputSystem = LocalPlayer->GetSubsystem<UEnhancedInputLocalPlayerSubsystem>();
|
||||||
}
|
if (!InputSystem) return;
|
||||||
else {
|
|
||||||
UE_LOG(LogTemp, Error, TEXT("AddMappingContext Failed"));
|
if (PlayerInputMapping.IsNull())
|
||||||
}
|
{
|
||||||
}
|
UE_LOG(LogTemp, Error, TEXT("AddMappingContext Failed"));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
InputSystem->AddMappingContext(PlayerInputMapping.LoadSynchronous(), 0);
|
||||||
this->bShowMouseCursor = true;
|
this->bShowMouseCursor = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,16 +41,29 @@ void ADefaultPlayerController::OnPossess(APawn* aPawn)
|
|||||||
Server_SpawnPlayerCamera();
|
Server_SpawnPlayerCamera();
|
||||||
|
|
||||||
AActor *PlayerCamera = GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera();
|
AActor *PlayerCamera = GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera();
|
||||||
if (PlayerCamera)
|
if (!PlayerCamera)
|
||||||
{
|
|
||||||
SetViewTarget(PlayerCamera);
|
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("SetViewTarget Success : %s"), *GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera()->GetName());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Error, TEXT("GetPlayerCamera Failed."));
|
UE_LOG(LogTemp, Error, TEXT("GetPlayerCamera Failed."));
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
SetViewTarget(PlayerCamera);
|
||||||
|
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("SetViewTarget Success : %s"), *GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera()->GetName());
|
||||||
|
|
||||||
|
ADefaultPlayerCharacter* ControlledPawn = GetPawn<ADefaultPlayerCharacter>();
|
||||||
|
if (!ControlledPawn) return;
|
||||||
|
|
||||||
|
ADefaultPlayerState* MyPlayerState = GetPlayerState<ADefaultPlayerState>();
|
||||||
|
if (!MyPlayerState) return;
|
||||||
|
|
||||||
|
TArray<float> DefaultStatsValue;
|
||||||
|
TArray<float> CooldownDurationValue;
|
||||||
|
|
||||||
|
ControlledPawn->DefaultStats.GenerateValueArray(DefaultStatsValue);
|
||||||
|
ControlledPawn->CooldownDuration.GenerateValueArray(CooldownDurationValue);
|
||||||
|
|
||||||
|
MyPlayerState->InitPlayerStats(DefaultStatsValue, CooldownDurationValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerController::OnUnPossess()
|
void ADefaultPlayerController::OnUnPossess()
|
||||||
@@ -66,48 +81,46 @@ void ADefaultPlayerController::Server_SpawnPlayerCamera_Implementation()
|
|||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("SpawnPlayerCamera"));
|
UE_LOG(LogTemp, Warning, TEXT("SpawnPlayerCamera"));
|
||||||
|
|
||||||
if (APawn* MyPawn = GetPawn())
|
APawn* MyPawn = GetPawn();
|
||||||
|
if (!MyPawn) return;
|
||||||
|
|
||||||
|
FTransform SpawnTransform = FTransform();
|
||||||
|
|
||||||
|
SpawnTransform.SetLocation(MyPawn->GetActorLocation());
|
||||||
|
|
||||||
|
OutContextPlayerCamera = GetWorld()->SpawnActor<AActor>(ADefaultPlayerCamera::StaticClass(), SpawnTransform, SpawnInfo);
|
||||||
|
if (!OutContextPlayerCamera)
|
||||||
{
|
{
|
||||||
FTransform SpawnTransform = FTransform();
|
UE_LOG(LogTemp, Error, TEXT("Camera Spawn Failed."));
|
||||||
|
return;
|
||||||
SpawnTransform.SetLocation(MyPawn->GetActorLocation());
|
|
||||||
|
|
||||||
OutContextPlayerCamera = GetWorld()->SpawnActor<AActor>(ADefaultPlayerCamera::StaticClass(), SpawnTransform, SpawnInfo);
|
|
||||||
if (OutContextPlayerCamera)
|
|
||||||
{
|
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetPlayerCamera(OutContextPlayerCamera);
|
|
||||||
OutContextPlayerCamera->AttachToActor(GetPawn(), FAttachmentTransformRules(EAttachmentRule::SnapToTarget, EAttachmentRule::KeepWorld, EAttachmentRule::KeepWorld, false));
|
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("SetPlayerCamera Success : %s, %d"), *GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera()->GetName(), GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera());
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
UE_LOG(LogTemp, Error, TEXT("Camera Spawn Failed."));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetPlayerCamera(OutContextPlayerCamera);
|
||||||
|
OutContextPlayerCamera->AttachToActor(GetPawn(), FAttachmentTransformRules(EAttachmentRule::SnapToTarget, EAttachmentRule::KeepWorld, EAttachmentRule::KeepWorld, false));
|
||||||
|
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("SetPlayerCamera Success : %s, %d"), *GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera()->GetName(), GetPlayerState<ADefaultPlayerState>()->GetPlayerCamera());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerController::SetACharacterOutlineColor(ACharacter* Target, bool Visible)
|
void ADefaultPlayerController::SetACharacterOutlineColor(ACharacter* Target, bool Visible)
|
||||||
{
|
{
|
||||||
if (!HasAuthority())
|
if (HasAuthority()) return;
|
||||||
|
|
||||||
|
ADefaultPlayerState* State = Target->GetPlayerState<ADefaultPlayerState>();
|
||||||
|
if (!State)
|
||||||
{
|
{
|
||||||
if (ADefaultPlayerState* State = Target->GetPlayerState<ADefaultPlayerState>())
|
UE_LOG(LogTemp, Error, TEXT("GetPlayerState<ADefaultPlayerState> Failed"));
|
||||||
{
|
return;
|
||||||
if (State->GetTeam() == GetPlayerState<ADefaultPlayerState>()->GetTeam())
|
}
|
||||||
{
|
|
||||||
Target->GetMesh()->SetRenderCustomDepth(Visible);
|
if (State->GetTeam() == GetPlayerState<ADefaultPlayerState>()->GetTeam())
|
||||||
Target->GetMesh()->CustomDepthStencilValue = 1;
|
{
|
||||||
}
|
Target->GetMesh()->SetRenderCustomDepth(Visible);
|
||||||
else
|
Target->GetMesh()->CustomDepthStencilValue = 1;
|
||||||
{
|
}
|
||||||
Target->GetMesh()->SetRenderCustomDepth(Visible);
|
else
|
||||||
Target->GetMesh()->CustomDepthStencilValue = 2;
|
{
|
||||||
}
|
Target->GetMesh()->SetRenderCustomDepth(Visible);
|
||||||
}
|
Target->GetMesh()->CustomDepthStencilValue = 2;
|
||||||
else
|
|
||||||
{
|
|
||||||
UE_LOG(LogTemp, Error, TEXT("GetPlayerState<ADefaultPlayerState> Failed"));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -215,34 +228,36 @@ void ADefaultPlayerController::SetupInputComponent()
|
|||||||
{
|
{
|
||||||
Super::SetupInputComponent();
|
Super::SetupInputComponent();
|
||||||
|
|
||||||
if (UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(InputComponent))
|
UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(InputComponent);
|
||||||
{
|
if (!EnhancedInputComponent) return;
|
||||||
EnhancedInputComponent->BindAction(Skill1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill1);
|
|
||||||
EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2);
|
EnhancedInputComponent->BindAction(Skill1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill1);
|
||||||
EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3);
|
EnhancedInputComponent->BindAction(Skill2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill2);
|
||||||
EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4);
|
EnhancedInputComponent->BindAction(Skill3Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill3);
|
||||||
EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1);
|
EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Skill4Triggered);
|
||||||
EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2);
|
EnhancedInputComponent->BindAction(Skill4Action.Get(), ETriggerEvent::Completed, this, &ADefaultPlayerController::Skill4Completed);
|
||||||
EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward);
|
EnhancedInputComponent->BindAction(RuneSpell1Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell1);
|
||||||
EnhancedInputComponent->BindAction(BombAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Bomb);
|
EnhancedInputComponent->BindAction(RuneSpell2Action.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::RuneSpell2);
|
||||||
EnhancedInputComponent->BindAction(ObjectSelectAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::ObjectSelect);
|
EnhancedInputComponent->BindAction(WardAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Ward);
|
||||||
EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::MoveTriggered);
|
EnhancedInputComponent->BindAction(BombAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Bomb);
|
||||||
EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Started, this, &ADefaultPlayerController::MoveStarted);
|
EnhancedInputComponent->BindAction(ObjectSelectAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::ObjectSelect);
|
||||||
}
|
EnhancedInputComponent->BindAction(MoveAction.Get(), ETriggerEvent::Triggered, this, &ADefaultPlayerController::Move);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerController::Skill1()
|
void ADefaultPlayerController::Skill1()
|
||||||
{
|
{
|
||||||
//if (!(GetPlayerState<ADefaultPlayerState>()->Stats.Mana >= 100))
|
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill1Cost]))
|
||||||
// return;
|
return;
|
||||||
|
|
||||||
|
ACharacter* HitObject = nullptr;
|
||||||
FVector Location = GetPawn()->GetActorLocation();
|
FVector Location = GetPawn()->GetActorLocation();
|
||||||
Location.Z = 0;
|
Location.Z = 0;
|
||||||
|
|
||||||
SimpleMoveToLocation(this, Location);
|
Server_StopMove();
|
||||||
this->MoveToLocation(Location);
|
Multicast_StopMove();
|
||||||
|
|
||||||
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
|
Multicast_SetRotation(GetMouseHitLocation());
|
||||||
|
Server_SetRotation(GetMouseHitLocation());
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Skill1"));
|
UE_LOG(LogTemp, Warning, TEXT("Skill1"));
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||||
@@ -251,13 +266,18 @@ void ADefaultPlayerController::Skill1()
|
|||||||
|
|
||||||
void ADefaultPlayerController::Skill2()
|
void ADefaultPlayerController::Skill2()
|
||||||
{
|
{
|
||||||
|
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill2Cost]))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ACharacter* HitObject = nullptr;
|
||||||
FVector Location = GetPawn()->GetActorLocation();
|
FVector Location = GetPawn()->GetActorLocation();
|
||||||
Location.Z = 0;
|
Location.Z = 0;
|
||||||
|
|
||||||
SimpleMoveToLocation(this, Location);
|
Server_StopMove();
|
||||||
this->MoveToLocation(Location);
|
Multicast_StopMove();
|
||||||
|
|
||||||
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
|
Multicast_SetRotation(GetMouseHitLocation());
|
||||||
|
Server_SetRotation(GetMouseHitLocation());
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Skill2"));
|
UE_LOG(LogTemp, Warning, TEXT("Skill2"));
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||||
@@ -266,32 +286,49 @@ void ADefaultPlayerController::Skill2()
|
|||||||
|
|
||||||
void ADefaultPlayerController::Skill3()
|
void ADefaultPlayerController::Skill3()
|
||||||
{
|
{
|
||||||
|
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill3Cost]))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ACharacter* HitObject = nullptr;
|
||||||
FVector Location = GetPawn()->GetActorLocation();
|
FVector Location = GetPawn()->GetActorLocation();
|
||||||
Location.Z = 0;
|
Location.Z = 0;
|
||||||
|
|
||||||
SimpleMoveToLocation(this, Location);
|
Server_StopMove();
|
||||||
this->MoveToLocation(Location);
|
Multicast_StopMove();
|
||||||
|
|
||||||
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
|
Multicast_SetRotation(GetMouseHitLocation());
|
||||||
|
Server_SetRotation(GetMouseHitLocation());
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Skill3"));
|
UE_LOG(LogTemp, Warning, TEXT("Skill3"));
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill3);
|
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill3);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerController::Skill4()
|
void ADefaultPlayerController::Skill4Triggered()
|
||||||
{
|
{
|
||||||
|
if (!(GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Mana] >= GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Skill4Cost]))
|
||||||
|
return;
|
||||||
|
|
||||||
|
ACharacter* HitObject = nullptr;
|
||||||
FVector Location = GetPawn()->GetActorLocation();
|
FVector Location = GetPawn()->GetActorLocation();
|
||||||
Location.Z = 0;
|
Location.Z = 0;
|
||||||
|
|
||||||
SimpleMoveToLocation(this, Location);
|
Server_StopMove();
|
||||||
this->MoveToLocation(Location);
|
Multicast_StopMove();
|
||||||
|
|
||||||
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
|
Multicast_SetRotation(GetMouseHitLocation());
|
||||||
|
Server_SetRotation(GetMouseHitLocation());
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Skill4"));
|
UE_LOG(LogTemp, Warning, TEXT("Skill4 Triggered"));
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Started);
|
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Triggered);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADefaultPlayerController::Skill4Completed()
|
||||||
|
{
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("Skill4 Completed"));
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Comlpleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerController::RuneSpell1()
|
void ADefaultPlayerController::RuneSpell1()
|
||||||
@@ -331,30 +368,73 @@ void ADefaultPlayerController::ObjectSelect()
|
|||||||
|
|
||||||
GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult);
|
GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult);
|
||||||
|
|
||||||
if (ACharacter* HitObject = Cast<ACharacter>(HitResult.GetActor()))
|
ACharacter* HitObject = Cast<ACharacter>(HitResult.GetActor());
|
||||||
{
|
if (!HitObject) return;
|
||||||
UE_LOG(LogTemp, Warning, TEXT("%s"), *HitObject->GetName());
|
|
||||||
SetACharacterOutlineColor(HitObject, true);
|
UE_LOG(LogTemp, Warning, TEXT("%s"), *HitObject->GetName());
|
||||||
}
|
SetACharacterOutlineColor(HitObject, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerController::MoveTriggered()
|
|
||||||
{
|
|
||||||
Move();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ADefaultPlayerController::MoveStarted()
|
|
||||||
{
|
|
||||||
Move();
|
|
||||||
}
|
|
||||||
|
|
||||||
void ADefaultPlayerController::Move()
|
void ADefaultPlayerController::Move()
|
||||||
{
|
{
|
||||||
FVector Destination = GetMouseHitLocation();
|
FHitResult HitResult;
|
||||||
|
TArray<TEnumAsByte<EObjectTypeQuery>> ObjectTypes;
|
||||||
|
ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_WorldStatic));
|
||||||
|
ObjectTypes.Add(UEngineTypes::ConvertToObjectType(ECollisionChannel::ECC_Pawn));
|
||||||
|
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Moving);
|
GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult);
|
||||||
SimpleMoveToLocation(this, Destination);
|
ACharacter* HitObject = Cast<ACharacter>(HitResult.GetActor()); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HitCharactor<6F><72> <20><><EFBFBD><EFBFBD><<<3C><><EFBFBD><EFBFBD> <20><> ij<><C4B3><EFBFBD><EFBFBD><EFBFBD>϶<EFBFBD><CFB6><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>
|
||||||
this->MoveToLocation(Destination);
|
|
||||||
|
if (HitObject != nullptr) //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> HitObject<63><74> null<6C><6C> <20>ƴ<EFBFBD> <20><><EFBFBD><EFBFBD> Attack()<29><> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD> <20>ڵ<EFBFBD><DAB5><EFBFBD><EFBFBD><EFBFBD>, HitObject<63><74> <20><> ij<><C4B3><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ؾ<EFBFBD><D8BE><EFBFBD>
|
||||||
|
{
|
||||||
|
|
||||||
|
Attack(HitObject); //HitObject<63><74> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Attack <20><><EFBFBD><EFBFBD>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
HitObject = nullptr;
|
||||||
|
FVector Destination = GetMouseHitLocation();
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Moving);
|
||||||
|
SimpleMoveToLocation(this, Destination);
|
||||||
|
this->MoveToLocation(Destination);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
void ADefaultPlayerController::Multicast_SetRotation_Implementation(FVector MouseHitLocation)
|
||||||
|
{
|
||||||
|
FVector Location = GetPawn()->GetActorLocation();
|
||||||
|
Location.Z = 0;
|
||||||
|
|
||||||
|
GetPawn()->SetActorRotation((MouseHitLocation - Location).Rotation());
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADefaultPlayerController::Server_SetRotation_Implementation(FVector MouseHitLocation)
|
||||||
|
{
|
||||||
|
Multicast_SetRotation(MouseHitLocation);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADefaultPlayerController::Server_StopMove_Implementation()
|
||||||
|
{
|
||||||
|
Multicast_StopMove();
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADefaultPlayerController::Multicast_StopMove_Implementation()
|
||||||
|
{
|
||||||
|
UPathFollowingComponent* PFollowComp = this->FindComponentByClass<UPathFollowingComponent>();
|
||||||
|
if (!PFollowComp) return;
|
||||||
|
|
||||||
|
PFollowComp->OnRequestFinished.Clear();
|
||||||
|
|
||||||
|
PFollowComp->RequestMoveWithImmediateFinish(EPathFollowingResult::Success);
|
||||||
|
|
||||||
|
PFollowComp->OnRequestFinished.AddUObject(this, &ADefaultPlayerController::OnMoveCompleted);
|
||||||
}
|
}
|
||||||
|
|
||||||
FVector ADefaultPlayerController::GetMouseHitLocation()
|
FVector ADefaultPlayerController::GetMouseHitLocation()
|
||||||
@@ -363,7 +443,7 @@ FVector ADefaultPlayerController::GetMouseHitLocation()
|
|||||||
GetHitResultUnderCursor(ECollisionChannel::ECC_Visibility, true, HitResult);
|
GetHitResultUnderCursor(ECollisionChannel::ECC_Visibility, true, HitResult);
|
||||||
HitResult.Location.Z = 0;
|
HitResult.Location.Z = 0;
|
||||||
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Client%d MoveTo : (%f, %f)"), GPlayInEditorID, HitResult.Location.X, HitResult.Location.Y);
|
//UE_LOG(LogTemp, Warning, TEXT("Client%d MoveTo : (%f, %f)"), GPlayInEditorID, HitResult.Location.X, HitResult.Location.Y);
|
||||||
|
|
||||||
FVector ActorLocation = GetPawn()->GetActorLocation();
|
FVector ActorLocation = GetPawn()->GetActorLocation();
|
||||||
ActorLocation.Z = 0;
|
ActorLocation.Z = 0;
|
||||||
@@ -376,22 +456,21 @@ FVector ADefaultPlayerController::GetMouseHitLocation()
|
|||||||
DrawDebugLine(GetWorld(), HitResult.Location, Destination, FColor::Emerald, false, 1, 0, 1);
|
DrawDebugLine(GetWorld(), HitResult.Location, Destination, FColor::Emerald, false, 1, 0, 1);
|
||||||
|
|
||||||
const UWorld* CurrentWorld = GetWorld();
|
const UWorld* CurrentWorld = GetWorld();
|
||||||
if (CurrentWorld)
|
if (!CurrentWorld) return Destination;
|
||||||
{
|
|
||||||
FHitResult CollisionCheck;
|
|
||||||
|
|
||||||
FCollisionQueryParams CollisionParams;
|
FHitResult CollisionCheck;
|
||||||
CollisionParams.AddIgnoredActor(GetPawn());
|
|
||||||
|
|
||||||
FVector Start = HitResult.Location;
|
FCollisionQueryParams CollisionParams;
|
||||||
FVector End = Destination;
|
CollisionParams.AddIgnoredActor(GetPawn());
|
||||||
|
|
||||||
if (CurrentWorld->LineTraceSingleByChannel(CollisionCheck, Start, End, ECC_Visibility, CollisionParams))
|
FVector Start = HitResult.Location;
|
||||||
{
|
FVector End = Destination;
|
||||||
DrawDebugLine(CurrentWorld, Start, End, FColor::Red, false, 1.5, 0, 2);
|
|
||||||
Destination = HitResult.Location;
|
if (!CurrentWorld->LineTraceSingleByChannel(CollisionCheck, Start, End, ECC_Visibility, CollisionParams))
|
||||||
}
|
return Destination;
|
||||||
}
|
|
||||||
|
DrawDebugLine(CurrentWorld, Start, End, FColor::Red, false, 1.5, 0, 2);
|
||||||
|
Destination = HitResult.Location;
|
||||||
|
|
||||||
return Destination;
|
return Destination;
|
||||||
}
|
}
|
||||||
@@ -476,25 +555,71 @@ void ADefaultPlayerController::SimpleMoveToLocation(AController* Controller, con
|
|||||||
|
|
||||||
void ADefaultPlayerController::OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& MovementResult)
|
void ADefaultPlayerController::OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult& MovementResult)
|
||||||
{
|
{
|
||||||
if (MovementResult.IsSuccess())
|
if (!MovementResult.IsSuccess()) return;
|
||||||
|
|
||||||
|
if (!GPlayInEditorID)
|
||||||
{
|
{
|
||||||
if (!GPlayInEditorID)
|
UE_LOG(LogTemp, Warning, TEXT("Server MoveCompleted"));
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("Client%d MoveCompleted"), GPlayInEditorID);
|
||||||
|
}
|
||||||
|
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Idle);
|
||||||
|
}
|
||||||
|
|
||||||
|
void ADefaultPlayerController::Attack(ACharacter* HitObject)
|
||||||
|
{
|
||||||
|
|
||||||
|
float MinDistance = GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats:: AttackRange];
|
||||||
|
FVector Destination = HitObject->GetActorLocation(); // HitObject<63><74> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
if (FVector::Dist(Destination, GetPawn()->GetActorLocation()) <= MinDistance)
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Server MoveCompleted"));
|
if ((GetPlayerState<ADefaultPlayerState>()->CooldownDuration[(uint8)CooldownType::Attack] == 0))
|
||||||
|
{
|
||||||
|
FVector Location = GetPawn()->GetActorLocation();
|
||||||
|
Location.Z = 0;
|
||||||
|
|
||||||
|
Server_StopMove();
|
||||||
|
Multicast_StopMove();
|
||||||
|
|
||||||
|
Multicast_SetRotation(GetMouseHitLocation());
|
||||||
|
Server_SetRotation(GetMouseHitLocation());
|
||||||
|
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("Attack"));
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Attack);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
FVector Location = GetPawn()->GetActorLocation();
|
||||||
|
Location.Z = 0;
|
||||||
|
|
||||||
|
Server_StopMove();
|
||||||
|
Multicast_StopMove();
|
||||||
|
|
||||||
|
Multicast_SetRotation(GetMouseHitLocation());
|
||||||
|
Server_SetRotation(GetMouseHitLocation());
|
||||||
|
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("Attack"));
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Idle);
|
||||||
|
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Attack);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Client%d MoveCompleted"), GPlayInEditorID);
|
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Moving);
|
||||||
|
SimpleMoveToLocation(this, Destination);
|
||||||
|
|
||||||
|
Destination = HitObject->GetActorLocation(); // HitObject<63><74> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||||
|
this->MoveToLocation(Destination);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Idle);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void ADefaultPlayerController::Attack()
|
|
||||||
{
|
|
||||||
UE_LOG(LogTemp, Warning, TEXT("Attack"));
|
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
|
||||||
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Attack);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerController::MoveToLocation_Implementation(FVector Location)
|
void ADefaultPlayerController::MoveToLocation_Implementation(FVector Location)
|
||||||
|
|||||||
@@ -34,19 +34,29 @@ public:
|
|||||||
void Skill1();
|
void Skill1();
|
||||||
void Skill2();
|
void Skill2();
|
||||||
void Skill3();
|
void Skill3();
|
||||||
void Skill4();
|
void Skill4Triggered();
|
||||||
|
void Skill4Completed();
|
||||||
void RuneSpell1();
|
void RuneSpell1();
|
||||||
void RuneSpell2();
|
void RuneSpell2();
|
||||||
void Ward();
|
void Ward();
|
||||||
void Bomb();
|
void Bomb();
|
||||||
void ObjectSelect();
|
void ObjectSelect();
|
||||||
void MoveTriggered();
|
|
||||||
void MoveStarted();
|
|
||||||
void Move();
|
void Move();
|
||||||
|
|
||||||
UFUNCTION(Server, Reliable)
|
UFUNCTION(Server, Reliable)
|
||||||
void MoveToLocation(FVector Location);
|
void MoveToLocation(FVector Location);
|
||||||
|
|
||||||
|
UFUNCTION(Server, Reliable)
|
||||||
|
void Server_StopMove();
|
||||||
|
UFUNCTION(NetMulticast, Reliable)
|
||||||
|
void Multicast_StopMove();
|
||||||
|
|
||||||
|
UFUNCTION(NetMulticast, Reliable)
|
||||||
|
void Multicast_SetRotation(FVector MouseHitLocation);
|
||||||
|
|
||||||
|
UFUNCTION(Server, Reliable)
|
||||||
|
void Server_SetRotation(FVector MouseHitLocation);
|
||||||
|
|
||||||
FVector GetMouseHitLocation();
|
FVector GetMouseHitLocation();
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable, Category = "AI|Navigation")
|
UFUNCTION(BlueprintCallable, Category = "AI|Navigation")
|
||||||
@@ -54,7 +64,9 @@ public:
|
|||||||
|
|
||||||
void OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult &MovementResult);
|
void OnMoveCompleted(FAIRequestID RequestID, const FPathFollowingResult &MovementResult);
|
||||||
|
|
||||||
void Attack();
|
|
||||||
|
|
||||||
|
void Attack(ACharacter* HitObject);
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadWrite)
|
UPROPERTY(BlueprintReadWrite)
|
||||||
float MouseClickInterval;
|
float MouseClickInterval;
|
||||||
|
|||||||
@@ -26,46 +26,18 @@ void ADefaultPlayerState::GetLifetimeReplicatedProps(TArray<FLifetimeProperty>&
|
|||||||
DOREPLIFETIME(ADefaultPlayerState, PlayerCamera);
|
DOREPLIFETIME(ADefaultPlayerState, PlayerCamera);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerState::InitPlayerStats()
|
void ADefaultPlayerState::InitPlayerStats_Implementation(const TArray<float>& StatsValue, const TArray<float>& CooldownDurationValue)
|
||||||
{
|
{
|
||||||
ADefaultPlayerCharacter* Initializer = Cast<ADefaultPlayerCharacter>(CharacterBPRef);
|
MaxStats.Append(StatsValue);
|
||||||
|
Stats.Append(StatsValue);
|
||||||
|
CooldownDuration.Append(CooldownDurationValue);
|
||||||
|
MaxCooldownDuration.Append(CooldownDurationValue);
|
||||||
|
|
||||||
Stats.Health = Initializer->GetHealth();
|
|
||||||
Stats.HPRegeneration = Initializer->GetHPRegeneration();
|
|
||||||
Stats.HealAndShieldpower = Initializer->GetHealAndShieldpower();
|
|
||||||
Stats.Armor = Initializer->GetArmor();
|
|
||||||
Stats.MagicResistance = Initializer->GetMagicResistance();
|
|
||||||
Stats.Tenacity = Initializer->GetTenacity();
|
|
||||||
Stats.SlowRisist = Initializer->GetSlowRisist();
|
|
||||||
Stats.AttackSpeed = Initializer->GetAttackSpeed();
|
|
||||||
Stats.AttackDamage = Initializer->GetAttackDamage();
|
|
||||||
Stats.AbilityPower = Initializer->GetAbilityPower();
|
|
||||||
Stats.CriticalStrikeChance = Initializer->GetCriticalStrikeChance();
|
|
||||||
Stats.CriticalStrikeDamage = Initializer->GetCriticalStrikeDamage();
|
|
||||||
Stats.ArmorPenetration = Initializer->GetArmorPenetration();
|
|
||||||
Stats.MagicPenetration = Initializer->GetMagicPenetration();
|
|
||||||
Stats.LifeSteal = Initializer->GetLifeSteal();
|
|
||||||
Stats.PhysicalVamp = Initializer->GetPhysicalVamp();
|
|
||||||
Stats.Omnivamp = Initializer->GetOmnivamp();
|
|
||||||
Stats.AbilityHaste = Initializer->GetAbilityHaste();
|
|
||||||
|
|
||||||
SetMultipleCooldownDuration(Initializer->GetCooldownDuration());
|
for (float Value : StatsValue)
|
||||||
|
{
|
||||||
Stats.Mana = Initializer->GetMana();
|
UE_LOG(LogTemp, Warning, TEXT("Values: %f"), Value);
|
||||||
Stats.ManaRegeneration = Initializer->GetManaRegeneration();
|
}
|
||||||
Stats.Energy = Initializer->GetEnergy();
|
|
||||||
Stats.EnergyRegeneration = Initializer->GetEnergyRegeneration();
|
|
||||||
Stats.AttackRange = Initializer->GetAttackRange();
|
|
||||||
Stats.MovementSpeed = Initializer->GetMovementSpeed();
|
|
||||||
Stats.GoldGeneration = Initializer->GetGoldGeneration();
|
|
||||||
Stats.AttackDamageGrowth = Initializer->GetAttackDamageGrowth();
|
|
||||||
Stats.AttackSpeedGrowth = Initializer->GetAttackSpeedGrowth();
|
|
||||||
Stats.ArmorGrowth = Initializer->GetArmorGrowth();
|
|
||||||
Stats.MagicResistanceGrowth = Initializer->GetMagicResistanceGrowth();
|
|
||||||
Stats.HealthGrowth = Initializer->GetHealthGrowth();
|
|
||||||
Stats.HealthRegenerationGrowth = Initializer->GetHealthRegenerationGrowth();
|
|
||||||
Stats.ManaGrowth = Initializer->GetManaGrowth();
|
|
||||||
Stats.ManaRegenerationGrowth = Initializer->GetManaRegenerationGrowth();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerState::NetMulticast_SetAttackType_Implementation(CooldownType Value)
|
void ADefaultPlayerState::NetMulticast_SetAttackType_Implementation(CooldownType Value)
|
||||||
@@ -92,8 +64,3 @@ int32 ADefaultPlayerState::GetCharacterLevel() const
|
|||||||
{
|
{
|
||||||
return int32();
|
return int32();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ADefaultPlayerState::SetMultipleCooldownDuration(const float* Value)
|
|
||||||
{
|
|
||||||
std::memcpy(&CooldownDuration, Value, sizeof(float) * (uint8)CooldownType::SIZE);
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -21,7 +21,8 @@ public:
|
|||||||
ADefaultPlayerState();
|
ADefaultPlayerState();
|
||||||
void GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const override;
|
void GetLifetimeReplicatedProps(TArray< FLifetimeProperty >& OutLifetimeProps) const override;
|
||||||
|
|
||||||
void InitPlayerStats();
|
UFUNCTION(Server, Reliable)
|
||||||
|
void InitPlayerStats(const TArray<float>& StatsValue, const TArray<float>& CooldownDurationValue);
|
||||||
|
|
||||||
void SetCharacterBPRef(UClass* Value) { CharacterBPRef = Value; }
|
void SetCharacterBPRef(UClass* Value) { CharacterBPRef = Value; }
|
||||||
UClass* GetCharacterBPRef() const { return CharacterBPRef; }
|
UClass* GetCharacterBPRef() const { return CharacterBPRef; }
|
||||||
@@ -34,10 +35,11 @@ public:
|
|||||||
void SetPlayerCamera(AActor* Actor) { PlayerCamera = Actor; }
|
void SetPlayerCamera(AActor* Actor) { PlayerCamera = Actor; }
|
||||||
AActor* GetPlayerCamera() const { return PlayerCamera; }
|
AActor* GetPlayerCamera() const { return PlayerCamera; }
|
||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
//fix later
|
||||||
void SetCooldownDuration(CooldownType Key, float Value) { CooldownDuration[(uint8)Key] = Value; }
|
//UFUNCTION(BlueprintCallable)
|
||||||
UFUNCTION(BlueprintCallable)
|
//void SetCooldownDuration(CooldownType Key, float Value) { CooldownDuration[(uint8)Key] = Value; }
|
||||||
float GetCooldownDuration(CooldownType Key) const { return CooldownDuration[(uint8)Key]; }
|
//UFUNCTION(BlueprintCallable)
|
||||||
|
//float GetCooldownDuration(CooldownType Key) const { return CooldownDuration[(uint8)Key]; }
|
||||||
|
|
||||||
//Execute on server
|
//Execute on server
|
||||||
UFUNCTION(BlueprintCallable, Server, Reliable)
|
UFUNCTION(BlueprintCallable, Server, Reliable)
|
||||||
@@ -57,14 +59,16 @@ public:
|
|||||||
|
|
||||||
UFUNCTION(BlueprintCallable)
|
UFUNCTION(BlueprintCallable)
|
||||||
int32 GetCharacterLevel() const;
|
int32 GetCharacterLevel() const;
|
||||||
|
|
||||||
//Should be ONLY executed on server!!
|
|
||||||
void SetMultipleCooldownDuration(const float* Value) ;
|
|
||||||
|
|
||||||
UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(Replicated, Transient, EditAnywhere, BlueprintReadWrite)
|
||||||
FDefaultStats Stats;
|
TArray<float> Stats;
|
||||||
UPROPERTY(Replicated, EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(Replicated, Transient, EditAnywhere, BlueprintReadWrite)
|
||||||
FDefaultStats MaxStats;
|
TArray<float> MaxStats;
|
||||||
|
|
||||||
|
UPROPERTY(Replicated, Transient, BlueprintReadWrite)
|
||||||
|
TArray<float> CooldownDuration;
|
||||||
|
UPROPERTY(Replicated, Transient, BlueprintReadWrite)
|
||||||
|
TArray<float> MaxCooldownDuration;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
UPROPERTY(Replicated, Transient)
|
UPROPERTY(Replicated, Transient)
|
||||||
@@ -72,9 +76,6 @@ private:
|
|||||||
UPROPERTY(Replicated, Transient)
|
UPROPERTY(Replicated, Transient)
|
||||||
TeamType Team;
|
TeamType Team;
|
||||||
|
|
||||||
UPROPERTY(Replicated, Transient)
|
|
||||||
float CooldownDuration[(uint8)CooldownType::SIZE] = { 0.0f, };
|
|
||||||
|
|
||||||
UPROPERTY(Replicated, Transient)
|
UPROPERTY(Replicated, Transient)
|
||||||
ECharacterState State;
|
ECharacterState State;
|
||||||
UPROPERTY(Replicated, Transient)
|
UPROPERTY(Replicated, Transient)
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
|
|
||||||
#include "PerformSkill.h"
|
|
||||||
|
|
||||||
// Add default functionality here for any IPerformSkill functions that are not pure virtual.
|
|
||||||
@@ -1,28 +0,0 @@
|
|||||||
// Fill out your copyright notice in the Description page of Project Settings.
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
|
||||||
#include "UObject/Interface.h"
|
|
||||||
#include "PerformSkill.generated.h"
|
|
||||||
|
|
||||||
// This class does not need to be modified.
|
|
||||||
UINTERFACE(MinimalAPI)
|
|
||||||
class UPerformSkill : public UInterface
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
class PROMETHER_API IPerformSkill
|
|
||||||
{
|
|
||||||
GENERATED_BODY()
|
|
||||||
|
|
||||||
// Add interface functions to this class. This is the class that will be inherited to implement this interface.
|
|
||||||
public:
|
|
||||||
virtual void Skill4Started() = 0;
|
|
||||||
virtual void Skill4Triggered() = 0;
|
|
||||||
virtual void Skill4Completed() = 0;
|
|
||||||
};
|
|
||||||
@@ -91,3 +91,45 @@ struct FUniqueObjectID
|
|||||||
int32 RandomUniqueNumber;
|
int32 RandomUniqueNumber;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
UENUM(BlueprintType)
|
||||||
|
enum class EStats : uint8
|
||||||
|
{
|
||||||
|
Health,
|
||||||
|
HPRegeneration,
|
||||||
|
HealAndShieldpower,
|
||||||
|
Armor,
|
||||||
|
MagicResistance,
|
||||||
|
Tenacity,
|
||||||
|
SlowRisist,
|
||||||
|
AttackSpeed,
|
||||||
|
AttackDamage,
|
||||||
|
AbilityPower,
|
||||||
|
CriticalStrikeChance,
|
||||||
|
CriticalStrikeDamage,
|
||||||
|
ArmorPenetration,
|
||||||
|
MagicPenetration,
|
||||||
|
LifeSteal,
|
||||||
|
PhysicalVamp,
|
||||||
|
Omnivamp,
|
||||||
|
AbilityHaste,
|
||||||
|
Mana,
|
||||||
|
ManaRegeneration,
|
||||||
|
Energy,
|
||||||
|
EnergyRegeneration,
|
||||||
|
AttackRange,
|
||||||
|
MovementSpeed,
|
||||||
|
GoldGeneration,
|
||||||
|
AttackDamageGrowth,
|
||||||
|
AttackSpeedGrowth,
|
||||||
|
ArmorGrowth,
|
||||||
|
MagicResistanceGrowth,
|
||||||
|
HealthGrowth,
|
||||||
|
HealthRegenerationGrowth,
|
||||||
|
ManaGrowth,
|
||||||
|
ManaRegenerationGrowth,
|
||||||
|
Skill1Cost,
|
||||||
|
Skill2Cost,
|
||||||
|
Skill3Cost,
|
||||||
|
Skill4Cost,
|
||||||
|
SIZE
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user