Advertisement
Rhettorical

FPSProjectile.h

Dec 13th, 2017
39
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.96 KB | None | 0 0
  1. // Fill out your copyright notice in the Description page of Project Settings.
  2.  
  3. #pragma once
  4.  
  5. #include "CoreMinimal.h"
  6. #include "GameFramework/Actor.h"
  7. #include "FPSProjectile.generated.h"
  8.  
  9. UCLASS()
  10. class FPSPROJECT_API AFPSProjectile : public AActor
  11. {
  12.     GENERATED_BODY()
  13.    
  14. public:
  15.     // Sets default values for this actor's properties
  16.     AFPSProjectile();
  17.  
  18. protected:
  19.     // Called when the game starts or when spawned
  20.     virtual void BeginPlay() override;
  21.  
  22. public:
  23.     // Called every frame
  24.     virtual void Tick(float DeltaTime) override;
  25.  
  26.     // This declaration isn't working in the .h
  27.     UPROPERTY(VisibleDefaultsOnly, Category = Projectile) USphereComponent* CollisionComponent;
  28.  
  29.     // Projectile movement component
  30.     UPROPERTY(VisibleAnywhere, Category = Movement) UProjectileMovementComponent* ProjectileMovementComponent;
  31.  
  32.     // Function that initializes the projectile's velocity in the shoot direction
  33.     void FireInDirection(const FVector& ShootDirection);
  34. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement