unreal/MapObject.h

60 lines
1.5 KiB
C
Raw Normal View History

// 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;
UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Config")
bool bCollectable;
UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Config")
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();
};