Skip to content

Commit

Permalink
implemented ui functionalities
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Priatama committed Jan 3, 2022
1 parent 666493e commit 69f3c6f
Show file tree
Hide file tree
Showing 13 changed files with 11 additions and 2 deletions.
Binary file modified ProjectManus/Content/BP/FlyingCharacterPawnBP.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ProjectManus/Content/Level/ArtMap.umap
Binary file not shown.
Binary file modified ProjectManus/Content/Level/ZaxxonTest.umap
Binary file not shown.
Binary file modified ProjectManus/Content/UI/AltitudeLimitUI.uasset
Binary file not shown.
Binary file modified ProjectManus/Content/UserInterface/GameOverScreen.uasset
Binary file not shown.
Binary file modified ProjectManus/Content/UserInterface/HUD.uasset
Binary file not shown.
Binary file modified ProjectManus/Content/UserInterface/VictoryScreen.uasset
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ float AWaypointOrganizer::CalculateWaypointProgress(const FVector& layerPoint) c

float AWaypointOrganizer::CalculateLayerProgress(int index)
{
if (!playerActor) { return 1.0f; }
if (!playerActor.IsValid()) { return 1.0f; }

FVector playerLoc = playerActor->GetActorLocation();

Expand Down
6 changes: 6 additions & 0 deletions ProjectManus/Source/ProjectManus/Public/HealthComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ class PROJECTMANUS_API UHealthComponent : public USceneComponent
// Called every frame
virtual void TickComponent(float DeltaTime, ELevelTick TickType, FActorComponentTickFunction* ThisTickFunction) override;

UFUNCTION(BlueprintCallable, Category = "Health")
float GetCurrentHealth() const { return currentHealth; }

UFUNCTION(BlueprintCallable, Category = "Health")
float GetMaxHealth() const { return defaultHealth; }

private:

UFUNCTION()
Expand Down
3 changes: 3 additions & 0 deletions ProjectManus/Source/ProjectManus/Public/ShieldComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class PROJECTMANUS_API UShieldComponent : public UStaticMeshComponent

void DamageShield(float damage);

UFUNCTION(BlueprintCallable, Category = "Shield")
float GetShieldHealth() const { return isShieldActive ? shieldHealthCurrent : 0.0f; }

UPROPERTY(BlueprintAssignable, Category = "Events")
FShieldEnabledSignature OnShieldEnabled;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class PROJECTMANUS_API AWaypointOrganizer : public AActor
private:
TArray<AWaypointActor*> waypointArray;

AActor* playerActor = nullptr;
TWeakObjectPtr<AActor> playerActor = nullptr;

UPROPERTY(Category = "AI Layer System", EditAnywhere, BlueprintReadWrite, meta = (AllowPrivateAccess = "true"))
TArray<float> layerOffset;
Expand Down

0 comments on commit 69f3c6f

Please sign in to comment.