Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
+EditProfiles=(Name="Trigger",CustomResponses=((Channel=Projectile, Response=ECR_Ignore)))

[/Script/EngineSettings.GameMapsSettings]
EditorStartupMap=/Game/Test/Maps/FirstPersonMap.FirstPersonMap
EditorStartupMap=/Game/EndlessHotel/Map/MainMenu.MainMenu
LocalMapOptions=
TransitionMap=
bUseSplitscreen=True
Expand Down
Binary file not shown.
Binary file modified Content/EndlessHotel/UI/Blueprint/InGame/WBP_InGame.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
7 changes: 3 additions & 4 deletions Source/Endless_Hotel/Elevator/Elevator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

#include "Elevator.h"
#include "Player/Controller/EHPlayerController.h"
#include "Player/Component/EHCameraComponent.h"
#include "Elevator/Elevator_Button.h"
#include "GameSystem/SubSystem/AnomalyProgressSubSystem.h"
#include "Player/Character/EHPlayer.h"
Expand All @@ -19,6 +18,8 @@

DEFINE_LOG_CATEGORY_STATIC(LogElevator, Log, All);

FElevatorDelegate AElevator::ElevatorDelegate;

#pragma region Base

AElevator::AElevator(const FObjectInitializer& ObjectInitializer)
Expand Down Expand Up @@ -282,9 +283,7 @@ void AElevator::ElevatorMove(FVector Start, FVector End, bool bIsStart)
}
else
{
ACharacter* Player = UGameplayStatics::GetPlayerCharacter(GetWorld(), 0);
UEHCameraComponent* PlayerCC = Player->FindComponentByClass<UEHCameraComponent>();
PlayerCC->StartEyeEffect(false);
ElevatorDelegate.Broadcast(bIsStart);
}
}

Expand Down
10 changes: 10 additions & 0 deletions Source/Endless_Hotel/Elevator/Elevator.h
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

#include "Actor/EHActor.h"
#include <CoreMinimal.h>
#include <Delegates/DelegateCombinations.h>
#include <Elevator.generated.h>

#pragma region ForwardDeclarations
Expand All @@ -17,6 +18,12 @@ class AElevator_Button;

#pragma endregion

#pragma region Declare

DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FElevatorDelegate, bool, bIsStart);

#pragma endregion

UCLASS()
class ENDLESS_HOTEL_API AElevator : public AEHActor
{
Expand Down Expand Up @@ -158,6 +165,9 @@ class ENDLESS_HOTEL_API AElevator : public AEHActor

#pragma region ElevatorMovement

public:
static FElevatorDelegate ElevatorDelegate;

protected:
UPROPERTY(EditAnywhere, Category = "Movement|Elevator")
FVector StartPos;
Expand Down
5 changes: 4 additions & 1 deletion Source/Endless_Hotel/Player/Component/EHCameraComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#include "UI/Controller/UI_Controller.h"
#include "UI/PopUp/Blur/UI_PopUp_Blur.h"
#include "Sound/SoundController.h"
#include "Elevator/Elevator.h"
#include <Kismet/GameplayStatics.h>
#include <Components/TimelineComponent.h>

Expand All @@ -20,7 +21,9 @@ void UEHCameraComponent::BeginPlay()
Super::BeginPlay();

SettingEyeEffect();
StartEyeEffect(true);

AElevator::ElevatorDelegate.AddDynamic(this, &ThisClass::StartEyeEffect);
AElevator::ElevatorDelegate.Broadcast(true);
}

#pragma endregion
Expand Down
5 changes: 2 additions & 3 deletions Source/Endless_Hotel/Player/Component/EHCameraComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,9 @@ class ENDLESS_HOTEL_API UEHCameraComponent : public UEHComponent

#pragma region Eye Effect

public:
void StartEyeEffect(bool bIsOpen);

protected:
UFUNCTION()
void StartEyeEffect(bool bIsOpen);
void SettingEyeEffect();

UFUNCTION()
Expand Down
31 changes: 25 additions & 6 deletions Source/Endless_Hotel/UI/HUD/InGame/UI_InGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include "GameSystem/SubSystem/AnomalyProgressSubSystem.h"
#include "GameSystem/SaveGame/SaveManager.h"
#include "Player/Character/EHPlayer.h"
#include "Elevator/Elevator.h"
#include <Components/Image.h>
#include <Components/CanvasPanelSlot.h>
#include <Kismet/GameplayStatics.h>
Expand All @@ -23,6 +24,8 @@ void UUI_InGame::NativeOnInitialized()
Subsystem->GameClearEvent.AddDynamic(this, &ThisClass::OpenDemoWidget);

UUI_PopUp_Brightness::SettingBrightness.AddDynamic(this, &ThisClass::SetBrightness);

AElevator::ElevatorDelegate.AddDynamic(this, &ThisClass::ShowCrosshair);
}

void UUI_InGame::NativeConstruct()
Expand All @@ -45,21 +48,37 @@ void UUI_InGame::ChangeCrosshair(bool bCanInteract)
if (bCanInteract)
{
Brush.SetResourceObject(Crosshair_Interact);
Brush.TintColor = FSlateColor(FLinearColor(1, 1, 1, 0.6f));
CPSlot->SetSize(FVector2D(8, 8));
CPSlot->SetPosition(FVector2D(-4, -4));
if (!bIsCrosshairInteractMode)
{
PlayAnimation(WidgetAnim_Interact);
bIsCrosshairInteractMode = true;
}
}
else
{
Brush.SetResourceObject(Crosshair_Normal);
Brush.TintColor = FSlateColor(FLinearColor(1, 1, 1, 0.3f));
CPSlot->SetSize(FVector2D(18, 18));
CPSlot->SetPosition(FVector2D(-9, -9));
if (bIsCrosshairInteractMode)
{
PlayAnimation(WidgetAnim_Normal);
bIsCrosshairInteractMode = false;
}
}

Crosshair->SetBrush(Brush);
}

void UUI_InGame::ShowCrosshair(bool bIsShow)
{
if (bIsShow)
{
PlayAnimation(WidgetAnim_ShowCrosshair);
}
else
{
Crosshair->SetVisibility(ESlateVisibility::Hidden);
}
}

#pragma endregion

#pragma region Brightness
Expand Down
16 changes: 16 additions & 0 deletions Source/Endless_Hotel/UI/HUD/InGame/UI_InGame.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@ class ENDLESS_HOTEL_API UUI_InGame : public UUI_HUD_Base
UPROPERTY(EditAnywhere)
TObjectPtr<class UTexture2D> Crosshair_Interact;

protected:
UFUNCTION()
void ShowCrosshair(bool bIsShow);

protected:
UPROPERTY(meta = (BindWidgetAnim), Transient)
TObjectPtr<UWidgetAnimation> WidgetAnim_ShowCrosshair;

UPROPERTY(meta = (BindWidgetAnim), Transient)
TObjectPtr<UWidgetAnimation> WidgetAnim_Interact;

UPROPERTY(meta = (BindWidgetAnim), Transient)
TObjectPtr<UWidgetAnimation> WidgetAnim_Normal;

bool bIsCrosshairInteractMode = false;

#pragma endregion

#pragma region Brightness
Expand Down