LEAP Documentation 40220
Documentation for the LEAP project
DashComponent.h
Go to the documentation of this file.
1// Copyright Blue Isle Studios Inc 2018. All Rights Reserved.
2
3#pragma once
4
5#include "CoreMinimal.h"
7#include "DashComponent.generated.h"
8
10
11UCLASS(ClassGroup = (Custom), meta = (BlueprintSpawnableComponent), Blueprintable)
12class PROJECTX_API UDashComponent : public UProxyMovementComponent
13{
14 GENERATED_BODY()
15
16public:
17 virtual void BeginPlay() override;
18 virtual void ModifySavedMove(FSavedMove_AdvCharacter& SavedMove) override;
19 virtual void UpdateFromCompressedFlags(uint8 Flags) override;
20 virtual void PerformMovement(float DeltaTime) override;
21 virtual void PrepareMoveFromSave(const FSavedMove_AdvCharacter& SavedMove) override;
22 virtual void SetupPlayerInputComponent();
23 virtual void Dash();
24 virtual void StopDash();
25
26protected:
27 /* How fast and far should the player go when dash is presssed? */
28 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Dash")
29 float DashForce = 100.0f;
30 /* How long to dash for when the dash button is pressed. */
31 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Dash")
32 float DashTime = 1.0f;
33 /* The stamina cost when the dash button is pressed. */
34 UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Dash")
35 float DashStaminaCost = 25.0f;
36
37private:
38 bool bIsUsingDash = false;
39 float CurrentDashTime = 0.0f;
40 AProjectXCharacter* CharacterOwner = NULL;
41};
@ Dash
Definition: DashComponent.cpp:90
Definition: ProjectXCharacter.h:128
Definition: AdvancedCharacterMovement.h:48
Definition: AdvancedCharacterMovement.h:78