일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
Tags
- 언리얼 엔진
- Replication
- stride
- animation
- unity
- gameplay tag
- photon fusion2
- 언리얼엔진
- gas
- widget
- level design
- CTF
- Aegis
- MAC
- local prediction
- attribute
- 게임개발
- UI
- Multiplay
- 유니티
- C++
- ability task
- listen server
- Unreal Engine
- 게임 개발
- os
- gameplay effect
- 보안
- gameplay ability system
- rpc
Archives
- Today
- Total
Replicated
[Drag Down] 게임 모드 및 컨트롤러 분리 본문
대기방이랑 실 게임 플레이도 게임 모드랑 컨트롤러 분리하는게 훨씬 나을 것 같다
정확힌 컨트롤러 분리를 위해 게임 모드도 새로 만든다
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Player/DDPlayerController.h"
#include "DDWatingPlayerController.generated.h"
/**
*
*/
UCLASS()
class DRAGDOWN_API ADDWatingPlayerController : public ADDPlayerController
{
GENERATED_BODY()
public:
virtual void BeginPlay() override;
// Ready Setting
public:
UFUNCTION(BlueprintCallable)
void SetUserReady(bool bIsReady);
protected:
void HandleSetUserReady(bool bIsReady);
UFUNCTION(Server, Reliable)
void ServerSetUserReady(bool bIsReady);
};
// Fill out your copyright notice in the Description page of Project Settings.
#include "Player/DDWatingPlayerController.h"
#include "Game/DDGameState.h"
void ADDWatingPlayerController::BeginPlay()
{
Super::BeginPlay();
FInputModeGameAndUI InputMode;
SetInputMode(InputMode);
bShowMouseCursor = true;
}
void ADDWatingPlayerController::SetUserReady(bool bIsReady)
{
if (HasAuthority())
{
HandleSetUserReady(bIsReady);
}
else
{
ServerSetUserReady(bIsReady);
}
}
void ADDWatingPlayerController::HandleSetUserReady(bool bIsReady)
{
if (GameState)
{
GameState->SetPlayerReady(PlayerIdx, bIsReady);
}
}
void ADDWatingPlayerController::ServerSetUserReady_Implementation(bool bIsReady)
{
HandleSetUserReady(bIsReady);
}
실 게임 플레이 시엔 Ready 상태 필요하지도 않은데 사용하게 되어 상속해서 내렸다
'언리얼 엔진 > Drag Down' 카테고리의 다른 글
[Drag Down] 맵 이동 포탈 (0) | 2025.05.21 |
---|---|
[Drag Down] PlayerState에서 이름과 Ready 관리, GameState 전체 상태 관리 (0) | 2025.05.21 |
[Drag Down] GameState에서 Player Idx 및 Ready 상태 관리하기 (PlayerState로 분리 예정) (0) | 2025.05.18 |
[Drag Down] 플레이어 UI 기획 (각 플레이어 Z축 위치, 이름 표기) (0) | 2025.05.12 |
[Drag Down] 매치메이킹 UI (0) | 2025.05.12 |