Documentation for the Unity C# Library
Loading...
Searching...
No Matches
RegisterItem.cs
Go to the documentation of this file.
1using System;
2using PixoVR.Core;
3using UnityEngine;
4
5namespace PixoVR.Event
6{
10 public class RegisterItem : MonoBehaviour
11 {
14
15 private void Start()
16 {
17 if (interactableClassItem == null)
18 {
19 interactableClassItem = GetComponent<InteractableClass>();
20 }
21
23 {
24 EventBetter.Listen(this, (WaitStepManager msg) => { Register(); });
25 }
26 else
27 {
28 Register();
29 }
30 }
31
32 private void Register()
33 {
35 if (ItemId >= 0)
36 {
38 }
39
40 foreach (var item in interactableClassItem.StepsId)
41 {
42 if (item != ItemId)
43 {
45 }
46 }
47 }
48
50 {
51 if ((int)itemId<0)
52 {
53 return;
54 }
55
57 {
58 Item = itemId,
60 });
61 }
62 }
63
64 [Serializable]
65 public class ItemInformation
66 {
67 public ItemsEnum Item;
69 }
70
71 [Serializable]
72 public class WaitStepManager
73 {
74 public bool IsStart;
75 }
76}
Intentionally made partial, in case you want to extend it easily.
s Base class for interactable objects with which the step manager interacts. It also stores a set of ...
InteractableClass InteractableClass
Interactable object self-registration in step manager logic.
InteractableClass interactableClassItem
void Register(ItemsEnum itemId, InteractableClass interactableClassItem)
Main system for working with steps lists.
ItemsEnum
Represents a list of ID for interactable objects.
Definition ItemsEnum.cs:11