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 "BulletBase.generated.h"
- class UProjectileMovementComponent;
- class UStaticMeshComponent;
- class USphereComponent;
- UCLASS()
- class DEVINSHOOTER_API ABulletBase : public AActor
- {
- GENERATED_BODY()
- public:
- // Sets default values for this actor's properties
- ABulletBase();
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Bullet", meta=(AllowPrivateAccess="true"))
- UStaticMeshComponent* MeshComp;
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Bullet", meta = (AllowPrivateAccess = "true"))
- USphereComponent* HitSphere;
- UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Bullet", meta = (AllowPrivateAccess = "true"))
- UProjectileMovementComponent* ProjectileMovementComp;
- protected:
- // Called when the game starts or when spawned
- virtual void BeginPlay() override;
- public:
- // Called every frame
- virtual void Tick(float DeltaTime) override;
- UFUNCTION()
- void OnHit(UPrimitiveComponent* OnComponentHit, UPrimitiveComponent* HitComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement