DeskSim v2 0.1
Train simulator prototype created for Lokførerskolen
DesksimGameInstance.h
Go to the documentation of this file.
1/*****************************************************************/
9// Copyright 2022 Thomas Arinesalingam, John Ole Bjerke, Endre Heksum & Henrik Markengbakken Karlsen . All Rights Reserved.
10
11#pragma once
12
13#include "CoreMinimal.h"
14#include "Engine/GameInstance.h"
15#include "DesksimGameInstance.generated.h"
16
17
18
19
20UENUM(BlueprintType)
21enum class EUserType : uint8
22{
23 Student,
24 Teacher,
25 Admin
26};
27
33USTRUCT(BlueprintType)
35{
36 GENERATED_BODY()
37
38 // Info about user
39 UPROPERTY(BlueprintReadWrite, Category = "UserInfo")
40 bool bIsAuthenticated = false;
41
42 UPROPERTY(BlueprintReadWrite, Category = "UserInfo")
43 EUserType UserType;
44
45 UPROPERTY(BlueprintReadWrite, Category = "UserInfo")
46 int32 id;
47
48 UPROPERTY(BlueprintReadWrite, Category = "UserInfo")
49 FName Username;
50
51 FName Operator;
52
53 bool bIsEnabled;
54
55 int32 SubscriptionID;
56
57};
58
64UCLASS()
65class DESKSIMV2_API UDesksimGameInstance : public UGameInstance
66{
67 GENERATED_BODY()
68
69public:
70
71 // Stuff here
72
73 bool bIsLoggedIn = false;
74
76 UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "UserInfo")
77 FUserInfo UserInfo;
78
79
80
81};
UDesksimGameInstance contains some global info.
Definition: DesksimGameInstance.h:66
Stuct containing info about the logged in user.
Definition: DesksimGameInstance.h:35