Implemented Ring Module UI
This commit is contained in:
parent
2a9e30108d
commit
9be0b373cf
BIN
EndlessVendetta/Content/Gadgets/GM_GadgetManager.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Gadgets/GM_GadgetManager.uasset
(Stored with Git LFS)
Binary file not shown.
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3ce42b2de8dc042e66a21fbb40c537d3d9b77bf9aba08bad33b7fa9de1b684a7
|
||||||
|
size 39014
|
@ -0,0 +1,3 @@
|
|||||||
|
version https://git-lfs.github.com/spec/v1
|
||||||
|
oid sha256:3b2a5cc7e22ed47e7380506b6873eb520643402f4f229340f00de2bac9e53e58
|
||||||
|
size 108531
|
BIN
EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/WBP_RM_ScreenWidget.uasset
(Stored with Git LFS)
Normal file
BIN
EndlessVendetta/Content/Gadgets/ReconGadgets/RingModule/WBP_RM_ScreenWidget.uasset
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:77cadba64fcbb3018eab09695343339696bd1a1fbcfb39ee13aca7d57c7b4bab
|
oid sha256:253bd27498f52b503e5f65dbcad3810691d5d96581785cd5926f369155cef907
|
||||||
size 108254
|
size 108254
|
||||||
|
@ -1,3 +1,3 @@
|
|||||||
version https://git-lfs.github.com/spec/v1
|
version https://git-lfs.github.com/spec/v1
|
||||||
oid sha256:6606ee0e9ddf200d7b115f4bece31c3d00626e6eca88de44c836d32074510c65
|
oid sha256:4d30ed0b3dca3879d9dd3b4c282293f326fc8a3b237e554c97025497362ac08c
|
||||||
size 53268
|
size 53268
|
||||||
|
@ -0,0 +1,27 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
|
||||||
|
#include "PhoneRinging.h"
|
||||||
|
|
||||||
|
// Sets default values
|
||||||
|
APhoneRinging::APhoneRinging()
|
||||||
|
{
|
||||||
|
// Set this actor 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 APhoneRinging::BeginPlay()
|
||||||
|
{
|
||||||
|
Super::BeginPlay();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
// Called every frame
|
||||||
|
void APhoneRinging::Tick(float DeltaTime)
|
||||||
|
{
|
||||||
|
Super::Tick(DeltaTime);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,26 @@
|
|||||||
|
// Fill out your copyright notice in the Description page of Project Settings.
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CoreMinimal.h"
|
||||||
|
#include "GameFramework/Actor.h"
|
||||||
|
#include "PhoneRinging.generated.h"
|
||||||
|
|
||||||
|
UCLASS()
|
||||||
|
class ENDLESSVENDETTA_API APhoneRinging : public AActor
|
||||||
|
{
|
||||||
|
GENERATED_BODY()
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Sets default values for this actor's properties
|
||||||
|
APhoneRinging();
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// Called when the game starts or when spawned
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
|
public:
|
||||||
|
// Called every frame
|
||||||
|
virtual void Tick(float DeltaTime) override;
|
||||||
|
|
||||||
|
};
|
@ -90,10 +90,13 @@ bool ARingModule::SpawnRingingPhoneForAllNearbyEnemies()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FActorSpawnParameters SpawnParams;
|
||||||
|
SpawnParams.SpawnCollisionHandlingOverride = ESpawnActorCollisionHandlingMethod::AlwaysSpawn;
|
||||||
|
FAttachmentTransformRules AttachmentRules(EAttachmentRule::SnapToTarget, true);
|
||||||
for (AActor* Enemy : EnemiesInRadius)
|
for (AActor* Enemy : EnemiesInRadius)
|
||||||
{
|
{
|
||||||
//Dont Forget to spawn in phone ringing
|
AActor* SpawnedPhone = GetWorld()->SpawnActor<AActor>(PhoneRingingClass, Enemy->GetActorLocation(), Enemy->GetActorRotation(), SpawnParams);
|
||||||
UE_LOG(LogTemp, Warning, TEXT("%s's phone is ringing!!!"), *Enemy->GetName());
|
SpawnedPhone->AttachToComponent(Enemy->GetRootComponent(), AttachmentRules);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CoreMinimal.h"
|
#include "CoreMinimal.h"
|
||||||
|
#include "PhoneRinging.h"
|
||||||
#include "EndlessVendetta/GadgetSystem/ReconGadget.h"
|
#include "EndlessVendetta/GadgetSystem/ReconGadget.h"
|
||||||
#include "Camera/CameraComponent.h"
|
#include "Camera/CameraComponent.h"
|
||||||
#include "RingModule.generated.h"
|
#include "RingModule.generated.h"
|
||||||
@ -38,31 +39,34 @@ class ENDLESSVENDETTA_API ARingModule : public AReconGadget
|
|||||||
bool SpawnRingingPhoneForAllNearbyEnemies();
|
bool SpawnRingingPhoneForAllNearbyEnemies();
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
UPROPERTY(EditDefaultsOnly, Category = "Overload Module")
|
UPROPERTY(EditDefaultsOnly, Category = "Ring Module")
|
||||||
float AreaOfEffectInMeters = 20;
|
float AreaOfEffectInMeters = 20;
|
||||||
|
|
||||||
UPROPERTY(EditDefaultsOnly, Category = "Overload Module")
|
UPROPERTY(EditDefaultsOnly, Category = "Ring Module")
|
||||||
float DeadBodyCheckDistance = 250;
|
float DeadBodyCheckDistance = 250;
|
||||||
|
|
||||||
|
UPROPERTY(EditDefaultsOnly, Category = "Ring Module")
|
||||||
|
TSubclassOf<APhoneRinging> PhoneRingingClass;
|
||||||
|
|
||||||
// --------------- Display Functions ---------------
|
// --------------- Display Functions ---------------
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Overload Module")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Ring Module")
|
||||||
void DisplayAlreadyHacked();
|
void DisplayAlreadyHacked();
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Overload Module")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Ring Module")
|
||||||
void DisplayNeedADeadEnemy();
|
void DisplayNeedADeadEnemy();
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Overload Module")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Ring Module")
|
||||||
void DisplayFoundPotentialTarget();
|
void DisplayFoundPotentialTarget();
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Overload Module")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Ring Module")
|
||||||
void PlayHackingAnim(float Loadingtime);
|
void PlayHackingAnim(float Loadingtime);
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Overload Module")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Ring Module")
|
||||||
void DisplayHackingFailure();
|
void DisplayHackingFailure();
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Overload Module")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Ring Module")
|
||||||
void DisplayHackingSuccess();
|
void DisplayHackingSuccess();
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Overload Module")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Ring Module")
|
||||||
void PlayRechargingAnim(float RechargingTime);
|
void PlayRechargingAnim(float RechargingTime);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user