blaster/Source/Blaster/Weapon/Casing.h

37 lines
738 B
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Casing.generated.h"
UCLASS()
class BLASTER_API ACasing : public AActor
{
GENERATED_BODY()
public:
ACasing();
protected:
virtual void BeginPlay() override;
UFUNCTION()
virtual void OnHit(UPrimitiveComponent* HitComp, AActor* OtherActor, UPrimitiveComponent* OtherComp, FVector NormalImpulse, const FHitResult& Hit);
private:
UPROPERTY(VisibleAnywhere)
UStaticMeshComponent* CasingMesh;
UPROPERTY(EditAnywhere)
float ShellEjectionImpulseMin;
UPROPERTY(EditAnywhere)
float ShellEjectionImpulseMax;
UPROPERTY(EditAnywhere)
class USoundCue* ShellSound;
};