Implemented Vision Links UI Animations
This commit is contained in:
parent
aca63055f3
commit
91052ed5ac
BIN
EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/RG_VisionLink.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/RG_VisionLink.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/WBP_VisionLinkViewPort.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Gadgets/ReconGadgets/VisionLink/WBP_VisionLinkViewPort.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/Levels/GadgetSystemTestLevel.umap
(Stored with Git LFS)
BIN
EndlessVendetta/Content/Levels/GadgetSystemTestLevel.umap
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Architecture/Floor_400x400.uasset
(Stored with Git LFS)
Binary file not shown.
BIN
EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset
(Stored with Git LFS)
BIN
EndlessVendetta/Content/StarterContent/Particles/P_Ambient_Dust.uasset
(Stored with Git LFS)
Binary file not shown.
@ -9,13 +9,9 @@ void AVisionLink::BeginPlay()
|
|||||||
SetActorTickEnabled(false);
|
SetActorTickEnabled(false);
|
||||||
CooldownLength = CooldownTime;
|
CooldownLength = CooldownTime;
|
||||||
InUseDuration = GadgetMaxUptime;
|
InUseDuration = GadgetMaxUptime;
|
||||||
}
|
|
||||||
|
|
||||||
|
if (NumberOfPingPulses <= 0 ) NumberOfPingPulses = 1;
|
||||||
|
TimeInbetweenPingPulses = GadgetMaxUptime / (float)NumberOfPingPulses;
|
||||||
void AVisionLink::Tick(float DeltaSeconds)
|
|
||||||
{
|
|
||||||
Super::Tick(DeltaSeconds);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVisionLink::Activate()
|
void AVisionLink::Activate()
|
||||||
@ -23,16 +19,30 @@ void AVisionLink::Activate()
|
|||||||
if (GadgetCantBeUsed()) return;
|
if (GadgetCantBeUsed()) return;
|
||||||
|
|
||||||
Super::Activate();
|
Super::Activate();
|
||||||
SetActorTickEnabled(true);
|
|
||||||
|
NumOfPingPulsesLeftInThisCycle = NumberOfPingPulses;
|
||||||
VisionLinkActivated();
|
VisionLinkActivated();
|
||||||
|
SendOutPingPulse();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AVisionLink::FinishedUsing()
|
void AVisionLink::FinishedUsing()
|
||||||
{
|
{
|
||||||
SetActorTickEnabled(false);
|
|
||||||
VisionLinkRecharging();
|
VisionLinkRecharging();
|
||||||
|
|
||||||
Super::FinishedUsing();
|
Super::FinishedUsing();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void AVisionLink::SendOutPingPulse()
|
||||||
|
{
|
||||||
|
NumOfPingPulsesLeftInThisCycle--;
|
||||||
|
UpdatePulsesRemaining(NumOfPingPulsesLeftInThisCycle);
|
||||||
|
if (NumOfPingPulsesLeftInThisCycle < 0) return;
|
||||||
|
|
||||||
|
// THIS IS WHERE I"LL PUT PING PULSE LOGIC
|
||||||
|
UE_LOG(LogTemp, Warning, TEXT("Ping Pulse!"));
|
||||||
|
GetWorld()->GetTimerManager().SetTimer(PulseHandle, this, &AVisionLink::SendOutPingPulse, TimeInbetweenPingPulses, false);
|
||||||
|
PlayPingPulseAnim(TimeInbetweenPingPulses);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,21 +14,38 @@ class ENDLESSVENDETTA_API AVisionLink : public AReconGadget
|
|||||||
{
|
{
|
||||||
GENERATED_BODY()
|
GENERATED_BODY()
|
||||||
|
|
||||||
virtual void BeginPlay() override;
|
int NumOfPingPulsesLeftInThisCycle;
|
||||||
|
|
||||||
virtual void Tick(float DeltaSeconds) override;
|
float TimeInbetweenPingPulses;
|
||||||
|
|
||||||
|
FTimerHandle PulseHandle;
|
||||||
|
|
||||||
|
void SendOutPingPulse();
|
||||||
|
|
||||||
|
virtual void BeginPlay() override;
|
||||||
|
|
||||||
virtual void Activate() override;
|
virtual void Activate() override;
|
||||||
|
|
||||||
virtual void FinishedUsing() override;
|
virtual void FinishedUsing() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
UPROPERTY(EditDefaultsOnly, Category = "Vision Link")
|
||||||
|
int NumberOfPingPulses = 1;
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadOnly, Category = "Vision Link")
|
UPROPERTY(BlueprintReadOnly, Category = "Vision Link")
|
||||||
float CooldownLength;
|
float CooldownLength;
|
||||||
|
|
||||||
UPROPERTY(BlueprintReadOnly, Category = "Vision Link")
|
UPROPERTY(BlueprintReadOnly, Category = "Vision Link")
|
||||||
float InUseDuration;
|
float InUseDuration;
|
||||||
|
|
||||||
|
// Updates UI with time to next Pulse
|
||||||
|
UFUNCTION(BlueprintImplementableEvent, Category = "Vision Link")
|
||||||
|
void PlayPingPulseAnim(float PulseDuration);
|
||||||
|
|
||||||
|
// Updates UI with pulses remaining
|
||||||
|
UFUNCTION(BlueprintImplementableEvent, Category = "Vision Link")
|
||||||
|
void UpdatePulsesRemaining(int PulsesRemaining);
|
||||||
|
|
||||||
UFUNCTION(BlueprintImplementableEvent, Category = "Vision Link")
|
UFUNCTION(BlueprintImplementableEvent, Category = "Vision Link")
|
||||||
void VisionLinkActivated();
|
void VisionLinkActivated();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user