-
Notifications
You must be signed in to change notification settings - Fork 2
/
SecondaryJumpCharacter.h
44 lines (29 loc) 路 990 Bytes
/
SecondaryJumpCharacter.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Part of jump mechanic study in https://arza-3d.github.io/UE4-jump-mechanic/
#pragma once
#include "CoreMinimal.h"
#include "StudyJumpMechanicCharacter.h"
#include "SecondaryJumpCharacter.generated.h"
/**
* Character class with built-in secondary jump / heavy jump
*/
UCLASS()
class STUDYJUMPMECHANIC_API ASecondaryJumpCharacter : public AStudyJumpMechanicCharacter
{
GENERATED_BODY()
void SetupPlayerInputComponent(UInputComponent * PlayerInputComponent) override;
bool bSecondaryButtonIsPressed;
float DefaultJumpZVelocity;
public:
ASecondaryJumpCharacter();
// for animBP (optional)
void Jump() override;
void Landed(const FHitResult & Hit) override;
protected:
UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Secondary / Heavy Jump")
float SecondaryJumpZVelocity;
// for animBP (optional)
UPROPERTY(BlueprintReadOnly, Category = "Secondary / Heavy Jump")
bool bIsInSecondaryJump;
void SecondaryInputPressed();
void SecondaryInputReleased();
};