Advertisement
Guest User

character.h

a guest
Jun 10th, 2014
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.96 KB | None | 0 0
  1. // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
  2. #pragma once
  3.  
  4. #include "GameFramework/SpringArmComponent.h"
  5. #include "AthenaCharacter.generated.h"
  6.  
  7. UCLASS(config=Game)
  8. class AAthenaCharacter : public ACharacter
  9. {
  10.     GENERATED_UCLASS_BODY()
  11.  
  12.     /** Camera boom positioning the camera behind the character */
  13.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  14.     TSubobjectPtr<class USpringArmComponent> CameraBoom;
  15.  
  16.     /** Follow camera */
  17.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  18.     TSubobjectPtr<class UCameraComponent> FollowCamera;
  19.  
  20.     /** Base turn rate, in deg/sec. Other scaling may affect final turn rate. */
  21.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  22.     float BaseTurnRate;
  23.  
  24.     /** Base look up/down rate, in deg/sec. Other scaling may affect final rate. */
  25.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  26.     float BaseLookUpRate;
  27.  
  28.     /** Follow camera */
  29.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera)
  30.     bool bIsInFPS;
  31.     bool bCameraSpot;
  32.  
  33.     virtual void BeginPlay();
  34.     virtual void Tick(float DeltaTime);
  35.  
  36.  
  37. protected:
  38.  
  39.     void ZoomIn();
  40.     void ZoomOut();
  41.     void CameraSwitch();
  42.  
  43.     /** Called for forwards/backward input */
  44.     void MoveForward(float Value);
  45.  
  46.     /** Called for side to side input */
  47.     void MoveRight(float Value);
  48.  
  49.     /**
  50.      * Called via input to turn at a given rate.
  51.      * @param Rate  This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
  52.      */
  53.     void TurnAtRate(float Rate);
  54.  
  55.     /**
  56.      * Called via input to turn look up/down at a given rate.
  57.      * @param Rate  This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
  58.      */
  59.     void LookUpAtRate(float Rate);
  60.  
  61.     /** Handler for when a touch input begins. */
  62.     void TouchStarted(ETouchIndex::Type FingerIndex, FVector Location);
  63.  
  64. protected:
  65.     // APawn interface
  66.     virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) OVERRIDE;
  67.     // End of APawn interface
  68. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement