Files
SibIntel1/Source/MasharovDev/cppGI.h
T

72 lines
2.2 KiB
C++

// Fill out your copyright notice in the Description page of Project Settings.
#pragma once
#include "CoreMinimal.h"
#include "Engine/GameInstance.h"
#include "cppGI.generated.h"
/**
*
*/
USTRUCT(BlueprintType)
struct Fcppcoords
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite, category = "default")
int32 flat = -1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 type = 0;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 zone = 1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 house = -1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 section = -1;
UPROPERTY(BlueprintReadWrite, category = "default")
int32 floor = -1;
};
USTRUCT(BlueprintType)
struct FcppLevelStruct
{
GENERATED_BODY()
UPROPERTY(BlueprintReadWrite)
Fcppcoords coords;
UPROPERTY(BlueprintReadWrite)
bool dontUnload = false;
UPROPERTY(BlueprintReadWrite)
FString path;
UPROPERTY(BlueprintReadWrite)
float Z = 0;
UPROPERTY(BlueprintReadWrite)
int32 anotherLvl = -1;
};
UCLASS()
class MASHAROVDEV_API UcppGI : public UGameInstance
{
GENERATED_BODY()
public:
UFUNCTION(blueprintcallable, category = "cppFuncLib")
static void cppCoordsEq(Fcppcoords coords, Fcppcoords coords1, bool relevantMinus2, bool fastEq, bool& flat_, bool& type_, bool& zone_, bool& house_, bool& section_, bool& floor_, bool& fullEq);
/*returns array of levels for binding and array of lvlstruct for loading*/
UFUNCTION(blueprintcallable, Category = "Level Loading", meta = (WorldContext = "WorldContextObject"))
void cppLvlManage(UObject* WorldContextObject, Fcppcoords currentCoords, uint8 currentState, TArray<ULevelStreaming*>& Levelss);
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "levelLoading", meta = (MultiLine = "true"))
TArray<FcppLevelStruct> cpplevelLIst;
/** used if need to load some levels instantly. -2 of any coord is use current. */
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Level Loading", meta = (MultiLine = "true"))
TArray<Fcppcoords> cpplvlsForLoading;
UPROPERTY(BlueprintReadWrite, EditDefaultsOnly, Category = "Level Loading", meta = (MultiLine = "true"))
TArray<FName> cppdynamicLvls;
};