2022-02-03 01:11:06 +01:00
|
|
|
// Fill out your copyright notice in the Description page of Project Settings.
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "CoreMinimal.h"
|
|
|
|
#include "GameFramework/Actor.h"
|
|
|
|
#include "HexVector.h"
|
|
|
|
#include "MapObject.generated.h"
|
|
|
|
|
|
|
|
class USceneComponent;
|
|
|
|
class UStaticMeshComponent;
|
|
|
|
class AAdventureMap;
|
|
|
|
|
|
|
|
UCLASS()
|
|
|
|
class FRAY_API AMapObject : public AActor
|
|
|
|
{
|
|
|
|
GENERATED_BODY()
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Sets default values for this actor's properties
|
|
|
|
AMapObject();
|
|
|
|
|
|
|
|
UPROPERTY(BlueprintReadOnly, Category = "Config")
|
|
|
|
AAdventureMap* MapRef;
|
|
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Config")
|
|
|
|
USceneComponent* SceneComponent;
|
|
|
|
UPROPERTY(VisibleAnywhere, BlueprintReadOnly, Category = "Config")
|
|
|
|
UStaticMeshComponent* OrientHexMesh;
|
2022-05-25 20:07:51 +02:00
|
|
|
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "Config")
|
2022-02-03 01:11:06 +01:00
|
|
|
bool bCollectable;
|
2022-05-25 20:07:51 +02:00
|
|
|
UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "Config")
|
2022-02-03 01:11:06 +01:00
|
|
|
bool bActivatable;
|
|
|
|
|
|
|
|
UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Generation")
|
|
|
|
int32 ID;
|
|
|
|
UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Generation")
|
|
|
|
class AHexTile* Origin; // very important
|
|
|
|
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Generation")
|
|
|
|
TArray<FHexVector> Occupying;
|
|
|
|
|
|
|
|
UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Runtime")
|
|
|
|
AController* FlaggedBy;
|
|
|
|
|
|
|
|
UFUNCTION()
|
|
|
|
virtual void Touch();
|
|
|
|
UFUNCTION()
|
|
|
|
virtual void Activate();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
// Called when the game starts or when spawned
|
|
|
|
virtual void BeginPlay() override;
|
|
|
|
|
|
|
|
public:
|
|
|
|
// Called every frame
|
|
|
|
virtual void Tick(float DeltaTime) override;
|
|
|
|
|
|
|
|
void Occupy();
|
|
|
|
|
|
|
|
};
|