Guest User

character.h

a guest
Jun 6th, 2014
28
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Copyright 1998-2014 Epic Games, Inc. All Rights Reserved.
  2. #pragma once
  3.  
  4. #include "InvSystemCharacter.generated.h"
  5.  
  6. UCLASS(config=Game)
  7. class AInvSystemCharacter : public ACharacter
  8. {
  9.     GENERATED_UCLASS_BODY()
  10.  
  11.     /** Pawn mesh: 1st person view (arms; seen only by self) */
  12.     UPROPERTY(VisibleDefaultsOnly, Category=Mesh)
  13.     TSubobjectPtr<class USkeletalMeshComponent> Mesh1P;
  14.  
  15.     /** First person camera */
  16.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  17.     TSubobjectPtr<class UCameraComponent> FirstPersonCameraComponent;
  18.  
  19.     /** Base turn rate, in deg/sec. Other scaling may affect final turn rate. */
  20.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  21.     float BaseTurnRate;
  22.  
  23.     /** Base look up/down rate, in deg/sec. Other scaling may affect final rate. */
  24.     UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category=Camera)
  25.     float BaseLookUpRate;
  26.  
  27.     /** Gun muzzle's offset from the characters location */
  28.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Gameplay)
  29.     FVector GunOffset;
  30.  
  31.     /** Projectile class to spawn */
  32.     UPROPERTY(EditDefaultsOnly, Category=Projectile)
  33.     TSubclassOf<class AInvSystemProjectile> ProjectileClass;
  34.  
  35.     /** Sound to play each time we fire */
  36.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category=Gameplay)
  37.     USoundBase* FireSound;
  38.  
  39.     /** AnimMontage to play each time we fire */
  40.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Gameplay)
  41.     UAnimMontage* FireAnimation;
  42.  
  43. protected:
  44.  
  45.     /** Handler for a touch input beginning. */
  46.     void TouchStarted(const ETouchIndex::Type FingerIndex, const FVector Location);
  47.  
  48.     /** Fires a projectile. */
  49.     void OnFire();
  50.  
  51.     /** Handles moving forward/backward */
  52.     void MoveForward(float Val);
  53.  
  54.     /** Handles stafing movement, left and right */
  55.     void MoveRight(float Val);
  56.  
  57.     /**
  58.      * Called via input to turn at a given rate.
  59.      * @param Rate  This is a normalized rate, i.e. 1.0 means 100% of desired turn rate
  60.      */
  61.     void TurnAtRate(float Rate);
  62.  
  63.     /**
  64.      * Called via input to turn look up/down 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 LookUpAtRate(float Rate);
  68.  
  69.     virtual void Tick(float DeltaSeconds) OVERRIDE;
  70.  
  71. protected:
  72.     // APawn interface
  73.     virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) OVERRIDE;
  74.     // End of APawn interface
  75.  
  76.     /** Get actor derived from UsableActor currently looked at by the player */
  77.     class AUsableActor* GetUsableInView();
  78.  
  79.     /* Max distance to use/focus on actors. */
  80.     UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = Gameplay)
  81.         float MaxUseDistance;
  82.  
  83.     /* True only in first frame when focused on new usable actor. */
  84.     bool bHasNewFocus;
  85.  
  86.     /* Actor derived from UsableActor currently in center-view. */
  87.     AUsableActor* FocusedUsableActor;
  88.  
  89. public:
  90.  
  91.     /** Use the actor currently in view (if derived from UsableActor) */
  92.     UFUNCTION(BlueprintCallable, WithValidation, Server, Reliable, Category = PlayerAbility)
  93.         virtual void Use();
  94. };
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×