feat: add basic player setup, enemy class, and movement input
Added initial player settings, including movement logic. Created Enemy class with basic structure. Implemented input handling for movement and camera control.
This commit is contained in:
parent
594689b82b
commit
93b047dcfa
|
|
@ -49,7 +49,7 @@ bUseManualIPAddress=False
|
|||
ManualIPAddress=
|
||||
|
||||
[/Script/EngineSettings.GameMapsSettings]
|
||||
EditorStartupMap=/Game/Blueprints/Levels/TestMap.TestMap
|
||||
EditorStartupMap=/Game/Levels/TestMap.TestMap
|
||||
LocalMapOptions=
|
||||
TransitionMap=None
|
||||
bUseSplitscreen=True
|
||||
|
|
@ -58,7 +58,7 @@ ThreePlayerSplitscreenLayout=FavorTop
|
|||
FourPlayerSplitscreenLayout=Grid
|
||||
bOffsetPlayerGamepadIds=False
|
||||
GameInstanceClass=/Script/Engine.GameInstance
|
||||
GameDefaultMap=/Game/Blueprints/Levels/TestMap.TestMap
|
||||
GameDefaultMap=/Game/Levels/TestMap.TestMap
|
||||
ServerDefaultMap=/Engine/Maps/Entry.Entry
|
||||
GlobalDefaultGameMode=/Game/Blueprints/Game/BP_ExoGameMode.BP_ExoGameMode_C
|
||||
GlobalDefaultServerGameMode=None
|
||||
|
|
|
|||
BIN
Content/Blueprints/Characters/Enemy/BP_ExoEnemy.uasset
Normal file
BIN
Content/Blueprints/Characters/Enemy/BP_ExoEnemy.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Blueprints/Player/Inputs/IMC_ExoMappingContext.uasset
Normal file
BIN
Content/Blueprints/Player/Inputs/IMC_ExoMappingContext.uasset
Normal file
Binary file not shown.
BIN
Content/Blueprints/Player/Inputs/Inputs/AI_Look.uasset
Normal file
BIN
Content/Blueprints/Player/Inputs/Inputs/AI_Look.uasset
Normal file
Binary file not shown.
BIN
Content/Blueprints/Player/Inputs/Inputs/AI_Move.uasset
Normal file
BIN
Content/Blueprints/Player/Inputs/Inputs/AI_Move.uasset
Normal file
Binary file not shown.
|
|
@ -3,32 +3,21 @@
|
|||
|
||||
#include "Characters/ExoCharacterBase.h"
|
||||
|
||||
// Sets default values
|
||||
AExoCharacterBase::AExoCharacterBase()
|
||||
{
|
||||
// Set this character to call Tick() every frame. You can turn this off to improve performance if you don't need it.
|
||||
PrimaryActorTick.bCanEverTick = true;
|
||||
PrimaryActorTick.bCanEverTick = false;
|
||||
|
||||
Weapon = CreateDefaultSubobject<USkeletalMeshComponent>("Weapon");
|
||||
Weapon->SetupAttachment(GetMesh(), FName("WeaponHandSocket"));
|
||||
Weapon->SetCollisionEnabled(ECollisionEnabled::NoCollision);
|
||||
|
||||
}
|
||||
|
||||
// Called when the game starts or when spawned
|
||||
void AExoCharacterBase::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
}
|
||||
|
||||
// Called every frame
|
||||
void AExoCharacterBase::Tick(float DeltaTime)
|
||||
{
|
||||
Super::Tick(DeltaTime);
|
||||
|
||||
}
|
||||
|
||||
// Called to bind functionality to input
|
||||
void AExoCharacterBase::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||
{
|
||||
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
5
Source/Exo/Private/Characters/ExoEnemy.cpp
Normal file
5
Source/Exo/Private/Characters/ExoEnemy.cpp
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "Characters/ExoEnemy.h"
|
||||
|
||||
20
Source/Exo/Private/Characters/ExoPlayerCharacter.cpp
Normal file
20
Source/Exo/Private/Characters/ExoPlayerCharacter.cpp
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "Characters/ExoPlayerCharacter.h"
|
||||
#include "GameFramework/CharacterMovementComponent.h"
|
||||
|
||||
AExoPlayerCharacter::AExoPlayerCharacter()
|
||||
{
|
||||
GetCharacterMovement()->bSnapToPlaneAtStart = true;
|
||||
|
||||
bUseControllerRotationPitch = true;
|
||||
bUseControllerRotationYaw = true;
|
||||
bUseControllerRotationRoll = false;
|
||||
}
|
||||
|
||||
void AExoPlayerCharacter::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
}
|
||||
|
|
@ -12,18 +12,12 @@ class EXO_API AExoCharacterBase : public ACharacter
|
|||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
// Sets default values for this character's properties
|
||||
AExoCharacterBase();
|
||||
|
||||
protected:
|
||||
// Called when the game starts or when spawned
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
public:
|
||||
// Called every frame
|
||||
virtual void Tick(float DeltaTime) override;
|
||||
|
||||
// Called to bind functionality to input
|
||||
virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
|
||||
UPROPERTY(EditAnywhere, Category = "Combat")
|
||||
TObjectPtr<USkeletalMeshComponent> Weapon;
|
||||
|
||||
};
|
||||
|
|
|
|||
17
Source/Exo/Public/Characters/ExoEnemy.h
Normal file
17
Source/Exo/Public/Characters/ExoEnemy.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Characters/ExoCharacterBase.h"
|
||||
#include "ExoEnemy.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class EXO_API AExoEnemy : public AExoCharacterBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
};
|
||||
21
Source/Exo/Public/Characters/ExoPlayerCharacter.h
Normal file
21
Source/Exo/Public/Characters/ExoPlayerCharacter.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Characters/ExoCharacterBase.h"
|
||||
#include "ExoPlayerCharacter.generated.h"
|
||||
|
||||
UCLASS()
|
||||
class EXO_API AExoPlayerCharacter : public AExoCharacterBase
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
public:
|
||||
AExoPlayerCharacter();
|
||||
|
||||
protected:
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
|
||||
};
|
||||
Loading…
Reference in New Issue
Block a user