Documentation for the Unity C# Library
Loading...
Searching...
No Matches
TeleportToPosition.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, Action onStepSkipped = null)
16 {
17 Debug.Log("TeleportToPosition : IStep Teleport to " + function.itemsForAction[0]);
18
19 interactables?[0].ActivateSetCallback(FunctionFinished);
20 // FunctionFinished();
21 }
22
23 public void FunctionFinished()
24 {
25 OnFunctionFinished?.Invoke();
26 }
27 }
28}
[Serializable]
Definition StepItem.cs:12
Function of waiting for the player to teleport to a position.
void FunctionFinished()
Called to end current step and start a next one.
void StartStep(StepItem stepItem, StepFunction function, List< InteractableClass > interactables, Action onStepSkipped=null)
Basic interface of functions. (Please note that iStep is a wrong name)
Definition IStep.cs:10