Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Fill out your copyright notice in the Description page of Project Settings.
- #pragma once
- #include "CoreMinimal.h"
- #include "GameFramework/Actor.h"
- #include "FPSProjectile.generated.h"
- UCLASS()
- class FPSPROJECT_API AFPSProjectile : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- AFPSProjectile();
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- // This declaration isn't working in the .h
- UPROPERTY(VisibleDefaultsOnly, Category = Projectile) USphereComponent* CollisionComponent;
- // Projectile movement component
- UPROPERTY(VisibleAnywhere, Category = Movement) UProjectileMovementComponent* ProjectileMovementComponent;
- // Function that initializes the projectile's velocity in the shoot direction
- void FireInDirection(const FVector& ShootDirection);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement