public override void Enter() { myContext = (AppFlowContext)context; UIDesktopManager.EventRetryRegistration += RetryRegistration; UIDesktopManager.EventGoToExercise += GoToExercise; UIDesktopManager.I.ActiveRegistrationExercisePanel(); senderToCreate = GameObject.FindObjectOfType <SenderExerciseAI>(); senderToCreate.shoulder = myContext.trackerManager.trackerListReady[0].reference; senderToCreate.elbow = myContext.trackerManager.trackerListReady[1].reference; senderToCreate.hand = myContext.trackerManager.trackerListReady[2].reference; SampleRecorder sampleRecordGhost = GameObject.FindObjectOfType <SampleRecorder>(); sampleRecordGhost.trackersTransform = new List <Transform>(); sampleRecordGhost.trackersTransform.Add(myContext.trackerManager.trackerListReady[0].reference.transform); sampleRecordGhost.trackersTransform.Add(myContext.trackerManager.trackerListReady[1].reference.transform); sampleRecordGhost.trackersTransform.Add(myContext.trackerManager.trackerListReady[2].reference.transform); base.Enter(); AddConnectionParts limbsConnected = GameObject.FindObjectOfType <AddConnectionParts>(); limbsConnected.partsOfBody = myContext.currentBodyPart.LimbPart; limbsConnected.PrepareConnections(); }
private void OnEnable() { if (hand == null) { hand = this.GetComponent <Hand>(); } recorder = FindObjectOfType <SenderExerciseAI>(); if (recordAction == null) { Debug.LogError("No action assigned"); return; } recordAction.AddOnChangeListener(OnTriggerActionChange, hand.handType); }