Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "GameFramework/Character.h"
- #include "PilotBaseCharacter.generated.h"
- UCLASS()
- class PILOT_API APilotBaseCharacter : public ACharacter
- {
- GENERATED_BODY()
- public:
- // Sets default values for this character's properties
- APilotBaseCharacter(const class FObjectInitializer& ObjectInitializer);
- /************************************************************************/
- /* Advanced Movement */
- /************************************************************************/
- public:
- UFUNCTION(BlueprintCallable, Category = "Movement")
- virtual bool IsSprinting() const;
- /* Client/Local call to update sprint state */
- virtual void SetSprinting(bool NewSprinting);
- float GetSprintingSpeedModifier() const;
- protected:
- UPROPERTY(EditDefaultsOnly, Category = "Movement")
- float SprintingSpeedModifier;
- /* Character wants to run, checked during Tick to see if allowed */
- UPROPERTY(Transient)
- bool bWantsToRun;
- /************************************************************************/
- /* Targeting */
- /************************************************************************/
- void SetTargeting(bool NewTargeting);
- UPROPERTY(Transient, Replicated)
- bool bIsTargeting;
- UPROPERTY(EditDefaultsOnly, Category = "Targeting")
- float TargetingSpeedModifier;
- public:
- /* Is player aiming down sights */
- UFUNCTION(BlueprintCallable, Category = "Targeting")
- bool IsTargeting() const;
- float GetTargetingSpeedModifier() const;
- /* Retrieve Pitch/Yaw from current camera */
- UFUNCTION(BlueprintCallable, Category = "Targeting")
- FRotator GetAimOffsets() const;
- /************************************************************************/
- /* Health, Damage & Death */
- /************************************************************************/
- UFUNCTION(BlueprintCallable, Category = "PlayerCondition")
- float GetMaxHealth() const;
- UFUNCTION(BlueprintCallable, Category = "PlayerCondition")
- float GetHealth() const;
- UFUNCTION(BlueprintCallable, Category = "PlayerCondition")
- bool IsAlive() const;
- protected:
- UPROPERTY(EditDefaultsOnly, Category = "PlayerCondition")
- float Health;
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement