// Fill out your copyright notice in the Description page of Project Settings.


#include "DemoGameInstance.h"
#include "EventManagerDemo/Public/EventManager.h"

UDemoGameInstance::UDemoGameInstance() : Super()
{
	initialized = false;
}

void UDemoGameInstance::Init()
{
	EventManager::getInstance().Init();

	Super::Init();

	initialized = true;
}

void UDemoGameInstance::Shutdown()
{
	initialized = false;

	Super::Shutdown();
}

void UDemoGameInstance::StartGameInstance()
{
	Super::StartGameInstance();
}

void UDemoGameInstance::Tick(float DeltaSeconds)
{
	if (initialized)
	{
		EventManager::getInstance().triggerQueuedEvents();
	}
}
