调整目录结构

杂项:
补充导出标记
修改反射宏错误
修改变量名错误
This commit is contained in:
_Redstone_c_ 2020-12-03 22:44:18 +08:00
parent 96e9af4438
commit d1103c580b
13 changed files with 22 additions and 16 deletions

View File

@ -1,4 +1,4 @@
#include "VoxelBlock.h" #include "Block/VoxelBlock.h"
#include "VoxelWorld.h" #include "VoxelWorld.h"

View File

@ -1,4 +1,4 @@
#include "VoxelMesh.h" #include "Block/VoxelMesh.h"
const FVoxelMeshData FVoxelMeshData::CubeTopFace = const FVoxelMeshData FVoxelMeshData::CubeTopFace =
{ {

View File

@ -6,6 +6,12 @@
void UVoxelBlueprintLibrary::AddBlockType(const UObject* WorldContextObject, const FName& Name, const FVoxelBlockType& BlockType) void UVoxelBlueprintLibrary::AddBlockType(const UObject* WorldContextObject, const FName& Name, const FVoxelBlockType& BlockType)
{ {
UGameInstance* GameInstance = UGameplayStatics::GetGameInstance(WorldContextObject); 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);
} }

View File

@ -1,4 +1,4 @@
#include "VoxelChunk.h" #include "Chunk/VoxelChunk.h"
#include "VoxelLog.h" #include "VoxelLog.h"
#include "VoxelWorld.h" #include "VoxelWorld.h"

View File

@ -1,6 +1,6 @@
#include "VoxelSubsystem.h" #include "VoxelSubsystem.h"
#include "VoxelBlock.h" #include "Block/VoxelBlock.h"
UVoxelSubsystem::UVoxelSubsystem(const class FObjectInitializer& ObjectInitializer) UVoxelSubsystem::UVoxelSubsystem(const class FObjectInitializer& ObjectInitializer)
{ {

View File

@ -1,10 +1,10 @@
#include "VoxelWorld.h" #include "VoxelWorld.h"
#include "VoxelLog.h" #include "VoxelLog.h"
#include "VoxelBlock.h"
#include "VoxelChunk.h"
#include "VoxelHelper.h" #include "VoxelHelper.h"
#include "VoxelSubsystem.h" #include "VoxelSubsystem.h"
#include "Block/VoxelBlock.h"
#include "Chunk/VoxelChunk.h"
#include "VoxelAgentInterface.h" #include "VoxelAgentInterface.h"
const TArray<FIntPoint> ChunkLoadOrder = const TArray<FIntPoint> ChunkLoadOrder =

View File

@ -4,7 +4,7 @@
#include "VoxelMesh.generated.h" #include "VoxelMesh.generated.h"
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FVoxelMeshData struct VOXEL_API FVoxelMeshData
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -1,14 +1,14 @@
#pragma once #pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "VoxelBlock.h" #include "Block/VoxelBlock.h"
#include "Kismet/BlueprintFunctionLibrary.h" #include "Kismet/BlueprintFunctionLibrary.h"
#include "VoxelBlueprintLibrary.generated.h" #include "VoxelBlueprintLibrary.generated.h"
struct FVoxelBlockType; struct FVoxelBlockType;
UCLASS() UCLASS()
class UVoxelBlueprintLibrary : public UBlueprintFunctionLibrary class VOXEL_API UVoxelBlueprintLibrary : public UBlueprintFunctionLibrary
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -1,7 +1,7 @@
#pragma once #pragma once
#include "CoreMinimal.h" #include "CoreMinimal.h"
#include "VoxelBlock.h" #include "Block/VoxelBlock.h"
#include "GameFramework/Actor.h" #include "GameFramework/Actor.h"
#include "VoxelChunk.generated.h" #include "VoxelChunk.generated.h"

View File

@ -8,7 +8,7 @@
class AVoxelWorld; class AVoxelWorld;
UCLASS() UCLASS()
class UVoxelHelper : public UBlueprintFunctionLibrary class VOXEL_API UVoxelHelper : public UBlueprintFunctionLibrary
{ {
GENERATED_BODY() GENERATED_BODY()
@ -17,7 +17,7 @@ public:
UFUNCTION(BlueprintCallable, Category = "Voxel|Helper", meta = (WorldContext = "WorldContextObject")) UFUNCTION(BlueprintCallable, Category = "Voxel|Helper", meta = (WorldContext = "WorldContextObject"))
static AVoxelWorld* CreateVoxelWorld(UObject* WorldContextObject, const FVoxelWorldSetting& WorldSetting); 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); static void WorldToRelativeLocation(const FIntVector& InWorldLocation, FIntPoint& OutChunkLocation, FIntVector& OutRelativeLocation);
}; };

View File

@ -7,7 +7,7 @@
struct FVoxelBlockType; struct FVoxelBlockType;
UCLASS() UCLASS()
class UVoxelSubsystem : public UGameInstanceSubsystem class VOXEL_API UVoxelSubsystem : public UGameInstanceSubsystem
{ {
GENERATED_BODY() GENERATED_BODY()

View File

@ -13,7 +13,7 @@ class UVoxelSubsystem;
class IVoxelAgentInterface; class IVoxelAgentInterface;
USTRUCT(BlueprintType) USTRUCT(BlueprintType)
struct FVoxelWorldSetting struct VOXEL_API FVoxelWorldSetting
{ {
GENERATED_BODY() GENERATED_BODY()