unreal/HexTile.h

54 lines
1.3 KiB
C
Raw Normal View History

2022-01-11 11:07:17 +01:00
// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "GameFramework/Actor.h"
#include "HexTile.generated.h"
class USceneComponent;
class UStaticMeshComponent;
2022-01-13 16:34:06 +01:00
class AAdventureMap;
2022-01-11 11:07:17 +01:00
class AAdventurePlayerController;
UCLASS()
class FRAY_API AHexTile : public AActor
{
GENERATED_BODY()
public:
// Sets default value for this actor's properties
AHexTile();
UPROPERTY(EditDefaultsOnly, BlueprintReadOnly, Category = "Config")
float TileSize;
2022-01-11 11:07:17 +01:00
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Components")
USceneComponent* SceneComponent;
UFUNCTION(BlueprintCallable, Category = "debug")
2022-01-11 11:07:17 +01:00
FVector Corner(int32 i);
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "debug")
2022-01-11 11:07:17 +01:00
TArray<FVector> Corners;
UFUNCTION()
void FillCornersArray();
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Runtime")
int32 Q;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Runtime")
int32 R;
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Runtime")
int32 Index;
2022-01-13 16:34:06 +01:00
UPROPERTY(BlueprintReadWrite, Category = "Runtime")
AAdventureMap* MapRef;
UFUNCTION(BlueprintCallable, Category = "Runtime")
int32 Distance(AHexTile* ToHex);
2022-01-11 11:07:17 +01:00
protected:
// Called when the game starts or when spawned
virtual void BeginPlay() override;
};