-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSpawnerGameModeBase.cpp
More file actions
39 lines (27 loc) · 957 Bytes
/
SpawnerGameModeBase.cpp
File metadata and controls
39 lines (27 loc) · 957 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// Copyright Epic Games, Inc. All Rights Reserved.
#include "SpawnerGameModeBase.h"
#include "MyBlueprintFunctionLibrary.h"
#include "TimerManager.h"
#include "Engine/World.h"
#include "UObject/ConstructorHelpers.h"
ASpawnerGameModeBase::ASpawnerGameModeBase()
{
}
void ASpawnerGameModeBase::BeginPlay()
{
Super::BeginPlay();
FString JsonFilePath = TEXT("D:\\Temp\\MyJson.json");
bool bOutSuccess = false;
FString OutInfoMessage = TEXT("Json Successfull");
FAqTestStruct MyStruct = JsonApi->ReadStructFromJsonFile(JsonFilePath, bOutSuccess, OutInfoMessage);
UE_LOG(LogTemp, Warning, TEXT("MyStruct String: %s"), *MyStruct.MyString);
UE_LOG(LogTemp, Warning, TEXT("MyStruct Float %f"), MyStruct.MyFloat);
for (int32 i = 0; i < MyStruct.Enemies.Num(); i++)
{
UE_LOG(LogTemp, Warning, TEXT("Enemy : %d"), MyStruct.Enemies[i]);
}
}
void ASpawnerGameModeBase::SpawnEnemy()
{
UE_LOG(LogTemp, Warning, TEXT("Counter is %d"), Counter);
}