diff --git a/Content/Input/Default_IMC.uasset b/Content/Input/Default_IMC.uasset new file mode 100644 index 0000000..8f7e89f Binary files /dev/null and b/Content/Input/Default_IMC.uasset differ diff --git a/Content/Input/Jump_IA.uasset b/Content/Input/Jump_IA.uasset new file mode 100644 index 0000000..1441320 Binary files /dev/null and b/Content/Input/Jump_IA.uasset differ diff --git a/Content/ProofOfConcept/DDIController.uasset b/Content/ProofOfConcept/DDIController.uasset new file mode 100644 index 0000000..b741f3e Binary files /dev/null and b/Content/ProofOfConcept/DDIController.uasset differ diff --git a/Content/ProofOfConcept/DDIGamemode.uasset b/Content/ProofOfConcept/DDIGamemode.uasset new file mode 100644 index 0000000..3271238 Binary files /dev/null and b/Content/ProofOfConcept/DDIGamemode.uasset differ diff --git a/Content/ProofOfConcept/MainCharacter.uasset b/Content/ProofOfConcept/MainCharacter.uasset new file mode 100644 index 0000000..a3c9d6f Binary files /dev/null and b/Content/ProofOfConcept/MainCharacter.uasset differ diff --git a/Content/Worlds/Playground1.umap b/Content/Worlds/Playground1.umap index 007dbeb..6767908 100644 Binary files a/Content/Worlds/Playground1.umap and b/Content/Worlds/Playground1.umap differ diff --git a/OpenConflict.uproject b/OpenConflict.uproject index 48fb6e9..5c87fb6 100644 --- a/OpenConflict.uproject +++ b/OpenConflict.uproject @@ -7,7 +7,10 @@ { "Name": "OpenConflict", "Type": "Runtime", - "LoadingPhase": "Default" + "LoadingPhase": "Default", + "AdditionalDependencies": [ + "Engine" + ] } ], "Plugins": [ diff --git a/Source/OpenConflict/DDIGamemodeBase.cpp b/Source/OpenConflict/DDIGamemodeBase.cpp new file mode 100644 index 0000000..f74ed20 --- /dev/null +++ b/Source/OpenConflict/DDIGamemodeBase.cpp @@ -0,0 +1,5 @@ +// Fill out your copyright notice in the Description page of Project Settings. + + +#include "DDIGamemodeBase.h" + diff --git a/Source/OpenConflict/DDIGamemodeBase.h b/Source/OpenConflict/DDIGamemodeBase.h new file mode 100644 index 0000000..110a67a --- /dev/null +++ b/Source/OpenConflict/DDIGamemodeBase.h @@ -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() + +}; diff --git a/Source/OpenConflict/PlayerCharacter/DDICharacter.cpp b/Source/OpenConflict/PlayerCharacter/DDICharacter.cpp new file mode 100644 index 0000000..d6cc314 --- /dev/null +++ b/Source/OpenConflict/PlayerCharacter/DDICharacter.cpp @@ -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); + +} + diff --git a/Source/OpenConflict/PlayerCharacter/DDICharacter.h b/Source/OpenConflict/PlayerCharacter/DDICharacter.h new file mode 100644 index 0000000..3523c75 --- /dev/null +++ b/Source/OpenConflict/PlayerCharacter/DDICharacter.h @@ -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; + +}; diff --git a/Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp b/Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp new file mode 100644 index 0000000..ca8cad1 --- /dev/null +++ b/Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp @@ -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(GetLocalPlayer())) + { + for (UInputMappingContext* CurrentContext : MappingContexts) + { + Subsystem->AddMappingContext(CurrentContext, 0); + } + } + +} \ No newline at end of file diff --git a/Source/OpenConflict/PlayerCharacter/DDIPlayerController.h b/Source/OpenConflict/PlayerCharacter/DDIPlayerController.h new file mode 100644 index 0000000..4cb1737 --- /dev/null +++ b/Source/OpenConflict/PlayerCharacter/DDIPlayerController.h @@ -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 MappingContexts; + +};