Documentation for the Unity C# Library
Loading...
Searching...
No Matches
ActivateAndHighlight.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using UnityEngine;
4
5namespace PixoVR.Event
6{
11 {
12 public event Action OnFunctionFinished;
13
21 public void StartStep(
22 StepItem stepItem,
23 StepFunction function,
24 List<InteractableClass> interactables,
25 Action onStepSkipped = null
26 )
27 {
28 Debug.Log("ActivateAndHighlight : IStep");
29
30 if (interactables != null)
31 {
32 foreach (var item in interactables)
33 {
34 item.Interactive(true);
35
36 item.Highlight(true);
37 }
38 }
39
41 }
42
43 public void FunctionFinished()
44 {
45 OnFunctionFinished?.Invoke();
46 }
47 }
48}
Interactive (true) method call and highlight on objects function.
void FunctionFinished()
Called to end current step and start a next one.
void StartStep(StepItem stepItem, StepFunction function, List< InteractableClass > interactables, Action onStepSkipped=null)
Activate grab posibility and highlight interactable objects.
[Serializable]
Definition StepItem.cs:12
Basic interface of functions. (Please note that iStep is a wrong name)
Definition IStep.cs:10