이펙트 다운로드, 평타 수정중
This commit is contained in:
@@ -49,9 +49,16 @@ void ADefaultPlayerCharacter::Tick(float DeltaTime)
|
||||
*/
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ADefaultPlayerCharacter::Attack_Implementation()
|
||||
{
|
||||
//UGameplayStatics::ApplyDamage(Target, MyState->GetAttackDamage(), Cast<AController>(GetOwner()), this, UBaseAttack::StaticClass());
|
||||
NetMulticast_Attack();
|
||||
}
|
||||
|
||||
void ADefaultPlayerCharacter::NetMulticast_Attack_Implementation()
|
||||
{
|
||||
BP_Attack();
|
||||
}
|
||||
|
||||
float ADefaultPlayerCharacter::TakeDamage_Implementation(float DamageAmount, struct FDamageEvent const& DamageEvent, class AController* EventInstigator, AActor* DamageCauser)
|
||||
@@ -118,6 +125,8 @@ float ADefaultPlayerCharacter::TakeDamage_Implementation(float DamageAmount, str
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ADefaultPlayerCharacter::Skill1_Implementation()
|
||||
{
|
||||
NetMulticast_Skill1();
|
||||
|
||||
@@ -21,8 +21,13 @@ public:
|
||||
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
UFUNCTION(BlueprintNativeEvent)
|
||||
void Attack();
|
||||
UFUNCTION(BlueprintCallable, Server, Reliable)
|
||||
void Attack();
|
||||
//Override me
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void BP_Attack();
|
||||
UFUNCTION(NetMulticast, Reliable)
|
||||
void NetMulticast_Attack();
|
||||
UFUNCTION(BlueprintNativeEvent)
|
||||
float TakeDamage( float Damage,
|
||||
struct FDamageEvent const& DamageEvent,
|
||||
|
||||
@@ -430,7 +430,7 @@ void ADefaultPlayerController::Move()
|
||||
|
||||
GetHitResultUnderCursorForObjects(ObjectTypes, true, HitResult);
|
||||
ACharacter* HitCharacter = 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>
|
||||
HitTarget = Cast<ACharacter>(HitResult.GetActor());
|
||||
HitTarget = HitResult.GetActor();
|
||||
|
||||
UE_LOG(LogTemp, Warning, TEXT("%s"), *HitResult.GetActor()->GetName());
|
||||
|
||||
@@ -646,13 +646,12 @@ void ADefaultPlayerController::RepeatedAttack()
|
||||
{
|
||||
if (!GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats::Attackable] == 0)
|
||||
return;
|
||||
ACharacter* HitCharacter = HitTarget;
|
||||
Attack(HitCharacter);
|
||||
Attack();
|
||||
}
|
||||
|
||||
|
||||
|
||||
void ADefaultPlayerController::Attack(ACharacter* HitObject)
|
||||
void ADefaultPlayerController::Attack()
|
||||
{
|
||||
|
||||
float MinDistance = GetPlayerState<ADefaultPlayerState>()->Stats[(uint8)EStats:: AttackRange];
|
||||
@@ -663,7 +662,7 @@ void ADefaultPlayerController::Attack(ACharacter* HitObject)
|
||||
if ((GetPlayerState<ADefaultPlayerState>()->CooldownDuration[(uint8)CooldownType::Attack] != 0))
|
||||
return;
|
||||
|
||||
Destination = HitObject->GetActorLocation(); // HitObject<63><74> <20><>ġ<EFBFBD><C4A1> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
FVector Location = GetPawn()->GetActorLocation();
|
||||
Location.X = 0;
|
||||
|
||||
@@ -673,9 +672,6 @@ void ADefaultPlayerController::Attack(ACharacter* HitObject)
|
||||
Multicast_SetRotation(Destination);
|
||||
Server_SetRotation(Destination);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
UE_LOG(LogTemp, Warning, TEXT("Attack"));
|
||||
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
|
||||
@@ -686,9 +682,11 @@ void ADefaultPlayerController::Attack(ACharacter* HitObject)
|
||||
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);
|
||||
}
|
||||
SetTarget();
|
||||
}
|
||||
|
||||
void ADefaultPlayerController::MoveToLocation_Implementation(FVector Location)
|
||||
|
||||
@@ -69,14 +69,17 @@ public:
|
||||
void RepeatedAttack();
|
||||
|
||||
|
||||
UFUNCTION(BlueprintImplementableEvent)
|
||||
void SetTarget();
|
||||
|
||||
void Attack(ACharacter* HitCharacter);
|
||||
void Attack();
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
float MouseClickInterval;
|
||||
|
||||
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "My Actor")
|
||||
ACharacter * HitTarget;
|
||||
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "My Actor")
|
||||
AActor* HitTarget;
|
||||
|
||||
|
||||
private:
|
||||
UPROPERTY(EditAnywhere, Category = "Input")
|
||||
|
||||
5
Source/Promether/Private/DamageType/ApDamage.cpp
Normal file
5
Source/Promether/Private/DamageType/ApDamage.cpp
Normal file
@@ -0,0 +1,5 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DamageType/ApDamage.h"
|
||||
|
||||
17
Source/Promether/Public/DamageType/ApDamage.h
Normal file
17
Source/Promether/Public/DamageType/ApDamage.h
Normal file
@@ -0,0 +1,17 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "GameFramework/DamageType.h"
|
||||
#include "ApDamage.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class PROMETHER_API UApDamage : public UDamageType
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user