Compare commits
2 Commits
21d42d9846
...
84f552b4fa
| Author | SHA1 | Date | |
|---|---|---|---|
| 84f552b4fa | |||
| 1308338953 |
Binary file not shown.
BIN
Content/Input/Actions/IA_Kick.uasset
Normal file
BIN
Content/Input/Actions/IA_Kick.uasset
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.
BIN
Content/ZMMO/Core/Player/BP_ZeusPlayerCharacter.uasset
Normal file
BIN
Content/ZMMO/Core/Player/BP_ZeusPlayerCharacter.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/ZMMO/GAS/Cues/GC_Kick.uasset
Normal file
BIN
Content/ZMMO/GAS/Cues/GC_Kick.uasset
Normal file
Binary file not shown.
@@ -173,6 +173,12 @@ void AZeusCharacter::Tick(const float DeltaSeconds)
|
||||
|
||||
void AZeusCharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||
{
|
||||
// IMPORTANTE: chamar Super:: pra que BPs filhos consigam auto-bindar
|
||||
// nodes EnhancedInputAction no Event Graph (ex: GA_Kick / IA_Kick no
|
||||
// BP_ThirdPersonCharacter). Sem isso, bindings em BP ficam orfaos --
|
||||
// so' bindings C++ (Move/Look/Jump/Dash abaixo) recebem input.
|
||||
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||
|
||||
if (UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(PlayerInputComponent))
|
||||
{
|
||||
EnhancedInputComponent->BindAction(JumpAction, ETriggerEvent::Started, this, &AZeusCharacter::OnJumpPressed);
|
||||
|
||||
@@ -5,10 +5,47 @@
|
||||
#include "ZeusPlayerController.h"
|
||||
#include "ZeusPlayerState.h"
|
||||
|
||||
#include "UObject/ConstructorHelpers.h"
|
||||
|
||||
AZeusGameMode::AZeusGameMode()
|
||||
{
|
||||
DefaultPawnClass = AZeusCharacter::StaticClass();
|
||||
// DefaultPawnClass: usar o BP filho (BP_ThirdPersonCharacter) em vez do
|
||||
// C++ puro. BPs filhos so' sao instanciados se o pawn possessed for da
|
||||
// classe BP -- caso contrario o engine cria a classe C++ direta e perde
|
||||
// TUDO que o designer fez no BP (EnhancedInputAction events, AnimBP wire,
|
||||
// hooks de ability, componentes adicionados via editor).
|
||||
//
|
||||
// Fallback pra AZeusCharacter pura se o asset BP nao existir (asset
|
||||
// renomeado/deletado por engano -- nao deve acontecer em prod).
|
||||
static ConstructorHelpers::FClassFinder<APawn> DefaultPawnBP(
|
||||
TEXT("/Game/ZMMO/Core/Player/BP_ZeusPlayerCharacter"));
|
||||
if (DefaultPawnBP.Succeeded())
|
||||
{
|
||||
DefaultPawnClass = DefaultPawnBP.Class;
|
||||
}
|
||||
else
|
||||
{
|
||||
DefaultPawnClass = AZeusCharacter::StaticClass();
|
||||
}
|
||||
|
||||
PlayerControllerClass = AZeusPlayerController::StaticClass();
|
||||
PlayerStateClass = AZeusPlayerState::StaticClass();
|
||||
|
||||
// PlayerStateClass: usar BP filho pelo mesmo motivo do DefaultPawnClass --
|
||||
// componentes BP-added (ex: UZeusGASComponent listado em DefaultGame.ini
|
||||
// ComponentClasses), eventos no Event Graph e overrides do designer so'
|
||||
// existem na classe BP. C++ direto (AZeusPlayerState) perde tudo isso.
|
||||
// TODO: renomear o asset pra BP_ZeusPlayerState pra alinhar com a convencao
|
||||
// (BP_ZeusPlayerCharacter) -- quando renomear, atualizar o path aqui.
|
||||
static ConstructorHelpers::FClassFinder<APlayerState> PlayerStateBP(
|
||||
TEXT("/Game/ZMMO/Core/Player/BP_PlayerState"));
|
||||
if (PlayerStateBP.Succeeded())
|
||||
{
|
||||
PlayerStateClass = PlayerStateBP.Class;
|
||||
}
|
||||
else
|
||||
{
|
||||
PlayerStateClass = AZeusPlayerState::StaticClass();
|
||||
}
|
||||
|
||||
HUDClass = AZeusHUD::StaticClass();
|
||||
}
|
||||
|
||||
@@ -76,6 +76,10 @@
|
||||
{
|
||||
"Name": "CommonUI",
|
||||
"Enabled": true
|
||||
},
|
||||
{
|
||||
"Name": "GameplayAbilities",
|
||||
"Enabled": true
|
||||
}
|
||||
],
|
||||
"AdditionalPluginDirectories": [
|
||||
|
||||
Reference in New Issue
Block a user