Documentation for the Unity C# Library
Loading...
Searching...
No Matches
StepManager.cs
Go to the documentation of this file.
1using System;
2using System.Collections;
3using System.Collections.Generic;
4using System.Linq;
5using System.Net.Http;
6using PixoVR.Apex;
7using PixoVR.Apex.XAPI;
8using PixoVR.Audio;
9using PixoVR.Core;
10using TMPro;
11using UnityEngine;
12
13namespace PixoVR.Event
14{
18 public class StepManager : MonoBehaviour
19 {
20 public static bool isListen = false;
21 [SerializeField] private StepsDataSO _stepsData;
22 [SerializeField] private string _currentStepID;
23 [SerializeField] private int _currentFunctionID;
25 [SerializeField] private TMP_Text _currentStepText;
26 [SerializeField] private TMP_Text _currentFunctionText;
27 [SerializeField] private BreakdownDebug _breakdownDebug;
29
30 private bool _isLastFunctionInStep;
31 private bool isWaitForUserChoice;
33 private readonly Dictionary<ItemsEnum, InteractableClass> dictionaryOfItems =
34 new Dictionary<ItemsEnum, InteractableClass>();
35
36 private readonly List<ItemsEnum> listOfTrigeredItems = new List<ItemsEnum>();
37
39
41 public event Action<string, int> StepInformationUpdated;
42
43 static private int stepId = 0;
47 private Extension _contextExtension;
50
51 private void Awake()
52 {
55 EventBetter.Listen(this, (ItemInformation msg) => RegisterItems(msg.Item, msg.InteractableClass));
56
57 isListen = true;
60 EventBetter.Raise(
62 {
63 IsStart = true,
64 }
65 );
67 if (ApexSystem.Instance)
68 {
69 ApexSystem.Instance.OnJoinSessionSuccess.AddListener(OnJoinSessionSuccess);
70 ApexSystem.Instance.OnJoinSessionFailed.AddListener(OnJoinSessionFailed);
71 }
73 var apexSessionState = StatesService.GetState<ApexSessionState>(true);
75 _quizData = StatesService.GetState<QuizData>();
76 if (_breakdownDebug != null)
77 {
79 }
80
81 if (apexSessionState.IsLoggedIn)
82 {
83 _contextExtension = new Extension();
84 _contextExtension.AddSimple("Session Start Time", $"{DateTime.UtcNow}");
85 _contextExtension.AddSimple("UserName", $"{apexSessionState.UserName}");
86 _contextExtension.AddSimple("UserEmail", $"{apexSessionState.Email}");
87 _contextExtension.AddSimple("Mode", $"{_scenarioState.CurrentScenario}");
88 _contextExtension.AddSimple("Truck model", $"Freightliner Cascadia (2016-2020))");
89 _contextExtension.AddSimple("Software version number", $"{Application.version}");
90
91 //TODO:hack for transmission definition
92 _contextExtension.AddSimple(
93 "Transmission",
94 _scenarioState.CurrentScenario.ToString().Contains("MANUAL")
95 ? "Manual"
96 : "Automatic"
97 );
98
99 apexSessionState.StartTime = DateTime.UtcNow;
100
101 ApexSystem.JoinSession($"{_scenarioState.CurrentScenario}", _contextExtension);
102 }
103 }
104
105 private void OnJoinSessionFailed(FailureResponse failureResponse)
106 {
107 Debug.Log("Apex OnJoinSessionFailed");
108
109 if (_apexJoinTryRepeated) return;
110
112
113 _errorMessagePopup.ShowErrorMessage("APEX. Join session failed.Try to connect again");
114 _errorMessagePopup.CloseButtonClicked += () =>
115 {
116 ApexSystem.JoinSession($"{_scenarioState.CurrentScenario}", _contextExtension);
117 };
118 }
119
120 private void OnJoinSessionSuccess(HttpResponseMessage httpResponseMessage)
121 {
122 Debug.Log("Apex OnJoinSessionSuccess");
123
124 _apexJoinTryRepeated = false;
125 }
127 private void OnEnable()
128 {
129 var stepsData = StatesService.GetState<StepsDataSO>();
130
131 if (stepsData != null)
132 {
133 _stepsData = stepsData;
134 }
135 }
136
137 private void Start()
138 {
139 StartCoroutine(PreparingForStart());
140 }
142 private IEnumerator PreparingForStart()
143 {
144 yield return new WaitForSeconds(1);
146
150 }
151
159 return dictionaryOfItems.GetValueOrDefault(itemId);
160 }
161
162 public void GoToStep(string stepId)
164 //TODO
165 }
166
167 public Dictionary<ItemsEnum, InteractableClass> GetDictionary()
168 {
169 return dictionaryOfItems;
170 }
171
172 private void StartScenario()
173 {
175 }
176
177 private void StartStep_Function(StepItem stepItem) //StartStep
179 StartCoroutine(StartStep_FunctionEnumerator(stepItem)); //StartStepEnumerator
180 }
181
182 private IEnumerator StartStep_FunctionEnumerator(StepItem stepItem)
184 yield return new WaitForSeconds(0.5f);
185
186 if (stepItem.waitForUserAction)
187 {
194 _currentStepID = stepItem.stepID;
195 isWaitForUserChoice = false;
196 _isLastFunctionInStep = false;
197
200 StartFunction(stepItem);
201 }
202
203 private void StartFunction(StepItem stepItem)
204 {
205 StepFunction stepFunction = stepItem.functionsStep[_currentFunctionID];
206
207 _isLastFunctionInStep = (stepItem.functionsStep.Count - _currentFunctionID) == 1;
208 isWaitForUserChoice = false;
209
210 switch (stepFunction.function)
211 {
212 case Function.ACTIVATE_OBJECT:
213 Debug.Log($"case Function.ActivateObject {stepItem.stepID}");
214 ExecuteFunction(new ActivateObject(), stepItem, stepFunction);
215
216 break;
217 case Function.DEACTIVATE_OBJECT:
218 Debug.Log($"case Function.DeactivateObject {stepItem.stepID}");
219 ExecuteFunction(new DeactivateObject(), stepItem, stepFunction);
220
221 break;
222 case Function.HIGHLIGHT_OBJECTS:
223 Debug.Log($"case Function.HighlightObjects {stepItem.stepID}");
226 {
227 ExecuteFunction(new HighlightOnSelection(), stepItem, stepFunction);
228 }
229 else
230 {
231 ExecuteFunction(new HighlightObject(), stepItem, stepFunction);
232 }
233
234 break;
235 case Function.TURN_OFF_HIGHLIGHT_OBJECT:
236 Debug.Log($"case Function.TurnOffHighlightObject {stepItem.stepID}");
237 ExecuteFunction(new TurnOffHighlightObject(), stepItem, stepFunction);
238 break;
239 case Function.ACTIVATE_AND_HIGHLIGHT:
240 Debug.Log($"case Function.ActivateAndHighlight {stepItem.stepID}");
241
242 if (StatesService.GetState<ScenarioState>().IsEvaluation)
243 {
244 ExecuteFunction(new ActivateAndHighlightOnSelection(), stepItem, stepFunction);
245 }
246 else
247 {
248 ExecuteFunction(new ActivateAndHighlight(), stepItem, stepFunction);
249 }
250
251 break;
252 case Function.DEACTIVATE_AND_HIGHLIGHT_OFF:
253 Debug.Log($"case Function.DeactivateAndHighlightOff {stepItem.stepID}");
254 ExecuteFunction(new DeactivateAndHighlightOff(), stepItem, stepFunction);
255 break;
256 case Function.PLAY_VOICE_OVER:
257 Debug.Log($"case Function.PlayVoiceOver {stepItem.stepID}");
258 ExecuteFunction(new PlayVoiceOver(), stepItem, stepFunction);
259
260 break;
261 case Function.GRABLE_OR_INTERACT_OBJECT:
262 Debug.Log($"case Function.GrableOrInteractObject {stepItem.stepID}");
263 ExecuteFunction(new GrableOrInteractObject(), stepItem, stepFunction);
264
265 break;
266 case Function.TELEPORT_TO_POSITION:
267 Debug.Log($"case Function.TeleportToPosition {stepItem.stepID}");
268 ExecuteFunction(new TeleportToPosition(), stepItem, stepFunction);
269
270 break;
271 case Function.TRANSIT_TO_SCENE:
272 Debug.Log($"case Function.TransitToScene {stepItem.stepID}");
273 ExecuteFunction(new TransitToScene(), stepItem, stepFunction);
274
275 break;
276 case Function.START_PLAY_ANIMATION:
277 Debug.Log($"case Function:StartPlayAnimation {stepItem.stepID}");
278 ExecuteFunction(new StartPlayAnimation(), stepItem, stepFunction);
279
280 break;
281 case Function.START_REVERSE_ANIMATION:
282 Debug.Log($"case Function:StartReverseAnimation {stepItem.stepID}");
283 ExecuteFunction(new StartReverseAnimation(), stepItem, stepFunction);
284
285 break;
286 case Function.OPEN_INSPECTION_MENU_FOR_ITEM:
287 Debug.Log($"case Function:OpenInspectionMenuForItem {stepItem.stepID}");
288 ExecuteFunction(new OpenInspectionMenuForItem(), stepItem, stepFunction);
289
290 break;
291 case Function.SET_ADDITIONAL_PARAMS_FOR_ITEM:
292 Debug.Log($"case Function:SetAdditionalParamsForItem {stepItem.stepID}");
293 ExecuteFunction(new SetAdditionalParamsForItem(), stepItem, stepFunction);
294
295 break;
296 case Function.PREPARE_INSPECTION_REPORT:
297 Debug.Log($"case Function:PrepareInspectionReport {stepItem.stepID}");
298 ExecuteFunction(new PrepareInspectionReport(), stepItem, stepFunction);
299
300 break;
301 case Function.SHOW_MODEL:
302 Debug.Log($"case Function.SHOW_MODEL {stepItem.stepID}");
303 ExecuteFunction(new ShowModel(), stepItem, stepFunction);
304
305 break;
306 case Function.HIDE_MODEL:
307 Debug.Log($"case Function.HIDE_MODEL {stepItem.stepID}");
308 ExecuteFunction(new HideModel(), stepItem, stepFunction);
309
310 break;
311 case Function.GENERATE_BREAKDOWN:
312 Debug.Log($"case Function:GenerateBreakdown {stepItem.stepID}");
313 ExecuteFunction(new GenerateBreakdown(), stepItem, stepFunction);
314 if (_breakdownDebug != null)
315 {
317 }
318
319 break;
320 case Function.SET_DEFAULT_STATE:
321 Debug.Log($"case Function:SetDefaultStateForItem {stepItem.stepID}");
322 ExecuteFunction(new SetDefaultStateForItem(), stepItem, stepFunction);
323
324 break;
325 case Function.TURN_ON_OBJECTS:
326 Debug.Log($"case Function.ActivateObject {stepItem.stepID}");
327 ExecuteFunction(new TurnOnObjects(), stepItem, stepFunction);
328
329 break;
330 case Function.TURN_OFF_OBJECTS:
331 Debug.Log($"case Function.DeactivateObject {stepItem.stepID}");
332 ExecuteFunction(new TurnOffObjects(), stepItem, stepFunction);
333
334 break;
335 case Function.WAITING_FOR_CHOICE:
336 Debug.Log($"case Function.WaitingForChoice {stepItem.stepID}");
337 isWaitForUserChoice = true;
338 ExecuteFunction(new TurnOffObjects(), stepItem, stepFunction);
339
340 break;
341 case Function.HIGHLIGHT_ON_SELECTION:
342 Debug.Log($"case Function.HighlightOnSelection {stepItem.stepID}");
343 ExecuteFunction(new HighlightOnSelection(), stepItem, stepFunction);
344
345 break;
346 case Function.DELAY:
347 Debug.Log($"case Function.Delay {stepItem.stepID}");
348 ExecuteFunction(new Delay(), stepItem, stepFunction);
349 break;
350
351 case Function.SET_VOICE_OVER_VOLUME:
352 Debug.Log($"case Function.SetVoiceOverVolume {stepItem.stepID}");
353 ExecuteFunction(new SetVoiceOverVolume(), stepItem, stepFunction);
354 break;
355
356 case Function.SET_FX_VOLUME:
357 Debug.Log($"case Function.Delay {stepItem.stepID}");
358 ExecuteFunction(new SetFxVolume(), stepItem, stepFunction);
359 break;
360
361 case Function.CHECK_ALREADY_INSPECTION:
362 Debug.Log($"case Function.CheckAlreadyInspection {stepItem.stepID}");
363 ExecuteFunction(new CheckAlreadyInspection(), stepItem, stepFunction);
364 break;
365
366 case Function.SET_TIMER:
367 Debug.Log($"case Function.SET_TIMER {stepItem.stepID}");
368 ExecuteFunction(new SetTimer(), stepItem, stepFunction);
369 break;
370
371 case Function.STOP_TIMER:
372 Debug.Log($"case Function.STOP_TIMER {stepItem.stepID}");
373 ExecuteFunction(new StopTimer(), stepItem, stepFunction);
374 break;
375 default:
376 break;
377 }
378 }
379
386 private void ExecuteFunction(IStep step, StepItem stepItem, StepFunction function)
387 {
388 List<InteractableClass> listGameObjects = new List<InteractableClass>();
389
390 bool isWaitForDone = function.waitForDone;
391
392 foreach (var item in function.itemsForAction)
393 {
394 listGameObjects.Add(dictionaryOfItems[item]);
395 }
396
397 EventBetter.Unlisten<TriggeredItemEvent>(this);
398
400 {
401 EventBetter.Listen(this, (TriggeredItemEvent msg) => RegisterTriggeredItems(msg.item));
402 }
403
404 else if (isWaitForDone && !_isLastFunctionInStep)
405 {
406 ++stepId;
407 int temp = stepId;
408 string tempStepID = _currentStepID;
409 Debug.LogError("BEFORE SUBSRIBE STEP_ID " + stepId + " _currentFunctionID: " + _currentFunctionID);
410
411 step.OnFunctionFinished += () =>
412 {
413 Debug.LogError(
414 "incremented temp " + temp + " tempStepID: " + tempStepID
415 );
416
418 {
421 StartFunction(stepItem);
422 }
423 };
424 }
425
426 else if (stepItem.waitForUserAction && stepItem.nextSteps.Count != 0)
427 {
428 EventBetter.Listen(this, (TriggeredItemEvent msg) => RegisterTriggeredItems(msg.item));
429 }
430
431 step.StartStep(stepItem, function, listGameObjects, () => { isWaitForDone = false; });
432
433 //TODO
434 //CRITICAL step.OnFunctionFinished after startStep
435
436 if (_isLastFunctionInStep && stepItem.nextSteps.Count != 0 && !isWaitForUserChoice)
437 {
438 if (isWaitForDone && !stepItem.waitForUserAction)
439 {
440 step.OnFunctionFinished += () =>
441 {
442 StartStep_Function(_stepsData.GetStepItem(stepItem.nextSteps[0]));
443 };
444 }
445
446 else if (!stepItem.waitForUserAction)
447 {
448 StartStep_Function(_stepsData.GetStepItem(stepItem.nextSteps[0]));
449 }
450 }
451
452 else if (!_isLastFunctionInStep && !isWaitForDone && !isWaitForUserChoice)
453 {
456 StartFunction(stepItem);
457 }
458 }
459
460 private void RegisterItems(ItemsEnum item, InteractableClass interactableClass)
461 {
462 Debug.Log("Registered item : X" + (int)item + " " + item.ToString(), interactableClass.gameObject);
463
464 dictionaryOfItems.Add(item, interactableClass);
465 }
466
471 private void RegisterTriggeredItems(ItemsEnum item)
472 {
473 Debug.Log("RegisterClickOnItems item : " + item);
474
475 if (listOfTrigeredItems.Any(x => x == item))
476 {
477 Debug.LogWarning("Register items is exist");
478 }
479
480 var stepItem = _stepsData.GetStepItem(_currentStepID);
481 var function = stepItem.functionsStep.Last();
482 var items = function.itemsForAction;
483 var isItemCorrect = items.Any(s => s == item);
484 var isFirstItem = items[0] == item;
485 listOfTrigeredItems.Add(item);
486
487 var itemsID = function.additionalValues;
488
489 var isActionAssessment = function.value != String.Empty;
490
493 if (isItemCorrect)
494 {
495 var stepId = stepItem.nextSteps[items.IndexOf(item)];
496 var nextStep = _stepsData.GetStepItem(stepId);
497 StartStep_Function(nextStep);
498 }
499 else if (item == ItemsEnum.SKIP_STEP)
500 {
501 var stepId = stepItem.nextSteps[0];
502 var nextStep = _stepsData.GetStepItem(stepId);
503 StartStep_Function(nextStep);
504 }
505 else
506 {
507 if (stepItem.voiceOverIDWrongAction != string.Empty
508 && !(itemsID.Any(s => s == item.ToString())))
509 {
510 PlayVoiceOverOnceTime(stepItem.voiceOverIDWrongAction);
511 }
512 }
513
514 if (isItemCorrect && isActionAssessment && _isLastFunctionInStep)
515 {
516 SetActionResultInQuiz(function.value, isFirstItem);
517 }
518 }
519 else
520 {
521 var presentedItem = items.SingleOrDefault(x => x == listOfTrigeredItems.Last());
522 bool isChoiceGood = false;
523
524 if (presentedItem != null)
525 {
526 if (items[0] == listOfTrigeredItems.Last() && listOfTrigeredItems.Count >= 2)
527 {
528 for (int i = 1; i < items.Count; i++)
529 {
530 if (items[i] == listOfTrigeredItems[^2])
531 {
532 isChoiceGood = true;
533 var stepId = stepItem.nextSteps[i - 1];
534 var nextStep = _stepsData.GetStepItem(stepId);
535 StartStep_Function(nextStep);
536 }
537 }
538 }
539 }
540
541 if (!isChoiceGood && items[0] == listOfTrigeredItems.Last())
542 {
543 if (stepItem.voiceOverIDWrongAction != string.Empty)
544 {
545 PlayVoiceOver(stepItem.voiceOverIDWrongAction);
546 }
547 }
548 else if (!isChoiceGood && presentedItem != null && function.value != String.Empty)
549 {
550 var voiceOvers = function.value.Split(new char[] { '#' });
551
552 if (voiceOvers.Length < items.Count)
553 {
554 Debug.Log("You don't have enough parameters, the first one will be used for all!");
555 }
556
557 for (int i = 0; i < items.Count; i++)
558 {
559 if (items[i] == listOfTrigeredItems.Last())
560 {
561 PlayVoiceOver(voiceOvers[i]);
562 }
563 }
564 }
565
566 if (item == ItemsEnum.SKIP_STEP)
567 {
568 var stepId = stepItem.nextSteps[0];
569 var nextStep = _stepsData.GetStepItem(stepId);
570 StartStep_Function(nextStep);
571 }
572 }
573 }
574
575 private void PlayVoiceOver(string idVo)
576 {
577 var voiceOverData = _audioService.GetOverOverData(idVo);
578 var guideModeState = StatesService.GetState<GuideModeState>();
579
580 if (!guideModeState.IsModeActive)
581 {
582 if (!voiceOverData.isGuided)
583 {
585 }
586 }
587 else
588 {
589 EventBetter.Raise(
590 new GuideVoiceOverPlayEvent()
591 {
592 VoiceOverName = idVo
593 }
594 );
595
597 }
598 }
599
600 private void PlayVoiceOverOnceTime(string idVo)
601 {
602 var voiceOverData = _audioService.GetOverOverData(idVo);
603 var guideModeState = StatesService.GetState<GuideModeState>();
604
605 if (!guideModeState.IsModeActive)
606 {
607 if (!voiceOverData.isGuided)
608 {
611 _audioService.OnceTimeAudioStopped += AudioServiceOnOnceTimeAudioStopped;
612 }
613 }
614 else
615 {
616 EventBetter.Raise(
617 new GuideVoiceOverPlayEvent()
618 {
619 VoiceOverName = idVo
620 }
621 );
624 if (!guideModeState.IsSoundEnabled)
625 {
627 }
628
629 _audioService.OnceTimeAudioStopped += AudioServiceOnOnceTimeAudioStopped;
630 }
631 }
632
633 private void AudioServiceOnOnceTimeAudioStopped(string voID)
634 {
635 var guideModeState = StatesService.GetState<GuideModeState>();
636
637 PlayVoiceOver(voID);
638 if (!guideModeState.IsSoundEnabled)
639 {
641 }
642 _audioService.OnceTimeAudioStopped -= AudioServiceOnOnceTimeAudioStopped;
644 }
645
646 public void SetActionResultInQuiz(string quizID, bool isActionCorrect)
647 {
648 var currentQuiz = _quizData.GetQuizItem(quizID);
649
650 if (currentQuiz != null)
651 {
652 var question = currentQuiz.Questions[0];
653
654 if (question.GetSelectedAnswer() != String.Empty) return;
655
656 var correctAns = question.OptionsAnswers[question.CorrectAnswerID_IfNotBroken[0]];
657 question.SetCorrectAnswer(correctAns);
658
659 if (isActionCorrect)
660 {
661 question.SetSelectedAnswer(correctAns);
662 }
663 else
664 {
665 var inCorrectAns = question.OptionsAnswers[question.CorrectAnswerID_Broken[0]];
666 question.SetSelectedAnswer(inCorrectAns);
668 }
669 }
670
671 public void UpdateDebugUI()
672 {
675 _currentFunctionText.SetText(_currentFunctionID.ToString());
676 }
677
678 [ContextMenu("CheckAvailabilityItemsFromScenario")]
679 public void CheckAvailability()
680 {
681 foreach (var step in _stepsData.listOfSteps)
682 {
683 foreach (var function in step.item.functionsStep)
684 {
685 foreach (var item in function.itemsForAction)
686 {
687 if (!dictionaryOfItems.ContainsKey(item))
688 {
689 Debug.Log("Item: " + (int)item + " " + item.ToString() + " - not registered!");
690 }
691 }
693 }
694 }
695 }
696}
void AddBreakdownsInfo(StepFunction function)
void SetQuizData(QuizData data)
void ShowErrorMessage(string text)
Main logic for playing fxs and voice overs.
void PauseRepeatable()
Pause currently playing repeatable voice over and save its state Stop currently playing repeatable an...
void StopRepeatable()
Stop currently playing repeatable voice over and remove its state Used for hard manual stop without n...
void InitCurrentVoiceOverdata(VoiceOverData voData)
Init current voiceover data.
void MuteRepeatableSound()
Mute repeatable sound volume.
void StopOnceTimeTemporarily()
Stop currently playing voice over.
void PlayOnceTime(string voiceOverName)
Play once time by voice over name.
void PlayRepeatable(string voiceOverName)
Play voice repeating it at a certain time intervals.
VoiceOverInfo GetOverOverData(string voiceOverName)
Get voice over data Info by name If VO data is missing from the data, it will return an error.
Data that stores all information about voice overs.
Intentionally made partial, in case you want to extend it easily.
Unity components communication service.
Interactive (true) method call and highlight on objects function.
Interactive (true) method call and highlight on objects function (when a laser pointer is pointed at ...
Interactive (true) method call on interactable objects function Often this is used to enable the abil...
Interactive (false) method call and highlight off interactable objects function.
Next function execution delay in seconds function.
Definition Delay.cs:13
Function of generating a random breakdown for an object with a certain probability.
Function is used to wait for the player to interact with the object.
Highlight on objects function.
Highlight an object when the pointer is on it or when the hand is close to it This is often used to i...
s Base class for interactable objects with which the step manager interacts. It also stores a set of ...
InteractableClass InteractableClass
Function of showing the inspection report for the current interactable object.
Quiz GetQuizItem(string quizID="")
Definition QuizData.cs:16
List< QuestionInformation > Questions
Definition QuizData.cs:40
Function of returning an object to its initial state.
Change general fxs volume function.
Function of cyclically launching the method after some time specified in the steplist.
Definition SetTimer.cs:12
Change general voice overs volume functions.
Show model method call.
Definition ShowModel.cs:10
Function of playing the animation and waiting for it to complete.
Function of playing the reverse animation and waiting for it to complete.
Logic for saving and unloading states during project execution.
Function function
[SerializeField]
[Serializable]
Definition StepItem.cs:12
List< StepFunction > functionsStep
Definition StepItem.cs:14
Main system for working with steps lists.
void OnJoinSessionFailed(FailureResponse failureResponse)
InteractableClass GetGameObjectByID(ItemsEnum itemId)
Get scene object by item id.
void ExecuteFunction(IStep step, StepItem stepItem, StepFunction function)
Runs a function and waits for its execution to complete, then moves on to the next one.
TMP_Text _currentFunctionText
[SerializeField]
void SetActionResultInQuiz(string quizID, bool isActionCorrect)
void PlayVoiceOverOnceTime(string idVo)
Action< string, int > StepInformationUpdated
Dictionary< ItemsEnum, InteractableClass > GetDictionary()
TMP_Text _currentStepText
[SerializeField]
void AudioServiceOnOnceTimeAudioStopped(string voID)
void PlayVoiceOver(string idVo)
void RegisterItems(ItemsEnum item, InteractableClass interactableClass)
readonly Dictionary< ItemsEnum, InteractableClass > dictionaryOfItems
void GoToStep(string stepId)
string _currentStepID
[SerializeField]
StepsDataSO _stepsData
[SerializeField]
IEnumerator PreparingForStart()
IEnumerator StartStep_FunctionEnumerator(StepItem stepItem)
void RegisterTriggeredItems(ItemsEnum item)
Save self-registering interactable objects.
void OnJoinSessionSuccess(HttpResponseMessage httpResponseMessage)
void StartFunction(StepItem stepItem)
void StartStep_Function(StepItem stepItem)
BreakdownDebug _breakdownDebug
[SerializeField]
readonly List< ItemsEnum > listOfTrigeredItems
int _currentFunctionID
[SerializeField]
ErrorMessagePopup _errorMessagePopup
AudioService _audioService
ScenarioState _scenarioState
StepItem GetStepItem(string stepID="")
List< StepItemSO > listOfSteps
Stop function of cyclically launching the method after some time specified in the steplist.
Definition StopTimer.cs:12
Function of waiting for the player to teleport to a position.
TurnOnOFF (false) method call and highlight off on interactable objects function.
TurnOnOff (Off) method call function.
TurnOnOff (On) method call function. This is often used to include the initial state of an object.
Basic interface of functions. (Please note that iStep is a wrong name)
Definition IStep.cs:10
ItemsEnum
Represents a list of ID for interactable objects.
Definition ItemsEnum.cs:11
Function
A list of functions ID that are used by the step manager to call specific methods.
Definition Function.cs:13