super-duper-spoon/Source/Shooter/Item.h

46 lines
1.1 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "Item.generated.h"
class UBoxComponent;
class UWidgetComponent;
UCLASS()
class SHOOTER_API AItem : public AActor
{
GENERATED_BODY()
public:
// Sets default values for this actor's properties
AItem();
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
public:
// Called every frame
virtual void Tick(float DeltaTime) override;
private:
/* Skeletal mesh for the item */
UPROPERTY(VisibleAnywhere, BlueprintReadonly, Category = "Item Properties", meta = (AllowPrivateAccess = true))
USkeletalMeshComponent* ItemMesh;
/* Line trace collides with box to show HUD widgets */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item Properties", meta = (AllowPrivateAccess = true))
UBoxComponent* CollisionBox;
/* Popup widget for when the player looks at the item */
UPROPERTY(EditAnywhere, BlueprintReadOnly, Category = "Item Properties", meta = (AllowPrivateAccess = true))
UWidgetComponent* PickupWidget;
public:
};