Documentation for the Unity C# Library
Loading...
Searching...
No Matches
StartPlayAnimation.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using PixoVR.Core;
4using PixoVR.Event;
5using UnityEngine;
6
7namespace PixoVR.Event
8{
13 {
14 public event Action OnFunctionFinished;
15
16 public void StartStep(StepItem stepItem, StepFunction function, List<InteractableClass> interactables = null, Action onStepSkipped = null)
17 {
18 Debug.Log("StartPlayAnimation : IStep");
19
20 if (interactables != null)
21 {
22 foreach (var item in interactables)
23 {
24 item.PlayForwardAnimation(true, FunctionFinished);
25 }
26 }
27 }
28
29 public void FunctionFinished()
30 {
31 OnFunctionFinished?.Invoke();
32 }
33 }
34}
Function of playing the animation and waiting for it to complete.
void StartStep(StepItem stepItem, StepFunction function, List< InteractableClass > interactables=null, Action onStepSkipped=null)
void FunctionFinished()
Called to end current step and start a next one.
[Serializable]
Definition StepItem.cs:12
Basic interface of functions. (Please note that iStep is a wrong name)
Definition IStep.cs:10