2using System.Collections;
3using System.Collections.Generic;
4using System.Globalization;
6using System.Runtime.Serialization;
8using JetBrains.Annotations;
9using NaughtyAttributes;
16using Valve.VR.InteractionSystem;
25 internal Vector3 fixedOriginalPosition, fixedOriginalRotation, fixedTargetRotation, fixedTargetPosition;
27 internal float tolerance = 0.05f;
28 internal bool activated;
29 internal bool forceno =
false;
31 private bool triggerOnce =
true;
33 private bool deactivated;
34 private bool jobsDone;
35 private Coroutine mouseOver, mouseOver2;
37 internal GameObject cachedGO;
43 internal bool HasHighlight =
false;
44 internal bool HasSelectedHighlight =
false;
47 public Dropdown dropDown;
48 public GameObject selectButton;
49 internal bool isLocal =
false;
50 private GameObject canvasSelector;
51 public string canvasSelectorName =
"Canvas_selector";
52 private GameObject canvasHierarchy;
53 private GameObject canvas;
54 public string selectedHash =
"";
55 private Transform originalParent;
56 [SerializeField]
internal GameObject selectedGO;
59 private GameObject handPrefab, leftHandPrefab;
60 private GameObject handInstance;
61 private GameObject objectToGrab;
62 private Transform attachPoint;
63 private bool editingLeft =
false;
64 private List<GameObject> modifiedCollisions =
new List<GameObject>();
65 private List<Collider> modifiedColliders =
new List<Collider>();
66 [SerializeField]
internal bool oneHanded =
true;
70 private Vector3[] origOHvalues;
71 private bool ogSaved =
false;
88 objectAction.IfTrigger(
id);
91 if (!cachedGO) cachedGO = GetInputGO();
92 fixedOriginalPosition = cachedGO.transform.position;
93 fixedOriginalRotation = cachedGO.transform.eulerAngles;
94 if (cachedGO && oneHanded)
98 if (cachedGO && !oneHanded)
102 if (cachedGO) SetAsIntaractable();
109 if (tcd.IsAttachedToHand())
116 if (useObjectPositioning)
118 originalParent = cachedGO.transform.parent;
120 if (selectedLocalGo) SetSelectedAsIntaractable();
126 tcdLocal.enabled =
true;
134 origOHvalues =
new[] { oh.
Offset, oh.Rotation, oh.LeftOffset, oh.LeftRotation };
138 oh.LeftRotation = lr;
145 StartCoroutine(ShowHighLightCurrent());
147 if (useObjectPositioning) StartCoroutine(ShowHighLightSelectedCurrent());
162 private new void OnDestroy()
175 private void SetAsIntaractable()
177 var isStatic = cachedGO.GetComponent<
StaticGO>();
178 var isImage = cachedGO.GetComponent<RawImage>();
179 var hasRigidbody = cachedGO.GetComponent<Rigidbody>();
180 var hasOffsetter = cachedGO.GetComponent<
OffsetHolder>();
182 var hasInteractable = cachedGO.GetComponent<Interactable>();
186 if (isStatic) Destroy(isStatic);
188 if (!hasRigidbody) cachedGO.AddComponent<Rigidbody>().isKinematic =
true;
189 if (!hasOffsetter) cachedGO.AddComponent<
OffsetHolder>();
192 if (!hasInteractable) cachedGO.AddComponent<Interactable>();
196 if (isImage) cachedGO.AddComponent<BoxCollider>();
202 private void SetSelectedAsIntaractable()
204 var isStatic = selectedLocalGo.GetComponent<
StaticGO>();
205 var isImage = selectedLocalGo.GetComponent<RawImage>();
206 var hasRigidbody = selectedLocalGo.GetComponent<Rigidbody>();
207 var hasOffsetter = selectedLocalGo.GetComponent<
OffsetHolder>();
209 var hasInteractable = selectedLocalGo.GetComponent<Interactable>();
213 if (isStatic) Destroy(isStatic);
215 if (!hasRigidbody) selectedLocalGo.AddComponent<Rigidbody>().isKinematic =
true;
216 if (!hasOffsetter) selectedLocalGo.AddComponent<
OffsetHolder>();
219 if (!hasInteractable) selectedLocalGo.AddComponent<Interactable>();
223 if (isImage) selectedLocalGo.AddComponent<BoxCollider>();
228 void EnterOffsetEditor()
230 if (handPrefab ==
null)
232 Debug.Log(
"couldn't find glove, offset editor cannot be entered");
237 if (objectToGrab ==
null)
239 Debug.Log(
"no selected object, offset editor cannot be entered");
243 Vector3 scale = objectToGrab.transform.localScale;
244 if (scale.x == 0f || scale.y == 0f || scale.z == 0f)
246 Debug.Log(
"object has at least one scale component set to 0, offset editor cannot be entered");
250 offsetHolder = objectToGrab.GetComponent<
OffsetHolder>();
251 StartCoroutine(SpawnHand());
253 IEnumerator SpawnHand(
bool left =
false)
257 handInstance = Instantiate(left ? leftHandPrefab : handPrefab,
Vector3.zero,
new Quaternion(),
null);
258 yield
return new WaitForEndOfFrame();
260 attachPoint = handInstance.transform.Find(
"AttachPoint");
261 attachPoint.transform.SetParent(
null,
true);
262 yield
return new WaitForEndOfFrame();
264 handInstance.transform.SetParent(attachPoint,
true);
265 yield
return new WaitForEndOfFrame();
267 attachPoint.transform.SetParent(objectToGrab.transform,
true);
268 yield
return new WaitForEndOfFrame();
270 attachPoint.transform.localPosition = left ? offsetHolder.
LeftOffset : offsetHolder.
Offset;
272 yield
return new WaitForEndOfFrame();
280 yield
return new WaitForEndOfFrame();
283 cachedGO.transform.parent);
293 foreach (var coll
in allCollider)
297 if (useObjectPositioning)
309 highlightObject.transform.SetParent(tcd.GetHand().currentAttachedObjectInfo.Value.originalParent.transform,
true);
319 yield
return new WaitForEndOfFrame();
321 if (useObjectPositioning)
344 yield
return new WaitForEndOfFrame();
347 selectedLocalGo.transform.parent);
357 foreach (var coll
in allCollider)
369 highlightSelected.transform.SetParent(tcd.GetHand().currentAttachedObjectInfo.Value.originalParent.transform,
true);
379 yield
return new WaitForEndOfFrame();
383 HasSelectedHighlight =
true;
392 yield
return new WaitForEndOfFrame();
394 fixedTargetRotation = cachedGO.transform.parent.eulerAngles +
targetRotation;
396 highlightObject = Instantiate(cachedGO, fixedTargetPosition, Quaternion.Euler(fixedTargetRotation),
397 cachedGO.transform.parent);
408 foreach (var coll
in allCollider)
419 yield
return new WaitForEndOfFrame();
421 if (useObjectPositioning)
428 highlightObject.transform.SetPositionAndRotation(fixedTargetPosition, Quaternion.Euler(fixedTargetRotation));
437 private IEnumerator ShowHighLightCurrent()
439 if (!cachedGO) yield
break;
443 yield
return new WaitForEndOfFrame();
445 if (cachedGO.GetComponent<RawImage>())
447 var outline = cachedGO.AddComponent<Outline>();
448 outline.effectDistance =
new Vector2(0.05f, 0.05f);
449 outline.effectColor =
Color.cyan;
467 foreach (var coll
in allCollider)
485 objectToGrab = cachedGO;
497 private IEnumerator ShowHighLightSelectedCurrent()
499 if (!selectedLocalGo) yield
break;
503 yield
return new WaitForEndOfFrame();
505 if (selectedLocalGo.GetComponent<RawImage>())
507 var outline = selectedLocalGo.AddComponent<Outline>();
508 outline.effectDistance =
new Vector2(0.05f, 0.05f);
509 outline.effectColor =
Color.cyan;
527 foreach (var coll
in allCollider)
532 yield
return new WaitForEndOfFrame();
545 objectToGrab = cachedGO;
546 HasSelectedHighlight =
true;
564 yield
return new WaitForEndOfFrame();
578 foreach (var coll
in allCollider)
583 yield
return new WaitForEndOfFrame();
599 yield
return new WaitForEndOfFrame();
600 if (fixedOriginalPosition ==
null)
609 highlightObjectOriginal = Instantiate(cachedGO, fixedOriginalPosition, Quaternion.Euler(fixedOriginalRotation),
610 cachedGO.transform.parent);
624 foreach (var coll
in allCollider)
628 if (useObjectPositioning)
634 yield
return new WaitForEndOfFrame();
636 if (fixedOriginalPosition ==
null)
644 highlightObjectOriginal.transform.SetPositionAndRotation(fixedOriginalPosition, Quaternion.Euler(fixedOriginalRotation));
657 HasHighlight =
false;
659 SetupCollisions(
true);
660 SetupCollisionsV2(
true);
671 private void MatChange(GameObject go,
bool changeMat =
false)
673 var mrs = go.GetComponentsInChildren<MeshRenderer>();
674 var image = go.GetComponent<RawImage>();
680 foreach (var meshRenderer
in mrs)
682 var list =
new List<Material>();
684 meshRenderer.materials = list.ToArray();
691 cachedGO = GetInputGO();
697 cachedGO = GetInputGO();
702 if (useObjectPositioning)
704 if (originalParent) cachedGO.transform.SetParent(originalParent,
true);
716 cachedGO = GetInputGO();
721 if (useObjectPositioning)
723 originalParent = cachedGO.transform.parent;
725 cachedGO.transform.SetParent(selectedLocalGo.transform,
true);
742 handPrefab = Resources.Load(
"OffsetEditorHandAnim") as GameObject;
743 leftHandPrefab = Resources.Load(
"OffsetEditorLeftHand") as GameObject;
747 if (!cachedGO) cachedGO = GetInputGO();
774 StopCoroutine(mouseOver);
775 StopCoroutine(mouseOver2);
784 StopCoroutine(mouseOver);
795 if (!cachedGO) cachedGO = GetInputGO();
796 if (!cachedGO)
return;
798 posInputs[0].text = cachedGO.transform.localPosition[0].ToString(
"F5");
799 posInputs[1].text = cachedGO.transform.localPosition[1].ToString(
"F5");
800 posInputs[2].text = cachedGO.transform.localPosition[2].ToString(
"F5");
803 rotInputs[0].text = cachedGO.transform.localEulerAngles[0].ToString(
"F3");
804 rotInputs[1].text = cachedGO.transform.localEulerAngles[1].ToString(
"F3");
805 rotInputs[2].text = cachedGO.transform.localEulerAngles[2].ToString(
"F3");
812 internal bool useObjectPositioning =
false;
813 private GameObject selectedLocalGo;
814 internal string selectedLocalHash;
819 if (!cachedGO) cachedGO = GetInputGO();
820 if (!cachedGO)
return;
823 selectedLocalGo = go;
827 useObjectPositioning =
false;
828 selectedLocalHash =
"";
829 Debug.Log(
"clearing useObjectPositioning flag");
833 selectedLocalHash = go.GetComponent<
HashHolder>().Hash;
835 StartCoroutine(SlowLocalPosSave(go));
836 useObjectPositioning =
true;
840 private IEnumerator SlowLocalPosSave(GameObject go)
842 var originalParent = cachedGO.transform.parent;
843 cachedGO.transform.SetParent(go.transform,
true);
845 localpos = cachedGO.transform.localPosition;
848 localrot = cachedGO.transform.localEulerAngles;
854 cachedGO.transform.SetParent(originalParent,
true);
858 private void SetObjectToPosition()
860 if (!cachedGO) cachedGO = GetInputGO();
861 if (!cachedGO)
return;
865 var originalParent = go.transform.parent;
867 go.transform.SetParent(cachedGO.transform,
true);
869 go.transform.localPosition =
localpos;
870 go.transform.LookAt(go.transform.position +
fwdoffset * 1000, go.transform.position +
upoffset * 1000);
872 go.transform.SetParent(originalParent,
true);
881 var ci = CultureInfo.CurrentCulture;
882 var nfi = ci.NumberFormat;
885 var single = Convert.ToSingle(
posInputs[0].text, ci);
886 posInputs[0].text = single.ToString(
"F3");
892 single = Convert.ToSingle(
posInputs[1].text, ci);
893 posInputs[1].text = single.ToString(
"F3");
899 single = Convert.ToSingle(
posInputs[2].text, ci);
900 posInputs[2].text = single.ToString(
"F3");
906 Debug.LogWarning(
"not parsable number(?) in Position inputfields!");
930 var ci = CultureInfo.CurrentCulture;
931 var nfi = ci.NumberFormat;
934 var single = Convert.ToSingle(
rotInputs[0].text, ci);
935 rotInputs[0].text = single.ToString(
"F0");
941 single = Convert.ToSingle(
rotInputs[1].text, ci);
942 rotInputs[1].text = single.ToString(
"F0");
948 single = Convert.ToSingle(
rotInputs[2].text, ci);
949 rotInputs[2].text = single.ToString(
"F0");
954 Debug.LogWarning(
"not parsable number(?) in Position inputfields!");
993 var ci = CultureInfo.CurrentCulture;
994 var nfi = ci.NumberFormat;
1003 Debug.LogWarning(
"not parsable number(?) in Tolerance inputfields!");
1014 var ci = CultureInfo.CurrentCulture;
1015 var nfi = ci.NumberFormat;
1021 taktTime =
float.Parse(value, ci);
1025 Debug.LogWarning(
"not parsable number(?) in holdTime inputfield!");
1032 public void onDropDownChanged(
int value)
1038 selectButton.SetActive(
false);
1043 selectButton.SetActive(
true);
1054 public void TriggerSelection()
1056 if (!canvasSelector)
1057 canvasSelector = GameObject.Find(canvasSelectorName);
1059 if (!canvasSelector)
1061 Debug.LogError(canvasSelectorName +
" not found!");
1065 GetComponentInParent<Canvas>().enabled =
false;
1066 canvasSelector.transform.GetChild(0).GetComponent<
Button>().onClick.AddListener(SetSelectedGO);
1067 canvasSelector.transform.GetChild(1).GetComponent<
Button>().onClick.AddListener(CancelSelection);
1068 canvasSelector.GetComponent<Canvas>().enabled =
true;
1071 canvas = GameObject.Find(
"Canvas");
1074 Debug.LogError(
"canvas not found!");
1078 canvasHierarchy = GameObject.Find(
"Hierarchy");
1079 if (canvasHierarchy ==
null)
1081 Debug.LogError(
"Hierarchy not found!");
1085 canvasHierarchy.transform.SetParent(canvasSelector.transform,
false);
1088 public void SetSelectedGO()
1091 canvasSelector.GetComponent<Canvas>().enabled =
false;
1092 GetComponentInParent<Canvas>().enabled =
true;
1093 canvasSelector.transform.GetChild(0).GetComponent<
Button>().onClick.RemoveListener(SetSelectedGO);
1094 canvasSelector.transform.GetChild(1).GetComponent<
Button>().onClick.RemoveListener(CancelSelection);
1100 canvasHierarchy.transform.SetParent(canvas.transform,
false);
1103 public void CancelSelection()
1105 canvasSelector.GetComponent<Canvas>().enabled =
false;
1106 GetComponentInParent<Canvas>().enabled =
true;
1107 canvasSelector.transform.GetChild(0).GetComponent<
Button>().onClick.RemoveListener(SetSelectedGO);
1108 canvasSelector.transform.GetChild(1).GetComponent<
Button>().onClick.RemoveListener(CancelSelection);
1114 canvasHierarchy.transform.SetParent(canvas.transform,
false);
1117 public IEnumerator SetGameObjectJob(
string hash)
1119 if (selectedHash ==
"")
1120 selectedHash = hash;
1122 yield
return new WaitForEndOfFrame();
1124 SetGameObject(hash);
1127 public void SetGameObject(
string hash)
1129 if (hash ==
"")
return;
1132 public void SetGameObject(GameObject go)
1140 var hh = t.GetComponentInParent<
HackedHand>();
1141 if (hh ==
null) {
return false; }
1143 if (!hh.currentAttachedObjectInfo.HasValue) {
Debug.LogError(
"currentAttachedObjectInfo has no value!");
return false; }
1144 if (!hh.currentAttachedObjectInfo.Value.originalParent) {
Debug.LogError(
"originalParent is NULL!");
return false; }
1149 if (useObjectPositioning)
1151 local = selectedLocalGo.transform.InverseTransformPoint(t.position);
1155 local = hh.currentAttachedObjectInfo.Value.originalParent.transform.InverseTransformPoint(t.position);
1157 float modifiedTolerance = 0;
1158 if (useObjectPositioning && selectedLocalGo) modifiedTolerance =
Math.Abs(tolerance / selectedLocalGo.transform.localScale.x);
1159 else modifiedTolerance =
Math.Abs(tolerance / cachedGO.transform.lossyScale.x);
1171 return Quaternion.Angle(t.localRotation, Quaternion.Euler(
targetRotation)) < 25;
1174 private void GetAllSameGOs()
1179 var allTcd = FindObjectsOfType<ThrowableCanDisable>();
1181 var retval =
new List<Transform>();
1183 foreach (var tcd
in allTcd)
1185 if (tcd.name != cachedGO.name)
1187 if (
Math.Abs(tcd.transform.localScale.x - cachedGO.transform.localScale.x) > 0.001f)
1189 if (
Math.Abs(tcd.transform.localScale.y - cachedGO.transform.localScale.y) > 0.001f)
1191 if (
Math.Abs(tcd.transform.localScale.z - cachedGO.transform.localScale.z) > 0.001f)
1194 retval.Add(tcd.transform);
1221 private void SetupCollisions(
bool remove =
false)
1223 if (modifiedCollisions ==
null)
1224 modifiedCollisions =
new List<GameObject>();
1229 modifiedCollisions.Clear();
1237 var renderer = tempobject.GetComponentInChildren<Renderer>();
1243 if (collisions !=
null)
1244 modifiedCollisions.AddRange(Array.ConvertAll(collisions, c => c.gameObject));
1247 Destroy(tempobject);
1249 private void SetupCollisionsV2(
bool remove =
false)
1253 if (modifiedColliders ==
null)
1254 modifiedColliders =
new List<Collider>();
1258 foreach (var coll
in modifiedColliders)
1261 coll.enabled =
true;
1263 modifiedCollisions.Clear();
1271 var renderer = tempobject.GetComponentInChildren<Renderer>();
1275 foreach (var coll
in collisions)
1277 coll.enabled =
false;
1278 modifiedColliders.Add(coll);
1282 Destroy(tempobject);
1292 if (!actionStarted)
return;
1294 if (base.isInFieldOfView(cachedGO)) base.actionRecognized =
true;
1296 if (!cachedGO) cachedGO = GetInputGO();
1297 if (!cachedGO || !activated || deactivated)
return;
1298 if (forceno)
return;
1299 var t = cachedGO.transform;
1302 chill -= Time.deltaTime;
1321 var hands = FindObjectsOfType<HackedHand>();
1322 foreach (var hand
in hands) hand.DetachObject(t.gameObject);
1332 bool onlyOther =
false;
1334 bool onlyOtherSelected =
false;
1335 if (useObjectPositioning)
1341 if (!tcdSelected.IsAttachedToHand()) onlyOtherSelected =
true;
1342 if (!onlyOtherSelected || HasSelectedHighlight)
1366 if (!tcd.IsAttachedToHand()) onlyOther =
true;
1367 if (onlyOther && !HasHighlight)
return;
1371 if (tcd.GetHand().currentAttachedObject == cachedGO || cachedGO.GetComponentInParent<
DobotGrabber>())
1377 if (useObjectPositioning)
1387 if (useObjectPositioning && onlyOtherSelected)
return;
1392 SetupCollisionsV2();
1420 #region Auto Rotation
1456 if (tcd && !o.GetComponent<
StaticGO>() && tcd.IsAttachedToHand())
1467 else if (!onlyOther)
1470 else if (HasHighlight)
1477 if (tcd && !o.GetComponent<
StaticGO>() && tcd.IsAttachedToHand())
1491 else if (tcd && !o.GetComponent<
StaticGO>())
1505 else if (!onlyOther)
1508 else if (!onlyOther)
1519 oh.
Offset = origOHvalues[0];
1520 oh.Rotation = origOHvalues[1];
1521 oh.LeftOffset = origOHvalues[2];
1522 oh.LeftRotation = origOHvalues[3];
1523 origOHvalues =
null;
1525 base.TriggerOutput(
id);
1528 private void EndCheck(Transform t)
1532 var useFlyin =
true;
1535 if (triggerOnce)
chill =
float.MaxValue;
1552 var hands = FindObjectsOfType<HackedHand>();
1553 foreach (var hand
in hands) hand.DetachObject(t.gameObject);
1555 var isStatic = t.GetComponent<
StaticGO>();
1556 var hasRigidbody = t.GetComponent<Rigidbody>();
1557 var hasInteractable = t.GetComponent<Interactable>();
1560 if (!isStatic) t.gameObject.AddComponent<
StaticGO>();
1562 if (hasThrowable) Destroy(hasThrowable);
1563 if (hasInteractable) Destroy(hasInteractable);
1566 hasRigidbody.isKinematic =
true;
1567 Destroy(hasRigidbody);
1572 StartCoroutine(FlyIn(t));
1594 private IEnumerator FlyIn(Transform t)
1597 if (useObjectPositioning)
1598 t.SetParent(selectedLocalGo.transform,
true);
1602 for (
float i = 0; i <= 1; i += 0.05f)
1613 objectAction.IfNotTrigger();
1618 public bool GetHandOffsets(out Vector3 offset, out Vector3 rotation, out Vector3 leftoffset, out Vector3 leftrotation)
1620 offset = Vector3.zero;
1621 rotation = Vector3.zero;
1622 leftoffset = Vector3.zero;
1623 leftrotation = Vector3.zero;
1624 if (gameObjectActionRefference ==
null)
return false;
1626 offset = gameObjectActionRefference.
Offset;
1627 rotation = gameObjectActionRefference.
Rotation;
1628 leftoffset = gameObjectActionRefference.
LeftOffset;
1629 leftrotation = gameObjectActionRefference.
LeftRotation;
1630 if (offset == Vector3.zero && rotation == Vector3.zero && leftoffset == Vector3.zero && leftrotation == Vector3.zero)
1639 internal GameObject GetInputGO()
1645 GameObject retval =
null;
1648 gameObjectActionRefference = objectAction;
1661 Debug.Log($
"Positioner requested: \"{retval}\"");
1667 tcd.enabled =
false;
1684 public override void GetObjectData(SerializationInfo info, StreamingContext context)
1686 base.GetObjectData(info, context);
1687 var convertOldSave =
false;
1689 info.AddValue(
"targetPosition",
targetPosition, typeof(Vector3));
1690 info.AddValue(
"targetRotation",
targetRotation, typeof(Vector3));
1691 if (tolerance == 0) tolerance = 0.05f;
1692 info.AddValue(
"tolerance", tolerance, typeof(
float));
1693 info.AddValue(
"taktTime", taktTime, typeof(
float));
1694 info.AddValue(
"useLocal", useObjectPositioning);
1695 if (useObjectPositioning)
1697 info.AddValue(
"localpos",
localpos);
1698 info.AddValue(
"localrot",
localrot);
1700 info.AddValue(
"upoffset",
upoffset);
1701 info.AddValue(
"selectedLocalHash", selectedLocalHash);
1703 info.AddValue(
"oneHand", oneHanded);
1705 info.AddValue(
"selectedGO", selectedGO, typeof(GameObject));
1706 info.AddValue(
"isLocal", isLocal, typeof(
bool));
1707 info.AddValue(
"selectedHash", selectedHash, typeof(
bool));
1711 public PositionAction(SerializationInfo info, StreamingContext context) : base(info, context)
1713 targetPosition = (Vector3)info.GetValue(
"targetPosition", typeof(Vector3));
1714 targetRotation = (Vector3)info.GetValue(
"targetRotation", typeof(Vector3));
1718 tolerance = (float)info.GetValue(
"tolerance", typeof(
float));
1725 foreach (var s
in info)
1727 if (s.Name ==
"useLocal")
1728 useObjectPositioning = info.GetBoolean(
"useLocal");
1730 if (s.Name ==
"localpos")
1731 localpos = (Vector3)info.GetValue(
"localpos", typeof(Vector3));
1733 if (s.Name ==
"localrot")
1734 localrot = (Vector3)info.GetValue(
"localrot", typeof(Vector3));
1736 if (s.Name ==
"fwdoffset")
1737 fwdoffset = (Vector3)info.GetValue(
"fwdoffset", typeof(Vector3));
1739 if (s.Name ==
"upoffset")
1740 upoffset = (Vector3)info.GetValue(
"upoffset", typeof(Vector3));
1742 if (s.Name ==
"selectedLocalHash")
1743 selectedLocalHash = info.GetString(
"selectedLocalHash");
1744 if (s.Name ==
"taktTime")
1745 taktTime = (float)info.GetValue(
"taktTime", typeof(
float));
1746 if (s.Name ==
"oneHand")
1747 oneHanded = info.GetBoolean(
"oneHand");
UnityEngine.UI.Button Button
List< GameObject > outPuts
Connection GetConnectionByEndPointId(string id)
ActionObject GetActionByInOut(string id)
static Controller Instance
void StartFollowing(Vector3 EndPosition, GameObject TargetObject)
static GameObject activeGameObject
GameObject GetGameObject()
void ResetLayer(GameObject[] gameobjects)
static HandCollisionManager instance
void SetLayer(GameObject[] gameobjects)
static HandInventory instance
bool IsInInventory(ThrowableCanDisable tcd)
static Bounds GetBounds(GameObject go)
static Collider[] CollidesWithWhat(Bounds bounds, bool skipHand=true)
static Vector3 LerpAngle(Vector3 from, Vector3 to, float t)
void FillCurrentTransform()
void onTaktTimeChanged(string value)
bool GetHandOffsets(out Vector3 offset, out Vector3 rotation, out Vector3 leftoffset, out Vector3 leftrotation)
bool InGoodRot(Transform t)
void RefreshTargetDisplay()
GameObject highlightObject
void RemoveSelectedHighlight()
override void OnPointerExit(PointerEventData eventData)
override void Deactivate()
InputField toleranceField
Object highlightCurrentObject
void onToleranceChanged(string value)
IEnumerator ShowHighLightOriginalOptimization()
override void Triggered(string id)
bool InGoodPos(Transform t)
IEnumerator ShowSelectedHighLight(ThrowableCanDisable tcd)
Material originalHighlightMat
List< Transform > allSame
override void GetObjectData(SerializationInfo info, StreamingContext context)
void onPosChanged(string value)
PositionAction(SerializationInfo info, StreamingContext context)
GameObject highlightObjectOriginal
IEnumerator ShowHighLightOriginal()
Material highlightMaterial
new void TriggerOutput(string id)
GameObject highlightSelected
void onRotChanged(string value)
IEnumerator ShowHighLightOptimization()
Object highlightCurrentSelectedObject
void SelectObjectToPosition()
override void InputAdded(string id)
override void OnPointerEnter(PointerEventData eventData)
void OneHandToggle(bool value)
IEnumerator ShowHighLight(ThrowableCanDisable tcd)
void hideHandPreview(GameObject objectToGrab)
void EnterOffsetEditor(GameObject objectToGrab, ActionObject action, Vector3 TargetPos, Vector3 TargetRot)
static PreviewHand Instance
static SoundManager instance