Skip to content

Commit

Permalink
menuscreen thumbs up and reload sound
Browse files Browse the repository at this point in the history
  • Loading branch information
Raphael Priatama committed Jan 17, 2022
1 parent ce97574 commit 17af410
Show file tree
Hide file tree
Showing 22 changed files with 30 additions and 2 deletions.
Binary file modified ProjectManus/Content/BP/FlyingCharacterPawnBP.uasset
Binary file not shown.
Binary file modified ProjectManus/Content/BP/RestartCheckerActorBP.uasset
Binary file not shown.
Binary file modified ProjectManus/Content/Level/ArtMap.umap
Binary file not shown.
Binary file modified ProjectManus/Content/Level/Menu.umap
Binary file not shown.
Binary file added ProjectManus/Content/Movies/Flying-Tutorial.mp4
Binary file not shown.
Binary file added ProjectManus/Content/Movies/Reload-Tutorial.mp4
Binary file not shown.
Binary file added ProjectManus/Content/Movies/Shield-Tutorial.mp4
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified ProjectManus/Content/UserInterface/MenuScreen.uasset
Binary file not shown.
Binary file modified ProjectManus/Content/UserInterface/TutorialScreen.uasset
Binary file not shown.
18 changes: 18 additions & 0 deletions ProjectManus/Source/ProjectManus/Private/ShooterComponent.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,24 @@ void UShooterComponent::EndFire()
GetOwner()->GetWorldTimerManager().ClearTimer(projectileFiringTimeHandle);
}

void UShooterComponent::ClearReloadTime()
{
currentReloadTime = 0.0f;
OnEndReload.Broadcast();
}

void UShooterComponent::AddReloadTime(float dt)
{
if (currentReloadTime == 0.0f && currentAmno < defaultAmno)
{
OnBeginReload.Broadcast();
}

currentReloadTime += dt;


}

// Sets default values for this component's properties
UShooterComponent::UShooterComponent()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ class PROJECTMANUS_API AFlyingCharacterPawn : public APawn
UFUNCTION(BlueprintImplementableEvent, Category = "Shooting")
void OnHitShield();


protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
Expand Down
13 changes: 11 additions & 2 deletions ProjectManus/Source/ProjectManus/Public/ShooterComponent.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ class AProjectile;

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FOnProjectileShootSignature);

DECLARE_DYNAMIC_MULTICAST_DELEGATE(FBeginReloadSignature);
DECLARE_DYNAMIC_MULTICAST_DELEGATE(FEndReloadSignature);

UCLASS( ClassGroup=(Custom), meta=(BlueprintSpawnableComponent) )
class PROJECTMANUS_API UShooterComponent : public USceneComponent
{
Expand Down Expand Up @@ -61,8 +64,8 @@ class PROJECTMANUS_API UShooterComponent : public USceneComponent
void FireProjectile();
void EndFire();

void ClearReloadTime() { currentReloadTime = 0.0f; }
void AddReloadTime(float dt){ currentReloadTime += dt; }
void ClearReloadTime();
void AddReloadTime(float dt);
void Reload()
{
currentAmno = defaultAmno;
Expand All @@ -89,5 +92,11 @@ class PROJECTMANUS_API UShooterComponent : public USceneComponent

UPROPERTY(BlueprintAssignable, Category = "Events")
FOnProjectileShootSignature OnShootProjectile;

UPROPERTY(BlueprintAssignable, Category = "Events")
FBeginReloadSignature OnBeginReload;

UPROPERTY(BlueprintAssignable, Category = "Events")
FEndReloadSignature OnEndReload;

};

0 comments on commit 17af410

Please sign in to comment.