A Demo Project for the UnrealEngineSDK
Loading...
Searching...
No Matches
PixoVRGameMode.cpp
Go to the documentation of this file.
1// Copyright(c) Pixo Group. All Rights Reserved.
2
3#include "PixoVRGameMode.h"
4
6{
7 PrimaryActorTick.bCanEverTick = true;
8 ExperienceManagerClass = UExperienceManager::StaticClass();
9}
10
11void APixoVRGameMode::InitGame(const FString& MapName, const FString& Options, FString& ErrorMessage)
12{
13 Super::InitGame(MapName, Options, ErrorMessage);
14 if (ROLE_Authority)
15 {
16 ExperienceManager = NewObject<UExperienceManager>(this, ExperienceManagerClass);
18 }
19}
20
21void APixoVRGameMode::Tick(float DeltaSeconds)
22{
23 Super::Tick(DeltaSeconds);
24
26 {
27 ExperienceManager->TickExperience(DeltaSeconds);
28 }
29}
30
31UBaseManager* APixoVRGameMode::GetManagerRef_Implementation(TSubclassOf<UBaseManager> ManagerClass)
32{
34 {
35 return IPixoCoreInterface::Execute_GetManagerRef(ExperienceManager, ManagerClass);
36 }
37 return nullptr;
38}
UExperienceManager * ExperienceManager
UPROPERTY()
virtual void Tick(float DeltaSeconds) override
UBaseManager * GetManagerRef_Implementation(TSubclassOf< UBaseManager > ManagerClass)
Implementation of the GetManagerRef function from the IPixoCoreInterface.
virtual void InitGame(const FString &MapName, const FString &Options, FString &ErrorMessage) override
Initializes the game mode and ExperienceManager.
TSubclassOf< UExperienceManager > ExperienceManagerClass
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite, Category = Classes, DisplayName = ExperienceManager)
It provides functionalities for handling events, sending events, and managing a private owner....
Definition BaseManager.h:32
virtual void TickExperience(float DeltaTime)
This function is called every frame to handle events in the game experience. It calls the HandleEvent...
virtual void InitExperience()
This function initializes the game experience by creating and adding single-instance listeners to the...