Documentation for the Unity C# Library
Loading...
Searching...
No Matches
StartReverseAnimation.cs
Go to the documentation of this file.
1using System;
2using System.Collections.Generic;
3using PixoVR.Core;
4using UnityEngine;
5
6namespace PixoVR.Event
7{
12 {
13 public event Action OnFunctionFinished;
14
15 public void StartStep(StepItem stepItem, StepFunction function, List<InteractableClass> interactables = null, Action onStepSkipped = null)
16 {
17 Debug.Log("StartReverseAnimation : IStep");
18
19 if (interactables != null)
20 {
21 foreach (var item in interactables)
22 {
23 item.PlayForwardAnimation(false, FunctionFinished);
24 }
25 }
26 }
27
28 public void FunctionFinished()
29 {
30 OnFunctionFinished?.Invoke();
31 }
32 }
33}
Function of playing the reverse 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