Guest User

.h file

a guest
Jan 16th, 2018
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.67 KB | None | 0 0
  1. // Copyright 1998-2017 Epic Games, Inc. All Rights Reserved.
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "GameFramework/Character.h"
  7. #include "lilknightgameCharacter.generated.h"
  8.  
  9.  
  10. UCLASS(config=Game)
  11. class AlilknightgameCharacter : public ACharacter
  12. {
  13. GENERATED_BODY()
  14.  
  15. /** Camera boom positioning the camera behind the character */
  16. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
  17. class USpringArmComponent* CameraBoom;
  18.  
  19. /** Follow camera */
  20. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = Camera, meta = (AllowPrivateAccess = "true"))
  21. class UCameraComponent* FollowCamera;
  22. public:
  23. AlilknightgameCharacter();
  24.  
  25. /** Base turn rate, in deg/sec. Other scaling may affect final turn rate. */
  26. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  27. float BaseTurnRate;
  28.  
  29. /** Base look up/down rate, in deg/sec. Other scaling may affect final rate. */
  30. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  31. float BaseLookUpRate;
  32.  
  33. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Attack")
  34. bool isAttacking = false;
  35. UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category="Shield")
  36. bool isShielding = false;
  37.  
  38. protected:
  39.  
  40. FTimerHandle AttackHandle;
  41.  
  42. UFUNCTION()
  43. void Attack();
  44. UFUNCTION()
  45. void StopAttack();
  46.  
  47.  
  48. UFUNCTION()
  49. void Shield();
  50.  
  51. UFUNCTION()
  52. void StopShield();
  53.  
  54. /** Resets HMD orientation in VR. */
  55. void OnResetVR();
  56.  
  57. /** Called for forwards/backward input */
  58. void MoveForward(float Value);
  59.  
  60. /** Called for side to side input */
  61. void MoveRight(float Value);
  62.  
  63. /**
  64. * Called via input to turn at a given rate.
  65. * @param Rate This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
  66. */
  67. void TurnAtRate(float Rate);
  68.  
  69. /**
  70. * Called via input to turn look up/down at a given rate.
  71. * @param Rate This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
  72. */
  73. void LookUpAtRate(float Rate);
  74.  
  75. /** Handler for when a touch input begins. */
  76. void TouchStarted(ETouchIndex::Type FingerIndex, FVector Location);
  77.  
  78. /** Handler for when a touch input stops. */
  79. void TouchStopped(ETouchIndex::Type FingerIndex, FVector Location);
  80.  
  81. protected:
  82. // APawn interface
  83. virtual void SetupPlayerInputComponent(class UInputComponent* PlayerInputComponent) override;
  84. // End of APawn interface
  85.  
  86. public:
  87. /** Returns CameraBoom subobject **/
  88. FORCEINLINE class USpringArmComponent* GetCameraBoom() const { return CameraBoom; }
  89. /** Returns FollowCamera subobject **/
  90. FORCEINLINE class UCameraComponent* GetFollowCamera() const { return FollowCamera; }
  91. // Called to bind functionality to input
  92.  
  93. };
Add Comment
Please, Sign In to add comment