public override void Intialize(GuideSequence guideSequence, int index) { base.Intialize(guideSequence, index); _torquable = GetComponent <Torquable>(); _torquable.enabled = false; _torquable.TorqueCompleted.AddListener(Torqued); if (_torquable.TorquableBy.Count > 0) { _torquable.TorquableBy[0].MovementInteraction.Events.ButtonDown.AddListener(ButtonDown); _torquable.TorquableBy[0].MovementInteraction.Events.ButtonUp.AddListener(ButtonUp); if (null != _highlightMaterial) { _highlightMaterial = new Material(_highlightMaterial); _toolMeshFilters = _torquable.TorquableBy[0].MovementInteraction.GetComponentsInChildren <MeshFilter>(); } } if (null != _toolGuideVisual) { _toolGuideVisual.gameObject.SetActive(false); } if (null != _torqueGuideVisual) { _torqueGuideVisual.gameObject.SetActive(false); } Debug.Log(name + " " + _torqueGuideVisual); }
public override void Intialize(GuideSequence guideSequence, int index) { base.Intialize(guideSequence, index); _attachable = GetComponent <Attachable>(); _attachable.Events.Attached.AddListener(Attached); _attachable.Events.Entered.AddListener(Entered); _attachable.MovementInteraction.Events.ButtonDown.AddListener(ButtonDown); _attachable.MovementInteraction.Events.ButtonUp.AddListener(ButtonUp); _renderers = _attachable.ParentTransform.GetComponentsInChildren <MeshRenderer>(); if (null != _guideVisual) { _guideVisual.gameObject.SetActive(false); } foreach (AttachableHolder attachableHolder in _attachable.CanAttachTo) { attachableHolder.enabled = false; } if (null != _highlightMaterial) { _highlightMaterial = new Material(_highlightMaterial); _meshFilters = _attachable.MovementInteraction.GetComponentsInChildren <MeshFilter>(); } }
public override void DrawDizmoFromSequence(GuideSequence sequence, int index) { #if UNITY_EDITOR GUIStyle style = new GUIStyle(); style.normal.textColor = Color.magenta; style.fontSize = 18; UnityEditor.Handles.Label(transform.position, index.ToString(), style); #endif Gizmos.color = Color.magenta / 2; Gizmos.DrawLine(sequence.transform.position, transform.position); }
public override void DrawDizmoFromSequence(GuideSequence sequence, int index) { const float offset = .05f; #if UNITY_EDITOR GUIStyle style = new GUIStyle(); style.normal.textColor = Color.blue; style.fontSize = 18; UnityEditor.Handles.Label(transform.position + new Vector3(0, offset, 0), index.ToString(), style); #endif Gizmos.color = Color.blue / 2; Gizmos.DrawLine(sequence.transform.position, transform.position + new Vector3(0, offset, 0)); }
public virtual void DrawDizmoFromSequence(GuideSequence sequence, int index) { }
public virtual void Intialize(GuideSequence guideSequence, int index) { // _analytics.Add("attachment_speed", Random.Range(0f, 5f)); // _analytics.Add("attachment_accuracy", Random.Range(0f, 5f)); // _analytics.Add("drops", Random.Range(0f, 5f)); }