void Start() { // Setup SM sm = gameObject.AddComponent <MyStateMachine>(); context = new AppFlowContext() { DebugText = DebugText, PatientSelectionDoneCallback = patientSelectionDone, DoneCallBack = goToNextState, TrackerWearDoneCallback = goToSetUpTracker, SetUpTrackerDoneCallback = goToRegistrationSample, RetryRegistrationCallback = goToRegistrationSample, RegistrationOkCallback = goToExerciseReady, FinishExerciseSameBdPartCallback = goToRegistrationSample, FinishExerciseDifferentBdPartCallback = goToChooseBodyParts, // ChooseBodyPartsDoneCallback = patientSelectionToDo, }; states = new List <IState>() { new PatientSelection().Setup(context), new ChooseBodyParts().Setup(context), new WearTracker().Setup(context), new SetUpTracker().Setup(context), new RegistrationSample().Setup(context), new ExerciseReady().Setup(context), new DoingExercise().Setup(context), new EndExercise().Setup(context), }; sm.Setup(context, states); patientSelectionToDo(); }
public override void Enter() { myContext = (AppFlowContext)context; base.Enter(); }
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(); }
public override void Enter() { myContext = (AppFlowContext)context; base.Enter(); UIDesktopManager.EventSetUpTrackers += SetUpTrackersDone; trackerRenamer = GameObject.FindObjectOfType <TrackerRenamer>(); UIDesktopManager.I.ActiveSetupTrackersPanel(myContext.currentBodyPart); trackerRenamer.StartRename(myContext.currentBodyPart.LimbPart); }
public override void Enter() { Application.Quit(); myContext = (AppFlowContext)context; Debug.Log("HO FINITO L'ESERCIZIO"); base.Enter(); }
public override void Enter() { UIDesktopManager.EventWearButtonClicked += TrackerWorn; myContext = (AppFlowContext)context; base.Enter(); tm = GameObject.FindObjectOfType <TrackerManager>(); tm.SetUpTrackers(myContext.currentBodyPart.LimbPart); UIDesktopManager.I.ActiveWearTrakersPanel(); myContext.trackerManager = tm; }
public override void Enter() { UIDesktopManager.EventBodyPartSelected += BodyPartChosen; myContext = (AppFlowContext)context; myContext.listBodyParts = new List <BodyPart>(); BodyPart[] bodyParts = Resources.LoadAll <BodyPart>("BodyPartScriptableObj"); myContext.listBodyParts = bodyParts.ToList(); UIDesktopManager.I.ActiveSelectionBodyPartPanel(myContext.listBodyParts); base.Enter(); }
public override void Enter() { UIDesktopManager.EventProfileSelected += DoneSelectionPatient; myContext = (AppFlowContext)context; myContext.ListPatient = new List <PatientProfile>(); myContext.ListPatient.Add(new PatientProfile("MR", "Gabriel", "Polo", "Male", 1.7f, true, "Broken shoulder")); myContext.ListPatient.Add(new PatientProfile("SN", "Simone", "Niero", "Male", 1.7f, true, "Broken shoulder")); myContext.ListPatient.Add(new PatientProfile("SN", "Alessio", "Varone", "Male", 1.7f, true, "Broken shoulder")); UIDesktopManager.I.ActiveSelectionPatientPanel(myContext.ListPatient); base.Enter(); }
public override void Enter() { // iscrivo 3 funzioni agli eventi che saranno chiamati in base al fatto che l'utente voglia finire, voglia rifare es con stessa parte del corpo, voglia cambiare parte corpo UIDesktopManager.EventEndExperience += GoToNextState; UIDesktopManager.EventReDoExerciseSameBodyPart += ReDoExerciseSameBodyPart; UIDesktopManager.EventReDoExerciseDifferentBodyPart += ReDoExerciseDifferentBodyPart; myContext = (AppFlowContext)context; UIDesktopManager.I.ActiveTrackersFeedbackPanel(myContext.currentBodyPart); base.Enter(); // Quick Fix!!! foreach (var gizmo in GameObject.FindObjectsOfType <TolleranceGizmo>()) { // niente... eliminato perchè la tolleranza che viene passata quì non è quella corretta... //gizmo.radius = myContext.listBodyParts[0].PositionTollerance; //gizmo.DrawTolleranceGizmo(); } }