Advertisement
Guest User

PilotBaseCharacter.h

a guest
May 16th, 2016
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.38 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "GameFramework/Character.h"
  6. #include "PilotBaseCharacter.generated.h"
  7.  
  8. UCLASS()
  9. class PILOT_API APilotBaseCharacter : public ACharacter
  10. {
  11.     GENERATED_BODY()
  12.  
  13. public:
  14.     // Sets default values for this character's properties
  15.     APilotBaseCharacter(const class FObjectInitializer& ObjectInitializer);
  16.    
  17.     /************************************************************************/
  18.     /* Advanced Movement                                                    */
  19.     /************************************************************************/
  20. public:
  21.  
  22.     UFUNCTION(BlueprintCallable, Category = "Movement")
  23.     virtual bool IsSprinting() const;
  24.  
  25.     /* Client/Local call to update sprint state */
  26.     virtual void SetSprinting(bool NewSprinting);
  27.  
  28.     float GetSprintingSpeedModifier() const;
  29.  
  30. protected:
  31.  
  32.     UPROPERTY(EditDefaultsOnly, Category = "Movement")
  33.     float SprintingSpeedModifier;
  34.  
  35.     /* Character wants to run, checked during Tick to see if allowed */
  36.     UPROPERTY(Transient)
  37.     bool bWantsToRun;
  38.  
  39.     /************************************************************************/
  40.     /* Targeting                                                            */
  41.     /************************************************************************/
  42.  
  43.     void SetTargeting(bool NewTargeting);
  44.  
  45.     UPROPERTY(Transient, Replicated)
  46.     bool bIsTargeting;
  47.  
  48.     UPROPERTY(EditDefaultsOnly, Category = "Targeting")
  49.     float TargetingSpeedModifier;
  50.  
  51. public:
  52.  
  53.     /* Is player aiming down sights */
  54.     UFUNCTION(BlueprintCallable, Category = "Targeting")
  55.     bool IsTargeting() const;
  56.  
  57.     float GetTargetingSpeedModifier() const;
  58.  
  59.     /* Retrieve Pitch/Yaw from current camera */
  60.     UFUNCTION(BlueprintCallable, Category = "Targeting")
  61.     FRotator GetAimOffsets() const;
  62.  
  63.     /************************************************************************/
  64.     /* Health, Damage & Death                                               */
  65.     /************************************************************************/
  66.     UFUNCTION(BlueprintCallable, Category = "PlayerCondition")
  67.     float GetMaxHealth() const;
  68.  
  69.     UFUNCTION(BlueprintCallable, Category = "PlayerCondition")
  70.     float GetHealth() const;
  71.  
  72.     UFUNCTION(BlueprintCallable, Category = "PlayerCondition")
  73.     bool IsAlive() const;
  74.  
  75. protected:
  76.     UPROPERTY(EditDefaultsOnly, Category = "PlayerCondition")
  77.     float Health;
  78.  
  79. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement