파운드, 알리움 스킬 모션 구현(최종)

This commit is contained in:
SJW1024
2023-10-03 22:00:29 +09:00
parent fcbc476c82
commit 414dc0a422
40 changed files with 52 additions and 157 deletions

View File

@@ -133,7 +133,7 @@ FString ADeathmatch::InitNewPlayer(APlayerController* NewPlayerController, const
//DebugPerpose
if (Type == CharacterType::Lukriel)
{
Type = CharacterType::Lb;
Type = CharacterType::Allium;
}
if (Team == TeamType::Null)
{

View File

@@ -16,7 +16,7 @@ ADefaultPlayerCharacter::ADefaultPlayerCharacter()
CameraSpringArm = CreateDefaultSubobject<USpringArmComponent>(TEXT("SpringArm"));
CameraSpringArm->SetRelativeLocationAndRotation(FVector(0.0f, 0.0f, 0.0f), FRotator(-45.0f, 0.0f, 0.0f));
CameraSpringArm->SetAbsolute(false, true, true);
CameraSpringArm->TargetArmLength = 2000.f;
CameraSpringArm->TargetArmLength = 1000.f;
CameraSpringArm->bEnableCameraLag = true;
CameraSpringArm->bDoCollisionTest = false;
CameraSpringArm->CameraLagSpeed = 3.0f;

View File

@@ -233,17 +233,6 @@ void ADefaultPlayerController::SetupInputComponent()
void ADefaultPlayerController::Skill1()
{
//if (!(GetPlayerState<ADefaultPlayerState>()->Stats.Mana >= 100))
// return;
FVector Location = GetPawn()->GetActorLocation();
Location.Z = 0;
SimpleMoveToLocation(this, Location);
this->MoveToLocation(Location);
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
UE_LOG(LogTemp, Warning, TEXT("Skill1"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill1);
@@ -251,14 +240,6 @@ void ADefaultPlayerController::Skill1()
void ADefaultPlayerController::Skill2()
{
FVector Location = GetPawn()->GetActorLocation();
Location.Z = 0;
SimpleMoveToLocation(this, Location);
this->MoveToLocation(Location);
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
UE_LOG(LogTemp, Warning, TEXT("Skill2"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill2);
@@ -266,14 +247,6 @@ void ADefaultPlayerController::Skill2()
void ADefaultPlayerController::Skill3()
{
FVector Location = GetPawn()->GetActorLocation();
Location.Z = 0;
SimpleMoveToLocation(this, Location);
this->MoveToLocation(Location);
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
UE_LOG(LogTemp, Warning, TEXT("Skill3"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill3);
@@ -281,17 +254,9 @@ void ADefaultPlayerController::Skill3()
void ADefaultPlayerController::Skill4()
{
FVector Location = GetPawn()->GetActorLocation();
Location.Z = 0;
SimpleMoveToLocation(this, Location);
this->MoveToLocation(Location);
GetPawn()->SetActorRotation((GetMouseHitLocation() - Location).Rotation());
UE_LOG(LogTemp, Warning, TEXT("Skill4"));
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Attack);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4Started);
GetPlayerState<ADefaultPlayerState>()->SetAttackType(CooldownType::Skill4);
}
void ADefaultPlayerController::RuneSpell1()
@@ -349,15 +314,6 @@ void ADefaultPlayerController::MoveStarted()
}
void ADefaultPlayerController::Move()
{
FVector Destination = GetMouseHitLocation();
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Moving);
SimpleMoveToLocation(this, Destination);
this->MoveToLocation(Destination);
}
FVector ADefaultPlayerController::GetMouseHitLocation()
{
FHitResult HitResult;
GetHitResultUnderCursor(ECollisionChannel::ECC_Visibility, true, HitResult);
@@ -369,7 +325,6 @@ FVector ADefaultPlayerController::GetMouseHitLocation()
ActorLocation.Z = 0;
float CapsuleRadius = GetPawn<ACharacter>()->GetCapsuleComponent()->GetScaledCapsuleRadius();
FVector Destination = (HitResult.Location - ActorLocation).GetSafeNormal() * CapsuleRadius + HitResult.Location;
DrawDebugLine(GetWorld(), ActorLocation, HitResult.Location, FColor::Blue, false, 1, 0, 1);
@@ -393,7 +348,9 @@ FVector ADefaultPlayerController::GetMouseHitLocation()
}
}
return Destination;
GetPlayerState<ADefaultPlayerState>()->SetState(ECharacterState::Moving);
SimpleMoveToLocation(this, Destination);
this->MoveToLocation(Destination);
}
void ADefaultPlayerController::SimpleMoveToLocation(AController* Controller, const FVector& GoalLocation)

View File

@@ -47,8 +47,6 @@ public:
UFUNCTION(Server, Reliable)
void MoveToLocation(FVector Location);
FVector GetMouseHitLocation();
UFUNCTION(BlueprintCallable, Category = "AI|Navigation")
void SimpleMoveToLocation(AController* Controller, const FVector& Goal);

View File

@@ -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.

View File

@@ -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;
};

View File

@@ -36,9 +36,7 @@ enum class CooldownType : uint8
Skill1,
Skill2,
Skill3,
Skill4Started,
Skill4Triggered,
Skill4Comlpleted,
Skill4,
RuneSpell1,
RuneSpell2,
Ward,