42 lines
1.1 KiB
C++
42 lines
1.1 KiB
C++
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "Animation/AnimInstance.h"
|
|
#include "ShooterAnimInstance.generated.h"
|
|
|
|
class AShooterCharacter;
|
|
/**
|
|
*
|
|
*/
|
|
UCLASS()
|
|
class SHOOTER_API UShooterAnimInstance : public UAnimInstance
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
|
|
UFUNCTION(BlueprintCallable)
|
|
void UpdateAnimationProperties(float DeltaTime);
|
|
|
|
virtual void NativeInitializeAnimation() override;
|
|
|
|
private:
|
|
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Movement, meta = (AllowPrivateAccess = true))
|
|
AShooterCharacter* ShooterCharacter;
|
|
|
|
/* The speed of the character */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Movement, meta = (AllowPrivateAccess = true))
|
|
float Speed;
|
|
|
|
/* Whether or not the character is in the air */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Movement, meta = (AllowPrivateAccess = true))
|
|
bool bIsInAir;
|
|
|
|
/* Whether or not the character is moving */
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Movement, meta = (AllowPrivateAccess = true))
|
|
bool bIsAccelerating;
|
|
};
|