2using System.Collections;
3using System.Collections.Generic;
8using Random = UnityEngine.Random;
16 [RequireComponent(typeof(RegisterItem))]
27 [SerializeField]
private Outline
_outline;
54 public virtual void Active(
bool state)
90 Debug.LogWarning(
"Outline is not exist");
94 _outline.enabled = state;
102 outline.enabled = state;
119 Debug.LogWarning(
"Grabbable is not exist");
147 Debug.LogWarning(
"Grabbable is not exist");
205 model.SetActive(
false);
210 model.SetActive(
false);
255 new TriggeredItemEvent()
297 _distanceGrabbable.enabled = isEnabled;
320 item = ItemsEnum.NONE
334 Debug.LogWarning(
"Stopped previous timer manually");
359 yield
return new WaitForSeconds(timer);
UnityEngine.Random Random
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 ...
Coroutine _timerCoroutine
virtual void TurnOnOffState(bool turnOn)
Outline _outline
[SerializeField]
GameObject[] correctModels
[SerializeField]
GameObject[] brokenModels
[SerializeField]
virtual void PlayForwardAnimation(bool playForward, Action callback)
Used to play an animation and wait for it to finish.
virtual void OnTimerExpired()
virtual void ActivateSetCallback(Action callback)
Waiting for object activation.
virtual void GenerateBreakdown(int percentBroke)
Generate a breakdown on the object with a certain probability.
virtual void TurnOffWaitForSelection()
Disable waiting for object highlighting with a pointer or hand approach. Mainly used in eval fashion.
void StopTimer()
Stop loops and infinitely runs a method.
virtual void Execute()
Used to indicate to the step manager that some actions were performed on the object.
virtual void RepairElement()
Remove from the broken state object.
bool _waitingForSelection
virtual void Interactive(bool state)
IEnumerator StartTimer(float timer)
DistanceGrabbable _distanceGrabbable
[SerializeField]
virtual void SetInspected()
virtual void HideModel()
Disable parts of some object childs models. Useful for configuring object breakdowns.
virtual void OpenInspectionMenu(string quizId)
Enable inpection menu UI.
virtual void SetParametersForItem(string value, string[] additionalValues)
virtual void PrepareInspectionReport(List< InteractableClass > interactables)
virtual void Active(bool state)
void SetGrabEnabled(bool isEnabled)
Outline[] _additionalOutlines
[SerializeField]
virtual void Highlight(bool state)
Highlight an object.
void OnStopTargeting(Hand hand, Grabbable grabbable)
virtual void ShowModel()
Enable parts of some object childs models. Useful for configuring object breakdowns.
void SetTimer(float timer)
Loops and infinitely runs a method after some time in seconds.
virtual void CheckInspectionStatus()
void OnStartTargeting(Hand hand, Grabbable grabbable)
virtual void SetDefaultState()
Restoring the original state of an object after any actions with it.
virtual void WaitForSelection()
Highlight the object with a pointer or hand approach. Mainly used in evaluation mode.
ItemsEnum
Represents a list of ID for interactable objects.