OLD_STEP_LIST_EDITOR
Documentation for the Unity C# Library
Loading...
Searching...
No Matches
SimpleInteractable.cs
Go to the documentation of this file.
1
using
System;
2
using
System.Collections;
3
using
System.Collections.Generic;
4
using
UnityEngine;
5
6
namespace
PixoVR.Event
7
{
8
public
class
SimpleInteractable
:
InteractableClass
9
{
10
[ContextMenu(
"light ON"
)]
11
private
void
lightOn
()
12
{
13
Interactive
(
true
);
14
}
15
16
[ContextMenu(
"light OFF"
)]
17
private
void
lightOFF
()
18
{
19
Interactive
(
false
);
20
}
21
22
private
void
Awake
()
23
{
24
if
(
correctModels
.Length < 2)
25
{
26
Debug.LogError(
"simple one model"
,
this
);
27
}
28
29
Interactive
(
false
);
30
}
31
32
public
override
void
Interactive
(
bool
state)
33
{
34
if
(state)
35
{
36
if
(
IsBroken
)
37
correctModels
[1].SetActive(state);
38
else
39
{
40
correctModels
[0].SetActive(state);
41
}
42
}
43
else
44
{
45
foreach
(var item
in
correctModels
)
46
{
47
item.SetActive(
false
);
48
}
49
}
50
}
51
}
52
}
PixoVR.Event.InteractableClass
s Base class for interactable objects with which the step manager interacts. It also stores a set of ...
Definition
InteractableClass.cs:18
PixoVR.Event.InteractableClass.correctModels
GameObject[] correctModels
[SerializeField]
Definition
InteractableClass.cs:28
PixoVR.Event.InteractableClass.IsBroken
bool IsBroken
Definition
InteractableClass.cs:21
PixoVR.Event.SimpleInteractable
Definition
SimpleInteractable.cs:9
PixoVR.Event.SimpleInteractable.Interactive
override void Interactive(bool state)
Definition
SimpleInteractable.cs:32
PixoVR.Event.SimpleInteractable.lightOFF
void lightOFF()
Definition
SimpleInteractable.cs:17
PixoVR.Event.SimpleInteractable.lightOn
void lightOn()
Definition
SimpleInteractable.cs:11
PixoVR.Event.SimpleInteractable.Awake
void Awake()
Definition
SimpleInteractable.cs:22
PixoVR.Event
Definition
ItemIDAttribute.cs:5
com.pixovr.eventunitysdk
Runtime
Sdk
Scripts
SimpleInteractable.cs
Generated
Wed Oct 9 2024 19:24:03
by Doxygen version
1.10.0