Level3 polish
This commit is contained in:
parent
cbfcfdcdf7
commit
46777fbc3a
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Charles.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Charles.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Human.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Human.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/BP_Player.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BB_StoryNPC.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BB_StoryNPC.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BP_StoryNPC_AIController.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BP_StoryNPC_AIController.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BP_StoryNPC_MoveTarget.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BP_StoryNPC_MoveTarget.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BTT_StoryNPC_Focus.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BTT_StoryNPC_Focus.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BT_StoryNPC.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Blueprints/Characters/StoryNPC/BT_StoryNPC.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/L_Level2.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_2/L_Level2.umap
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/BP_Level3_StartRoom_EndButton.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/BP_Level3_StartRoom_EndButton.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/ExperimentalRoom/BP_Level3_EndBegin.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/ExperimentalRoom/BP_Level3_EndBegin.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/ExperimentalRoom/BP_Level3_EndEnd.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/ExperimentalRoom/BP_Level3_EndEnd.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.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/ExperimentalRoom/BP_Level3_Intro.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/ExperimentalRoom/BP_Level3_Intro.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/TechnicalRoom/BP_Level3_TechnicalRoom_Cable.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/TechnicalRoom/BP_Level3_TechnicalRoom_Cable.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/TechnicalRoom/BP_Level3_TechnicalRoom_Intro.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Actors/TechnicalRoom/BP_Level3_TechnicalRoom_Intro.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_End.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_End.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_ExperimentalRoom_End1.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_ExperimentalRoom_End1.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_ExperimentalRoom_End2.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_ExperimentalRoom_End2.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_ExperimentalRoom_Fail.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_ExperimentalRoom_Fail.uasset
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_Intro.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_Intro.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_TechnicalRoom.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Dialogue/DT_Dialogue_Level3_TechnicalRoom.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/EventCodes/E_Level3_RoomCode.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/EventCodes/E_Level3_RoomCode.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/GC_Level3_GlassWall.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/GC_Level3_GlassWall.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/L_Level3.umap
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Materials/M_Level3_LedGreen.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Materials/M_Level3_LedGreen.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Materials/M_Level3_LedRed1.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Materials/M_Level3_LedRed1.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Materials/TechnicalRoom/MI_Level3_TechnicalRoom_BlinkSiren.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Materials/TechnicalRoom/MI_Level3_TechnicalRoom_BlinkSiren.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Sequences/Seq_Level3_End.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Sequences/Seq_Level3_End.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Sequences/Seq_Level3_Intro.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Levels/Level_3/Sequences/Seq_Level3_Intro.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Levels/Test/L_Test.umap
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Models/Characters/Human/BPA_Human.uasset
(Stored with Git LFS)
Normal file
BIN
UnrealProject/Lost_Edge/Content/Models/Characters/Human/BPA_Human.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LPGenericPropsSet02/Teapot/SM_TeapotSet01Base.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LPGenericPropsSet02/Teapot/SM_TeapotSet01Base.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LPGenericPropsSet02/Teapot/SM_TeapotSet01Cover.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LPGenericPropsSet02/Teapot/SM_TeapotSet01Cover.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LowPolyServerRoom/SM_wall.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LowPolyServerRoom/SM_wall.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LowPolyServerRoom/SM_wall_door.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/Models/Marketplace/LowPolyServerRoom/SM_wall_door.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
UnrealProject/Lost_Edge/Content/UI/Components/Classes/UICC_Journal_Text.uasset
(Stored with Git LFS)
BIN
UnrealProject/Lost_Edge/Content/UI/Components/Classes/UICC_Journal_Text.uasset
(Stored with Git LFS)
Binary file not shown.
@ -0,0 +1,49 @@
|
|||||||
|
// Oleg Petruny proprietary.
|
||||||
|
|
||||||
|
#include "CustomCharacter.h"
|
||||||
|
|
||||||
|
#include "GameFramework/CharacterMovementComponent.h"
|
||||||
|
|
||||||
|
void ACustomCharacter::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
ACharacter::Tick(DeltaTime);
|
||||||
|
|
||||||
|
// stabilize move speed by fps
|
||||||
|
AddActorLocalOffset(ConsumeMovementInputVector() * DeltaTime);
|
||||||
|
|
||||||
|
// update isMoving flag
|
||||||
|
auto loc = GetActorLocation();
|
||||||
|
bIsMoving = (loc != oldLocation);
|
||||||
|
oldLocation = std::move(loc);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ACustomCharacter::IsMoving()
|
||||||
|
{
|
||||||
|
return bIsMoving;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ACustomCharacter::IsRunning()
|
||||||
|
{
|
||||||
|
return GetCharacterMovement()->MaxWalkSpeed > moveSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ACustomCharacter::FlyMode(bool on)
|
||||||
|
{
|
||||||
|
GetCharacterMovement()->GravityScale = on ? 0.0f : 1.0f;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ACustomCharacter::BeginPlay()
|
||||||
|
{
|
||||||
|
ACharacter::BeginPlay();
|
||||||
|
|
||||||
|
oldLocation = GetActorLocation();
|
||||||
|
GetCharacterMovement()->MaxWalkSpeed = moveSpeed;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ACustomCharacter::SwitchRun(bool run)
|
||||||
|
{
|
||||||
|
if(run)
|
||||||
|
GetCharacterMovement()->MaxWalkSpeed = moveSpeed * runSpeedMultiplier;
|
||||||
|
else
|
||||||
|
GetCharacterMovement()->MaxWalkSpeed = moveSpeed;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
// Oleg Petruny proprietary.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "GameFramework/Character.h"
|
||||||
|
|
||||||
|
#include "CustomCharacter.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Extension to the standard editor character class.
|
||||||
|
* Main intention is to expand animations capabilities.
|
||||||
|
*/
|
||||||
|
UCLASS(Blueprintable, BlueprintType)
|
||||||
|
class ACustomCharacter : public ACharacter
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintPure)
|
||||||
|
bool IsMoving();
|
||||||
|
UFUNCTION(BlueprintPure)
|
||||||
|
bool IsRunning();
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable)
|
||||||
|
void FlyMode(bool on);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
UFUNCTION(BlueprintCallable, Category = Character)
|
||||||
|
virtual void SwitchRun(bool run);
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
float moveSpeed = 200;
|
||||||
|
UPROPERTY(EditAnywhere)
|
||||||
|
float runSpeedMultiplier = 4;
|
||||||
|
|
||||||
|
bool bIsMoving = false;
|
||||||
|
FVector oldLocation;
|
||||||
|
};
|
@ -85,6 +85,7 @@ void UDialogueManager::EnqueDialogue(FDialogueEnqueProperties properties, FDialo
|
|||||||
nextDialogues.Enqueue(properties);
|
nextDialogues.Enqueue(properties);
|
||||||
endCallbacks.Enqueue(endCallback);
|
endCallbacks.Enqueue(endCallback);
|
||||||
|
|
||||||
|
if(leadDialogueProperties == nullptr)
|
||||||
PlayNextDialogue();
|
PlayNextDialogue();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -248,7 +249,11 @@ void UDialogueManager::OnDialogueEnd()
|
|||||||
}
|
}
|
||||||
|
|
||||||
dialoguesLock.Unlock();
|
dialoguesLock.Unlock();
|
||||||
if(!endCallbacks.IsEmpty())
|
|
||||||
|
if(leadDialogueProperties != nullptr)
|
||||||
|
PlayNextDialogue();
|
||||||
|
|
||||||
|
if(leadDialogueProperties == nullptr && !endCallbacks.IsEmpty())
|
||||||
PlayNextDialogue();
|
PlayNextDialogue();
|
||||||
|
|
||||||
{
|
{
|
||||||
|
@ -27,7 +27,7 @@ UInteractableActivator::UInteractableActivator(const FObjectInitializer& ObjectI
|
|||||||
{
|
{
|
||||||
for(int32 i = 0; i < ECC_MAX; ++i)
|
for(int32 i = 0; i < ECC_MAX; ++i)
|
||||||
{
|
{
|
||||||
if(collisions->ReturnChannelNameFromContainerIndex(i) == FName{ TEXT("Interactable") })
|
if(collisions->ReturnChannelNameFromContainerIndex(i) == FName{ TEXT("InteractableTrace") })
|
||||||
{
|
{
|
||||||
collisionChannel = (ECollisionChannel)i;
|
collisionChannel = (ECollisionChannel)i;
|
||||||
break;
|
break;
|
||||||
|
@ -28,7 +28,7 @@ public:
|
|||||||
inline void CallNextState() { ++state; NextState(); }
|
inline void CallNextState() { ++state; NextState(); }
|
||||||
|
|
||||||
/** Calls specific event id in level */
|
/** Calls specific event id in level */
|
||||||
UFUNCTION(BlueprintImplementableEvent)
|
UFUNCTION(BlueprintImplementableEvent, BlueprintCallable)
|
||||||
void CallEvent(int32 id);
|
void CallEvent(int32 id);
|
||||||
|
|
||||||
inline int32 GetState() { return state; };
|
inline int32 GetState() { return state; };
|
||||||
|
@ -26,7 +26,6 @@ namespace
|
|||||||
}
|
}
|
||||||
|
|
||||||
APlayerBase::APlayerBase()
|
APlayerBase::APlayerBase()
|
||||||
: ACharacter()
|
|
||||||
{
|
{
|
||||||
static ConstructorHelpers::FObjectFinder<UInputMappingContext> asset{ TEXT("/Script/EnhancedInput.InputMappingContext'/Game/Input/IMC_Player.IMC_Player'") };
|
static ConstructorHelpers::FObjectFinder<UInputMappingContext> asset{ TEXT("/Script/EnhancedInput.InputMappingContext'/Game/Input/IMC_Player.IMC_Player'") };
|
||||||
context = asset.Object;
|
context = asset.Object;
|
||||||
@ -53,15 +52,7 @@ APlayerBase::APlayerBase()
|
|||||||
|
|
||||||
void APlayerBase::Tick(float DeltaTime)
|
void APlayerBase::Tick(float DeltaTime)
|
||||||
{
|
{
|
||||||
ACharacter::Tick(DeltaTime);
|
ACustomCharacter::Tick(DeltaTime);
|
||||||
|
|
||||||
// stabilize move speed by fps
|
|
||||||
AddActorLocalOffset(ConsumeMovementInputVector() * DeltaTime);
|
|
||||||
|
|
||||||
// update isMoving flag
|
|
||||||
auto loc = GetActorLocation();
|
|
||||||
bIsMoving = (loc != oldLocation);
|
|
||||||
oldLocation = std::move(loc);
|
|
||||||
|
|
||||||
rotationInput = FRotator::ZeroRotator;
|
rotationInput = FRotator::ZeroRotator;
|
||||||
}
|
}
|
||||||
@ -80,14 +71,9 @@ APlayerBase* APlayerBase::Get()
|
|||||||
|
|
||||||
void APlayerBase::BeginPlay()
|
void APlayerBase::BeginPlay()
|
||||||
{
|
{
|
||||||
ACharacter::BeginPlay();
|
ACustomCharacter::BeginPlay();
|
||||||
|
|
||||||
auto world = GetWorld();
|
cameraManager = UGameplayStatics::GetPlayerCameraManager(GetWorld(), 0);
|
||||||
|
|
||||||
oldLocation = GetActorLocation();
|
|
||||||
GetCharacterMovement()->MaxWalkSpeed = moveSpeed;
|
|
||||||
|
|
||||||
cameraManager = UGameplayStatics::GetPlayerCameraManager(world, 0);
|
|
||||||
if(cameraManager)
|
if(cameraManager)
|
||||||
{
|
{
|
||||||
cameraManager->ViewPitchMin = minPitch;
|
cameraManager->ViewPitchMin = minPitch;
|
||||||
@ -97,16 +83,6 @@ void APlayerBase::BeginPlay()
|
|||||||
LoadInteractablesActivators();
|
LoadInteractablesActivators();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool APlayerBase::IsMoving()
|
|
||||||
{
|
|
||||||
return bIsMoving;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool APlayerBase::IsRunning()
|
|
||||||
{
|
|
||||||
return GetCharacterMovement()->MaxWalkSpeed > moveSpeed;
|
|
||||||
}
|
|
||||||
|
|
||||||
void APlayerBase::LockPlayer(FPlayerLock lock)
|
void APlayerBase::LockPlayer(FPlayerLock lock)
|
||||||
{
|
{
|
||||||
walkLocked += lock.walk;
|
walkLocked += lock.walk;
|
||||||
@ -133,11 +109,6 @@ void APlayerBase::UnlockPlayer(FPlayerLock lock)
|
|||||||
ResetInteractions();
|
ResetInteractions();
|
||||||
}
|
}
|
||||||
|
|
||||||
void APlayerBase::FlyMode(bool on)
|
|
||||||
{
|
|
||||||
GetCharacterMovement()->GravityScale = on ? 0.0f : 1.0f;
|
|
||||||
}
|
|
||||||
|
|
||||||
void APlayerBase::ResetInteractions()
|
void APlayerBase::ResetInteractions()
|
||||||
{
|
{
|
||||||
InteractableDeactivated(lastInteractable, static_cast<EActivatorType>(0xFF));
|
InteractableDeactivated(lastInteractable, static_cast<EActivatorType>(0xFF));
|
||||||
@ -216,10 +187,7 @@ void APlayerBase::SwitchRun(bool run)
|
|||||||
if(runLocked)
|
if(runLocked)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(run)
|
ACustomCharacter::SwitchRun(run);
|
||||||
GetCharacterMovement()->MaxWalkSpeed = moveSpeed * runSpeedMultiplier;
|
|
||||||
else
|
|
||||||
GetCharacterMovement()->MaxWalkSpeed = moveSpeed;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void APlayerBase::UpdatePitch(float min, float max)
|
void APlayerBase::UpdatePitch(float min, float max)
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "GameFramework/Character.h"
|
#include "CustomCharacter.h"
|
||||||
|
|
||||||
#include "PlayerBase.generated.h"
|
#include "PlayerBase.generated.h"
|
||||||
|
|
||||||
@ -32,7 +32,7 @@ struct FPlayerLock
|
|||||||
* prepares for work with interactables, and manages basic player input.
|
* prepares for work with interactables, and manages basic player input.
|
||||||
*/
|
*/
|
||||||
UCLASS(Blueprintable, BlueprintType)
|
UCLASS(Blueprintable, BlueprintType)
|
||||||
class APlayerBase : public ACharacter
|
class APlayerBase : public ACustomCharacter
|
||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
@ -40,7 +40,6 @@ public:
|
|||||||
/** setup input context, camera and inventory */
|
/** setup input context, camera and inventory */
|
||||||
APlayerBase();
|
APlayerBase();
|
||||||
|
|
||||||
|
|
||||||
virtual void Tick(float DeltaTime) override;
|
virtual void Tick(float DeltaTime) override;
|
||||||
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||||
|
|
||||||
@ -48,15 +47,12 @@ public:
|
|||||||
static APlayerBase* Get();
|
static APlayerBase* Get();
|
||||||
|
|
||||||
UFUNCTION(BlueprintPure)
|
UFUNCTION(BlueprintPure)
|
||||||
bool IsMoving();
|
|
||||||
UFUNCTION(BlueprintPure)
|
|
||||||
bool IsRunning();
|
|
||||||
|
|
||||||
FVector GetCameraLocation();
|
FVector GetCameraLocation();
|
||||||
|
UFUNCTION(BlueprintPure)
|
||||||
FVector GetCameraDirection();
|
FVector GetCameraDirection();
|
||||||
|
|
||||||
void LockPlayer(const FPlayerLock lock);
|
void LockPlayer(const FPlayerLock lock);
|
||||||
void UnlockPlayer(const FPlayerLock lock);
|
void UnlockPlayer(const FPlayerLock lock);
|
||||||
void FlyMode(bool on);
|
|
||||||
|
|
||||||
/** Force interactable activators reset */
|
/** Force interactable activators reset */
|
||||||
void ResetInteractions();
|
void ResetInteractions();
|
||||||
@ -103,8 +99,7 @@ protected:
|
|||||||
UFUNCTION(BlueprintCallable, Category = Character)
|
UFUNCTION(BlueprintCallable, Category = Character)
|
||||||
void MoveCharacter(FVector2D value);
|
void MoveCharacter(FVector2D value);
|
||||||
virtual void Jump() override;
|
virtual void Jump() override;
|
||||||
UFUNCTION(BlueprintCallable, Category = Character)
|
virtual void SwitchRun(bool run) override;
|
||||||
void SwitchRun(bool run);
|
|
||||||
|
|
||||||
/** Sets camera pitch range */
|
/** Sets camera pitch range */
|
||||||
UFUNCTION(BlueprintCallable, Category = Character)
|
UFUNCTION(BlueprintCallable, Category = Character)
|
||||||
@ -122,11 +117,6 @@ protected:
|
|||||||
UFUNCTION(BlueprintCallable, Category = Character)
|
UFUNCTION(BlueprintCallable, Category = Character)
|
||||||
void ShowMenu();
|
void ShowMenu();
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere)
|
|
||||||
float moveSpeed = 200;
|
|
||||||
UPROPERTY(EditAnywhere)
|
|
||||||
float runSpeedMultiplier = 4;
|
|
||||||
|
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
uint8 walkLocked = 0;
|
uint8 walkLocked = 0;
|
||||||
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
||||||
@ -148,8 +138,6 @@ protected:
|
|||||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly)
|
||||||
float maxPitch = 65;
|
float maxPitch = 65;
|
||||||
|
|
||||||
bool bIsMoving = false;
|
|
||||||
|
|
||||||
class AInteractable* lastInteractable = nullptr;
|
class AInteractable* lastInteractable = nullptr;
|
||||||
TArray<class UInteractableActivator*> interactableActivators;
|
TArray<class UInteractableActivator*> interactableActivators;
|
||||||
UPROPERTY()
|
UPROPERTY()
|
||||||
@ -163,7 +151,6 @@ private:
|
|||||||
void TakeToInventory(class AActor* actor);
|
void TakeToInventory(class AActor* actor);
|
||||||
void DropItem(class AActor* actor);
|
void DropItem(class AActor* actor);
|
||||||
|
|
||||||
FVector oldLocation;
|
|
||||||
FRotator rotationInput;
|
FRotator rotationInput;
|
||||||
|
|
||||||
bool itemDropLocked = false;
|
bool itemDropLocked = false;
|
||||||
|
@ -141,11 +141,17 @@ void UQuickTimeEventManager::OnInput(const FKey& key, bool released)
|
|||||||
|
|
||||||
void UQuickTimeEventManager::OnInputPressed(FKey key)
|
void UQuickTimeEventManager::OnInputPressed(FKey key)
|
||||||
{
|
{
|
||||||
|
if(key == EKeys::W || key == EKeys::A || key == EKeys::S || key == EKeys::D)
|
||||||
|
return;
|
||||||
|
|
||||||
OnInput(key, false);
|
OnInput(key, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void UQuickTimeEventManager::OnInputReleased(FKey key)
|
void UQuickTimeEventManager::OnInputReleased(FKey key)
|
||||||
{
|
{
|
||||||
|
if(key == EKeys::W || key == EKeys::A || key == EKeys::S || key == EKeys::D)
|
||||||
|
return;
|
||||||
|
|
||||||
OnInput(key, true);
|
OnInput(key, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user