Compare commits
23 Commits
ff9fcf7aa7
...
characterS
| Author | SHA1 | Date | |
|---|---|---|---|
| 20a1478bdc | |||
| d2e1db997d | |||
|
|
45c8db144b | ||
|
|
3ab187545c | ||
| 442b977a65 | |||
|
|
9f933f1f9c | ||
| 8c1de34eb5 | |||
|
|
63a8e63dfe | ||
| c0152e2db4 | |||
| 44d54457ae | |||
| 73a3aac159 | |||
| bb0d0a8660 | |||
|
|
1a9364c821 | ||
| a59399ebfe | |||
| c91d73ed33 | |||
|
|
0598ac722c | ||
|
|
7976384ac1 | ||
|
|
a4c547d7ce | ||
|
|
53aa864df2 | ||
|
|
4f499aab8e | ||
|
|
25cc608321 | ||
|
|
206dc5d36e | ||
|
|
99c6f2fd3b |
File diff suppressed because one or more lines are too long
@@ -1,8 +1,20 @@
|
||||
|
||||
|
||||
[/Script/EngineSettings.GameMapsSettings]
|
||||
GameDefaultMap=/Game/Worlds/Playground1.Playground1
|
||||
EditorStartupMap=/Game/Worlds/Playground1.Playground1
|
||||
LocalMapOptions=
|
||||
TransitionMap=None
|
||||
bUseSplitscreen=True
|
||||
TwoPlayerSplitscreenLayout=Horizontal
|
||||
ThreePlayerSplitscreenLayout=FavorTop
|
||||
FourPlayerSplitscreenLayout=Grid
|
||||
bShowAllPlayerWidgetsWhenSplitscreenDisabled=False
|
||||
bOffsetPlayerGamepadIds=False
|
||||
GameInstanceClass=/Script/Engine.GameInstance
|
||||
GameDefaultMap=/Game/Worlds/MainMenu.MainMenu
|
||||
ServerDefaultMap=/Engine/Maps/Entry.Entry
|
||||
GlobalDefaultGameMode=/Script/Engine.GameModeBase
|
||||
GlobalDefaultServerGameMode=None
|
||||
|
||||
[/Script/Engine.RendererSettings]
|
||||
r.AllowStaticLighting=False
|
||||
|
||||
@@ -82,3 +82,6 @@ DefaultTouchInterface=/Engine/MobileResources/HUD/DefaultVirtualJoysticks.Defaul
|
||||
-ConsoleKeys=Tilde
|
||||
+ConsoleKeys=Tilde
|
||||
|
||||
[/Script/EnhancedInput.EnhancedInputDeveloperSettings]
|
||||
bEnableUserSettings=True
|
||||
|
||||
|
||||
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/Input/Look_IA.uasset
Normal file
BIN
Content/Input/Look_IA.uasset
Normal file
Binary file not shown.
BIN
Content/Input/Move_IA.uasset
Normal file
BIN
Content/Input/Move_IA.uasset
Normal file
Binary file not shown.
BIN
Content/ProofOfConcept/DDICharacter_BP.uasset
Normal file
BIN
Content/ProofOfConcept/DDICharacter_BP.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/DDIGamemode_BP.uasset
Normal file
BIN
Content/ProofOfConcept/DDIGamemode_BP.uasset
Normal file
Binary file not shown.
BIN
Content/ProofOfConcept/DDIPlayerController_BP.uasset
Normal file
BIN
Content/ProofOfConcept/DDIPlayerController_BP.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/MainSoundMix.uasset
Normal file
BIN
Content/Sounds/MainSoundMix.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/SFX_Ambient.uasset
Normal file
BIN
Content/Sounds/SFX_Ambient.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/SFX_Dialogue.uasset
Normal file
BIN
Content/Sounds/SFX_Dialogue.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/SFX_Effects.uasset
Normal file
BIN
Content/Sounds/SFX_Effects.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/SFX_Music.uasset
Normal file
BIN
Content/Sounds/SFX_Music.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/SFX_UI.uasset
Normal file
BIN
Content/Sounds/SFX_UI.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/UI/Woodblock_C4.mp3
Normal file
BIN
Content/Sounds/UI/Woodblock_C4.mp3
Normal file
Binary file not shown.
BIN
Content/Sounds/UI/Woodblock_C4.uasset
Normal file
BIN
Content/Sounds/UI/Woodblock_C4.uasset
Normal file
Binary file not shown.
BIN
Content/Sounds/UI/Woodblock_F4.mp3
Normal file
BIN
Content/Sounds/UI/Woodblock_F4.mp3
Normal file
Binary file not shown.
BIN
Content/Sounds/UI/Woodblock_F4.uasset
Normal file
BIN
Content/Sounds/UI/Woodblock_F4.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/MainMenu/BP_MainMenu.uasset
Normal file
BIN
Content/UI_Menus/MainMenu/BP_MainMenu.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/MainMenu/BP_MainMenu_Gamemode.uasset
Normal file
BIN
Content/UI_Menus/MainMenu/BP_MainMenu_Gamemode.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/BP_ApplyGraphicsSettings.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/BP_ApplyGraphicsSettings.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/BP_AudioSettings.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/BP_AudioSettings.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/BP_DisplaySettings.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/BP_DisplaySettings.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/BP_GraphicsSettings.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/BP_GraphicsSettings.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/BP_SettingsMenu.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/BP_SettingsMenu.uasset
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/Controls/KeyCategories.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/Controls/KeyCategories.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/Controls/KeyMappings.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/Controls/KeyMappings.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/SettingsMenu/SettingsSave.uasset
Normal file
BIN
Content/UI_Menus/SettingsMenu/SettingsSave.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/StartMenu/BP_StartMenu.uasset
Normal file
BIN
Content/UI_Menus/StartMenu/BP_StartMenu.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/StartMenu/BP_StartMenu_Controller.uasset
Normal file
BIN
Content/UI_Menus/StartMenu/BP_StartMenu_Controller.uasset
Normal file
Binary file not shown.
BIN
Content/UI_Menus/StartMenu/B_StartMenu_Gamemode.uasset
Normal file
BIN
Content/UI_Menus/StartMenu/B_StartMenu_Gamemode.uasset
Normal file
Binary file not shown.
BIN
Content/Worlds/MainMenu.umap
Normal file
BIN
Content/Worlds/MainMenu.umap
Normal file
Binary file not shown.
Binary file not shown.
BIN
Content/Worlds/_GENERATED/Core/Box_57D2F4E3.uasset
Normal file
BIN
Content/Worlds/_GENERATED/Core/Box_57D2F4E3.uasset
Normal file
Binary file not shown.
@@ -7,7 +7,10 @@
|
||||
{
|
||||
"Name": "OpenConflict",
|
||||
"Type": "Runtime",
|
||||
"LoadingPhase": "Default"
|
||||
"LoadingPhase": "Default",
|
||||
"AdditionalDependencies": [
|
||||
"Engine"
|
||||
]
|
||||
}
|
||||
],
|
||||
"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()
|
||||
|
||||
};
|
||||
38
Source/OpenConflict/PlayerCharacter/Components/DDIHealth.cpp
Normal file
38
Source/OpenConflict/PlayerCharacter/Components/DDIHealth.cpp
Normal file
@@ -0,0 +1,38 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DDIHealth.h"
|
||||
|
||||
// Sets default values for this component's properties
|
||||
UDDIHealth::UDDIHealth()
|
||||
{
|
||||
// Set this component to be initialized when the game starts, and to be ticked every frame. You can turn these features
|
||||
// off to improve performance if you don't need them.
|
||||
PrimaryComponentTick.bCanEverTick = true;
|
||||
MaxHealth = 100;
|
||||
CurrentHealth = 100;
|
||||
|
||||
}
|
||||
|
||||
// Called when the game starts
|
||||
void UDDIHealth::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
// ...
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Called every frame
|
||||
void UDDIHealth::TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction)
|
||||
{
|
||||
Super::TickComponent(DeltaTime, TickType, ThisTickFunction);
|
||||
|
||||
// ...
|
||||
}
|
||||
|
||||
// Called to cause damage
|
||||
void UDDIHealth::TakeDamage(UDamageType* DamageType)
|
||||
{
|
||||
}
|
||||
59
Source/OpenConflict/PlayerCharacter/Components/DDIHealth.h
Normal file
59
Source/OpenConflict/PlayerCharacter/Components/DDIHealth.h
Normal file
@@ -0,0 +1,59 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "Components/ActorComponent.h"
|
||||
#include "DDIHealth.generated.h"
|
||||
|
||||
|
||||
UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
|
||||
class OPENCONFLICT_API UDDIHealth : public UActorComponent
|
||||
{
|
||||
GENERATED_BODY()
|
||||
/*UPROPERTY and UFUNCTION declarations*/
|
||||
private:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
protected:
|
||||
/*Properties*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Health")
|
||||
float MaxHealth; //Stores the default max health of component
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Health")
|
||||
float CurrentHealth; //Stores the active health of component
|
||||
|
||||
/*Functions*/
|
||||
UFUNCTION(BlueprintAuthorityOnly, BlueprintCallable, Category = "Health")
|
||||
void TakeDamage(UDamageType* DamageType);
|
||||
|
||||
public:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
/*C++ only declarations*/
|
||||
private:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
protected:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
// Called when the game starts
|
||||
virtual void BeginPlay() override;
|
||||
|
||||
public:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
// Sets default values for this component's properties
|
||||
UDDIHealth();
|
||||
|
||||
// Called every frame
|
||||
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;
|
||||
|
||||
};
|
||||
35
Source/OpenConflict/PlayerCharacter/DDICharacter.cpp
Normal file
35
Source/OpenConflict/PlayerCharacter/DDICharacter.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
// 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;
|
||||
bReplicates = true;
|
||||
// bReplicateMovement = true;
|
||||
|
||||
CameraComponent = CreateDefaultSubobject<UCameraComponent>(TEXT("CameraComponent"));
|
||||
CameraComponent->SetupAttachment(GetMesh());
|
||||
CameraComponent->SetRelativeLocation(FVector(0.0f, 0.0f, 50.0f));
|
||||
CameraComponent->bUsePawnControlRotation = 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);
|
||||
|
||||
}
|
||||
|
||||
|
||||
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 "Camera/CameraComponent.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;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Camera")
|
||||
UCameraComponent* CameraComponent;
|
||||
};
|
||||
100
Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp
Normal file
100
Source/OpenConflict/PlayerCharacter/DDIPlayerController.cpp
Normal file
@@ -0,0 +1,100 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
|
||||
#include "DDIPlayerController.h"
|
||||
#include "EnhancedInputComponent.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "GameFramework/Character.h"
|
||||
|
||||
ADDIPlayerController::ADDIPlayerController()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
void ADDIPlayerController::BeginPlay()
|
||||
{
|
||||
Super::BeginPlay();
|
||||
|
||||
if (UEnhancedInputLocalPlayerSubsystem* Subsystem = ULocalPlayer::GetSubsystem<UEnhancedInputLocalPlayerSubsystem>(GetLocalPlayer()))
|
||||
{
|
||||
for (UInputMappingContext* CurrentContext : MappingContexts)
|
||||
{
|
||||
Subsystem->AddMappingContext(CurrentContext, 0);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ADDIPlayerController::SetupInputComponent()
|
||||
{
|
||||
Super::SetupInputComponent();
|
||||
|
||||
if (UEnhancedInputComponent* Subsystem = Cast<UEnhancedInputComponent>(InputComponent))
|
||||
{
|
||||
if (MoveAction) Subsystem->BindAction(MoveAction, ETriggerEvent::Triggered, this, &ADDIPlayerController::Move);
|
||||
if (LookAction) Subsystem->BindAction(LookAction, ETriggerEvent::Triggered, this, &ADDIPlayerController::Look);
|
||||
if (JumpAction)
|
||||
{
|
||||
Subsystem->BindAction(JumpAction, ETriggerEvent::Started, this, &ADDIPlayerController::Jump);
|
||||
Subsystem->BindAction(JumpAction, ETriggerEvent::Completed, this, &ADDIPlayerController::JumpEnd);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ADDIPlayerController::OnPossess(APawn* InPawn)
|
||||
{
|
||||
Super::OnPossess(InPawn);
|
||||
|
||||
// is this a shooter character?
|
||||
// if (ADDICharacter* DDICharacter = Cast<ADDICharacter>(InPawn))
|
||||
// {
|
||||
// // add the player tag
|
||||
// DDICharacter->Tags.Add(PlayerPawnTag);
|
||||
// }
|
||||
}
|
||||
|
||||
void ADDIPlayerController::Move(const FInputActionValue& Value)
|
||||
{
|
||||
const FVector2D MovementVector = Value.Get<FVector2D>();
|
||||
|
||||
if (APawn* ControlledPawn = GetPawn())
|
||||
{
|
||||
FRotator CameraRotation = GetControlRotation();
|
||||
FRotator YawRotation(0.f, CameraRotation.Yaw, 0.f);
|
||||
|
||||
FVector ForwardDiection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::X);
|
||||
FVector RightDirection = FRotationMatrix(YawRotation).GetUnitAxis(EAxis::Y);
|
||||
|
||||
ControlledPawn->AddMovementInput(ForwardDiection, MovementVector.Y);
|
||||
ControlledPawn->AddMovementInput(RightDirection,MovementVector.X);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void ADDIPlayerController::Look(const FInputActionValue& Value)
|
||||
{
|
||||
const FVector2D LookAxisVector = Value.Get<FVector2D>();
|
||||
|
||||
if (APawn* ControlledPawn = GetPawn())
|
||||
{
|
||||
AddYawInput(LookAxisVector.X);
|
||||
AddPitchInput(LookAxisVector.Y);
|
||||
}
|
||||
}
|
||||
|
||||
void ADDIPlayerController::Jump(const FInputActionValue& Value)
|
||||
{
|
||||
if (ACharacter* character = GetCharacter())
|
||||
{
|
||||
character->Jump();
|
||||
}
|
||||
}
|
||||
|
||||
void ADDIPlayerController::JumpEnd(const FInputActionValue& Value)
|
||||
{
|
||||
if (ACharacter* character = GetCharacter())
|
||||
{
|
||||
character->StopJumping();
|
||||
}
|
||||
}
|
||||
70
Source/OpenConflict/PlayerCharacter/DDIPlayerController.h
Normal file
70
Source/OpenConflict/PlayerCharacter/DDIPlayerController.h
Normal file
@@ -0,0 +1,70 @@
|
||||
// Fill out your copyright notice in the Description page of Project Settings.
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "EnhancedInputComponent.h"
|
||||
#include "EnhancedInputSubsystems.h"
|
||||
#include "GameFramework/PlayerController.h"
|
||||
#include "DDIPlayerController.generated.h"
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
UCLASS()
|
||||
class OPENCONFLICT_API ADDIPlayerController : public APlayerController
|
||||
{
|
||||
GENERATED_BODY()
|
||||
/*UPROPERTY and UFUNCTION declarations*/
|
||||
private:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
protected:
|
||||
/*Properties*/
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "INPUT", meta = (AllowPrivateAccess = "true"))
|
||||
TArray<class UInputMappingContext*> MappingContexts;
|
||||
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "INPUT", meta = (AllowPrivateAccess = "true"))
|
||||
UInputAction* JumpAction;
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "INPUT", meta = (AllowPrivateAccess = "true"))
|
||||
UInputAction* MoveAction;
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "INPUT", meta = (AllowPrivateAccess = "true"))
|
||||
UInputAction* LookAction;
|
||||
|
||||
UPROPERTY(EditAnywhere, Category="Shooter")
|
||||
FName PlayerPawnTag = FName("Player");
|
||||
|
||||
/*Functions*/
|
||||
|
||||
|
||||
public:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
/*C++ only declarations*/
|
||||
private:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
|
||||
protected:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
virtual void SetupInputComponent() override;
|
||||
virtual void BeginPlay() override;
|
||||
virtual void OnPossess(APawn *InPawn) override;
|
||||
void Move(const FInputActionValue& Value);
|
||||
void Look(const FInputActionValue& Value);
|
||||
void Jump(const FInputActionValue& Value);
|
||||
void JumpEnd(const FInputActionValue& Value);
|
||||
|
||||
public:
|
||||
/*Properties*/
|
||||
|
||||
/*Functions*/
|
||||
ADDIPlayerController();
|
||||
};
|
||||
Reference in New Issue
Block a user