Advertisement
Guest User

PersonCharacter.h

a guest
Apr 15th, 2015
68
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 2.11 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 "Perception/PawnSensingComponent.h"
  7. #include "PersonCharacter.generated.h"
  8.  
  9. UCLASS()
  10. class GETDEBT_API APersonCharacter : public APawn
  11. {
  12.     GENERATED_BODY()
  13.  
  14.         //Temp property, do not rely or use this!
  15.         UPROPERTY() class APersonAIController* TempController;
  16.  
  17. public:
  18.     // Sets default values for this character's properties
  19.     //APersonCharacter();
  20.     //
  21.     /*UPROPERTY(EditDefaultsOnly)
  22.         USkeletalMeshComponent* MeshComponent;*/
  23.  
  24.     ////Note(Robert) Placeholder mesh
  25.     //UPROPERTY(EditDefaultsOnly) UStaticMeshComponent* SkeletalMesh;
  26.  
  27.     /* AI Component to use when detecting a player */
  28.     UPROPERTY(EditDefaultsOnly)
  29.         UPawnSensingComponent* SensingComponent;
  30.  
  31.     /* New collision component */
  32.     UPROPERTY(EditDefaultsOnly)
  33.         UBoxComponent* BoxCollision;
  34.  
  35.     /* Arrow to tell which way is forward for the person */
  36.     UPROPERTY(EditDefaultsOnly)
  37.         UArrowComponent* DebugArrow;
  38.  
  39.     UPROPERTY(EditDefaultsOnly)
  40.         float MaxMoveSpeed;
  41.  
  42.     UPROPERTY(VisibleAnywhere)
  43.         FVector TargetLocation;
  44.  
  45.     /* Function to determine if we can see a player or machine in front of us. Expensive? */
  46.     UFUNCTION(BlueprintCallable, Category = "Machine")
  47.         bool CanSeeMachine();
  48.  
  49.     UFUNCTION(BlueprintCallable, Category = "Conditions")
  50.         bool IsPersonInRangeToPlayer(ABaseFrame* HuntingPlayer, APersonCharacter* HuntedPerson, float Radius);
  51.  
  52.     UFUNCTION(BlueprintCallable, Category = Movement)
  53.         void MoveTowardsTarget(FVector NewTargetLocation);
  54.  
  55.     UFUNCTION(BlueprintCallable, Category = Movement)
  56.         void UpdateMovement(float DeltaTime);
  57.  
  58.     UFUNCTION(BlueprintCallable, Category = Movement)
  59.         bool IsAtTargetLocation();
  60.  
  61.     //Constructor
  62.     APersonCharacter(const FObjectInitializer& ObjectInitializer);
  63.  
  64.     // Called when the game starts or when spawned
  65.     virtual void BeginPlay() override;
  66.  
  67.     // Called every frame
  68.     virtual void Tick(float DeltaSeconds) override;
  69.  
  70.     // Called to bind functionality to input
  71.     virtual void SetupPlayerInputComponent(class UInputComponent* InputComponent) override;
  72. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement