parent
96e9af4438
commit
d1103c580b
|
@ -1,4 +1,4 @@
|
|||
#include "VoxelBlock.h"
|
||||
#include "Block/VoxelBlock.h"
|
||||
|
||||
#include "VoxelWorld.h"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#include "VoxelMesh.h"
|
||||
#include "Block/VoxelMesh.h"
|
||||
|
||||
const FVoxelMeshData FVoxelMeshData::CubeTopFace =
|
||||
{
|
|
@ -6,6 +6,12 @@
|
|||
void UVoxelBlueprintLibrary::AddBlockType(const UObject* WorldContextObject, const FName& Name, const FVoxelBlockType& BlockType)
|
||||
{
|
||||
UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(WorldContextObject);
|
||||
UVoxelSubsystem* LockstepSubsystem = GameInstance->GetSubsystem<UVoxelSubsystem>();
|
||||
LockstepSubsystem->BlockTypes.Add(Name, BlockType);
|
||||
|
||||
check(GameInstance);
|
||||
|
||||
UVoxelSubsystem* VoxelSubsystem = GameInstance->GetSubsystem<UVoxelSubsystem>();
|
||||
|
||||
check(VoxelSubsystem);
|
||||
|
||||
VoxelSubsystem->BlockTypes.Add(Name, BlockType);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "VoxelChunk.h"
|
||||
#include "Chunk/VoxelChunk.h"
|
||||
|
||||
#include "VoxelLog.h"
|
||||
#include "VoxelWorld.h"
|
|
@ -1,6 +1,6 @@
|
|||
#include "VoxelSubsystem.h"
|
||||
|
||||
#include "VoxelBlock.h"
|
||||
#include "Block/VoxelBlock.h"
|
||||
|
||||
UVoxelSubsystem::UVoxelSubsystem(const class FObjectInitializer& ObjectInitializer)
|
||||
{
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
#include "VoxelWorld.h"
|
||||
|
||||
#include "VoxelLog.h"
|
||||
#include "VoxelBlock.h"
|
||||
#include "VoxelChunk.h"
|
||||
#include "VoxelHelper.h"
|
||||
#include "VoxelSubsystem.h"
|
||||
#include "Block/VoxelBlock.h"
|
||||
#include "Chunk/VoxelChunk.h"
|
||||
#include "VoxelAgentInterface.h"
|
||||
|
||||
const TArray<FIntPoint> ChunkLoadOrder =
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "VoxelMesh.generated.h"
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FVoxelMeshData
|
||||
struct VOXEL_API FVoxelMeshData
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "VoxelBlock.h"
|
||||
#include "Block/VoxelBlock.h"
|
||||
#include "Kismet/BlueprintFunctionLibrary.h"
|
||||
#include "VoxelBlueprintLibrary.generated.h"
|
||||
|
||||
struct FVoxelBlockType;
|
||||
|
||||
UCLASS()
|
||||
class UVoxelBlueprintLibrary : public UBlueprintFunctionLibrary
|
||||
class VOXEL_API UVoxelBlueprintLibrary : public UBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#pragma once
|
||||
|
||||
#include "CoreMinimal.h"
|
||||
#include "VoxelBlock.h"
|
||||
#include "Block/VoxelBlock.h"
|
||||
#include "GameFramework/Actor.h"
|
||||
#include "VoxelChunk.generated.h"
|
||||
|
|
@ -8,7 +8,7 @@
|
|||
class AVoxelWorld;
|
||||
|
||||
UCLASS()
|
||||
class UVoxelHelper : public UBlueprintFunctionLibrary
|
||||
class VOXEL_API UVoxelHelper : public UBlueprintFunctionLibrary
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
@ -17,7 +17,7 @@ public:
|
|||
UFUNCTION(BlueprintCallable, Category = "Voxel|Helper", meta = (WorldContext = "WorldContextObject"))
|
||||
static AVoxelWorld* CreateVoxelWorld(UObject* WorldContextObject, const FVoxelWorldSetting& WorldSetting);
|
||||
|
||||
UFUNCTION(BlueprintCallable, Category = "Voxel|Helper")
|
||||
UFUNCTION(BlueprintPure, Category = "Voxel|Helper")
|
||||
static void WorldToRelativeLocation(const FIntVector& InWorldLocation, FIntPoint& OutChunkLocation, FIntVector& OutRelativeLocation);
|
||||
|
||||
};
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
struct FVoxelBlockType;
|
||||
|
||||
UCLASS()
|
||||
class UVoxelSubsystem : public UGameInstanceSubsystem
|
||||
class VOXEL_API UVoxelSubsystem : public UGameInstanceSubsystem
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ class UVoxelSubsystem;
|
|||
class IVoxelAgentInterface;
|
||||
|
||||
USTRUCT(BlueprintType)
|
||||
struct FVoxelWorldSetting
|
||||
struct VOXEL_API FVoxelWorldSetting
|
||||
{
|
||||
GENERATED_BODY()
|
||||
|
||||
|
|
Loading…
Reference in New Issue