// 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, EditDefaultsOnly, Category = "Config") bool bCollectable; UPROPERTY(BlueprintReadOnly, EditDefaultsOnly, Category = "Config") bool bActivatable; UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Generation") int32 ID; UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Generation") class AHexTile* Origin; // very important UPROPERTY(BlueprintReadOnly, VisibleAnywhere, Category = "Generation") bool bPlaced; UPROPERTY(BlueprintReadWrite, VisibleAnywhere, Category = "Generation") TArray 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; UFUNCTION(BlueprintImplementableEvent) void Occupy(); };