diff --git a/Config/DefaultInput.ini b/Config/DefaultInput.ini index 5b7cca1..21eb291 100644 --- a/Config/DefaultInput.ini +++ b/Config/DefaultInput.ini @@ -85,7 +85,6 @@ +ActionMappings=(ActionName="Shooting",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_FaceButton_Left) +ActionMappings=(ActionName="Ability",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=LeftShift) +ActionMappings=(ActionName="Ability",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Gamepad_FaceButton_Right) -+ActionMappings=(ActionName="GetDamaged",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=P) +AxisMappings=(AxisName="Roll",Scale=1.000000,Key=Q) +AxisMappings=(AxisName="MoveForward",Scale=1.000000,Key=W) +AxisMappings=(AxisName="MoveRight",Scale=1.000000,Key=D) diff --git a/Content/Levels/Levels/Nuno_Level.umap b/Content/Levels/Levels/Nuno_Level.umap new file mode 100644 index 0000000..ce4ea7c --- /dev/null +++ b/Content/Levels/Levels/Nuno_Level.umap Binary files differ diff --git a/Content/Levels/Sergio_Level.umap b/Content/Levels/Sergio_Level.umap index 1083dd4..8d2aeab 100644 --- a/Content/Levels/Sergio_Level.umap +++ b/Content/Levels/Sergio_Level.umap Binary files differ diff --git a/SkyFrontier.uproject b/SkyFrontier.uproject index 1e6d8c8..cb72138 100644 --- a/SkyFrontier.uproject +++ b/SkyFrontier.uproject @@ -7,16 +7,30 @@ { "Name": "SkyFrontier", "Type": "Runtime", - "LoadingPhase": "Default", - "AdditionalDependencies": [ - "Engine" - ] + "LoadingPhase": "Default" } ], "Plugins": [ { "Name": "RawInput", "Enabled": true + }, + { + "Name": "UniversalCameraPlugin", + "Enabled": true, + "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/a9172fdfc87c464eae3a49860ee2610f" + }, + { + "Name": "Landmass", + "Enabled": true + }, + { + "Name": "Water", + "Enabled": true + }, + { + "Name": "ShallowWater", + "Enabled": true } ] } \ No newline at end of file diff --git a/Source/SkyFrontier/Private/HealthSystem.cpp b/Source/SkyFrontier/Private/HealthSystem.cpp deleted file mode 100644 index aacb077..0000000 --- a/Source/SkyFrontier/Private/HealthSystem.cpp +++ /dev/null @@ -1,64 +0,0 @@ -// Fill out your copyright notice in the Description page of Project Settings. - - -#include "HealthSystem.h" - -UHealthSystem::UHealthSystem() -{ - // This is a component that doesn't need a tick so lets disable it - PrimaryComponentTick.bCanEverTick = false; - PrimaryComponentTick.bStartWithTickEnabled = false; -} - -void UHealthSystem::BeginPlay() -{ - Super::BeginPlay(); - - // This is here for now, but if you ever do anything serialization related you might not want this. - Health = MaxHealth; -} - -float UHealthSystem::GetHealth() const -{ - return Health; -} - -float UHealthSystem::GetMaxHealth() const -{ - return MaxHealth; -} - -float UHealthSystem::GetHealthAsPercentage() const -{ - return Health / MaxHealth; -} - -void UHealthSystem::ModifyHealth(const float Amount) -{ - if(Amount == 0) - return; - - Health += Amount; - - Amount > 0 ? OnDamageHealedEvent.Broadcast(Amount) : OnDamageTakenEvent.Broadcast(Amount); -} - -void UHealthSystem::TakeDamage(const float Amount) -{ - if(Amount > 0) - { - Health -= Amount; - - OnDamageTakenEvent.Broadcast(Amount); - } -} - -void UHealthSystem::RecoverHealth(const float Amount) -{ - if(Amount > 0) - { - Health += Amount; - - OnDamageHealedEvent.Broadcast(Amount); - } -} \ No newline at end of file diff --git a/Source/SkyFrontier/Public/HealthSystem.h b/Source/SkyFrontier/Public/HealthSystem.h deleted file mode 100644 index 2e0e911..0000000 --- a/Source/SkyFrontier/Public/HealthSystem.h +++ /dev/null @@ -1,52 +0,0 @@ -// Fill out your copyright notice in the Description page of Project Settings. - -#pragma once - -#include "CoreMinimal.h" -#include "Components/ActorComponent.h" -#include "HealthSystem.generated.h" - -DECLARE_EVENT_OneParam(UCPP_HealthComponent, DamageTakenEvent, float ) -DECLARE_EVENT_OneParam(UCPP_HealthComponent, HealDamageEvent, float ) - -UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) ) -class SKYFRONTIER_API UHealthSystem : public UActorComponent -{ - GENERATED_BODY() - -public: - // Sets default values for this component's properties - UHealthSystem(); - - UFUNCTION(BlueprintPure) - float GetHealth() const; - UFUNCTION(BlueprintPure) - float GetMaxHealth() const; - UFUNCTION(BlueprintPure) - float GetHealthAsPercentage() const; - - UFUNCTION(BlueprintCallable) - void ModifyHealth(float Amount); - - UFUNCTION(BlueprintCallable) - void TakeDamage(float Amount); - UFUNCTION(BlueprintCallable) - void RecoverHealth(float Amount); - -protected: // Functions - - virtual void BeginPlay() override; - -public: // Events - - DamageTakenEvent OnDamageTakenEvent; - HealDamageEvent OnDamageHealedEvent; - -private: // This can be protected if we want to subclass the Health Component - - UPROPERTY(VisibleAnywhere) - float Health; - UPROPERTY(EditAnywhere) - float MaxHealth; - -};