-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathContextManager.cs
32 lines (30 loc) · 1.13 KB
/
ContextManager.cs
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
using EagleResearch.CIDS.Config;
using EagleResearch.CIDS.Services;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace EagleResearch.CIDS
{
/// <summary>
/// Primary component used to change the context of the user.
/// </summary>
[RequireComponent(typeof(GlobalContextService))]
public class ContextManager : MonoBehaviour
{
public GlobalContextService globalContextService;
private void Start()
{
globalContextService = GetComponent<GlobalContextService>();
}
/// <summary>
/// Changes the context of the scene based on the provided profesionalPosition and userTask
/// </summary>
/// <param name="professionalPosition">The new professionalPosition</param>
/// <param name="userTask">The new userTask</param>
public void ChangeContext(ContextConfiguration.ProfessionalPosition professionalPosition, ContextConfiguration.UserTask userTask)
{
globalContextService.IProfessionalPosition= professionalPosition;
globalContextService.IUserTask= userTask;
}
}
}