43 lines
1.1 KiB
C++
43 lines
1.1 KiB
C++
// Copyright Jorge Kuijper. All Rights Reserved.
|
|
|
|
#pragma once
|
|
|
|
#include "CoreMinimal.h"
|
|
#include "GameFramework/Actor.h"
|
|
#include "Components/ArrowComponent.h"
|
|
#include "Components/BoxComponent.h"
|
|
#include "Tile.generated.h"
|
|
|
|
UCLASS()
|
|
class ENDLESSZOMBIE_API ATile : public AActor
|
|
{
|
|
GENERATED_BODY()
|
|
|
|
public:
|
|
// Sets default values for this actor's properties
|
|
ATile();
|
|
|
|
protected:
|
|
// Called when the game starts or when spawned
|
|
virtual void BeginPlay() override;
|
|
|
|
public:
|
|
// Called every frame
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
USceneComponent* SceneComponent;
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
UArrowComponent* ArrowComponent;
|
|
UPROPERTY(EditAnywhere, BlueprintReadWrite)
|
|
UBoxComponent* EndTrigger;
|
|
|
|
UFUNCTION(BlueprintCallable, Category = "AttachedPoint")
|
|
FTransform GetAttachTransform();
|
|
UFUNCTION()
|
|
virtual void OnBeginOverlap(UPrimitiveComponent* OverlappedComponent, AActor* OtherActor, UPrimitiveComponent* OtherComp, int32 OtherBodyIndex, bool bFromSweep, const FHitResult& SweepResult);
|
|
|
|
private:
|
|
void DestroyTile();
|
|
};
|