Solved movement and basic replication #1
BIN
Content/Input/Default_IMC.uasset
Normal file
BIN
Content/Input/Default_IMC.uasset
Normal file
Binary file not shown.
BIN
Content/Input/Jump_IA.uasset
Normal file
BIN
Content/Input/Jump_IA.uasset
Normal file
Binary file not shown.
BIN
Content/ProofOfConcept/DDIController.uasset
Normal file
BIN
Content/ProofOfConcept/DDIController.uasset
Normal file
Binary file not shown.
BIN
Content/ProofOfConcept/DDIGamemode.uasset
Normal file
BIN
Content/ProofOfConcept/DDIGamemode.uasset
Normal file
Binary file not shown.
BIN
Content/ProofOfConcept/MainCharacter.uasset
Normal file
BIN
Content/ProofOfConcept/MainCharacter.uasset
Normal file
Binary file not shown.
Binary file not shown.
@@ -7,7 +7,10 @@
|
|||||||
{
|
{
|
||||||
"Name": "OpenConflict",
|
"Name": "OpenConflict",
|
||||||
"Type": "Runtime",
|
"Type": "Runtime",
|
||||||
"LoadingPhase": "Default"
|
"LoadingPhase": "Default",
|
||||||
|
"AdditionalDependencies": [
|
||||||
|
"Engine"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"Plugins": [
|
"Plugins": [
|
||||||
|
|||||||
5
Source/OpenConflict/DDIGamemodeBase.cpp
Normal file
5
Source/OpenConflict/DDIGamemodeBase.cpp
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "DDIGamemodeBase.h"
|
||||||
|
|
||||||
17
Source/OpenConflict/DDIGamemodeBase.h
Normal file
17
Source/OpenConflict/DDIGamemodeBase.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 "GameFramework/GameModeBase.h"
|
||||||
|
#include "DDIGamemodeBase.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class OPENCONFLICT_API ADDIGamemodeBase : public AGameModeBase
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
};
|
||||||
34
Source/OpenConflict/PlayerCharacter/DDICharacter.cpp
Normal file
34
Source/OpenConflict/PlayerCharacter/DDICharacter.cpp
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "DDICharacter.h"
|
||||||
|
|
||||||
|
// Sets default values
|
||||||
|
ADDICharacter::ADDICharacter()
|
||||||
|
{
|
||||||
|
// 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;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called when the game starts or when spawned
|
||||||
|
void ADDICharacter::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called every frame
|
||||||
|
void ADDICharacter::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
Super::Tick(DeltaTime);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called to bind functionality to input
|
||||||
|
void ADDICharacter::SetupPlayerInputComponent(UInputComponent* PlayerInputComponent)
|
||||||
|
{
|
||||||
|
Super::SetupPlayerInputComponent(PlayerInputComponent);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
29
Source/OpenConflict/PlayerCharacter/DDICharacter.h
Normal file
29
Source/OpenConflict/PlayerCharacter/DDICharacter.h
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/Character.h"
|
||||||
|
#include "DDICharacter.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class OPENCONFLICT_API ADDICharacter : public ACharacter
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Sets default values for this character's properties
|
||||||
|
ADDICharacter();
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
};
|
||||||
21
Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp
Normal file
21
Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "DDIPlayerController.h"
|
||||||
|
#include "EnhancedInputSubsystems.h"
|
||||||
|
#include "Engine/LocalPlayer.h"
|
||||||
|
#include "InputMappingContext.h"
|
||||||
|
|
||||||
|
void ADDIPlayerController::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(GetLocalPlayer()))
|
||||||
|
{
|
||||||
|
for (UInputMappingContext* CurrentContext : MappingContexts)
|
||||||
|
{
|
||||||
|
Subsystem->AddMappingContext(CurrentContext, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
22
Source/OpenConflict/PlayerCharacter/DDIPlayerController.h
Normal file
22
Source/OpenConflict/PlayerCharacter/DDIPlayerController.h
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/PlayerController.h"
|
||||||
|
#include "DDIPlayerController.generated.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
UCLASS()
|
||||||
|
class OPENCONFLICT_API ADDIPlayerController : public APlayerController
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
UPROPERTY(EditAnywhere, BlueprintReadOnly, meta=(AllowPrivateAccess=true))
|
||||||
|
TArray<class UInputMappingContext*> MappingContexts;
|
||||||
|
|
||||||
|
};
|
||||||
Reference in New Issue
Block a user