public BaseJointBehaviour(string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, PatientJoint activeJoint, Models.PatientJoint passiveJoint, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(settingsManager, feedback, pitchType, unityObjectName, statisticType, affectedJoint, previous, repetitions, statisticManager) { this.type = Types.behaviour; this.activeJoint = activeJoint; this.passiveJoint = passiveJoint; this.information = Models.Model.GetModel <Models.ExerciseInformation>(unityObjectName).Order; }
public FulFillable(string name, StatisticType dataType, PatientJoint affectedJoint, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) { this.logger.AddLogAppender <ConsoleAppender>(); this.name = name; this.previous = previous; this.repetitions = this.initialRepetitions = repetitions; this.statisticManager = statisticManager; this.dataType = dataType; this.affectedJoint = affectedJoint; this.statisticData = AddStatisticData(dataType, affectedJoint); }
void OnEnable() { if (GameManager.ActivePatient != null) { this.button = GetComponent <Button>(); this.buttonColors = this.button.colors; this.joint = GameManager.ActivePatient.GetJointByName(this.name); States state = joint.Active ? States.active : States.inactive; this.buttonColors.normalColor = colors[state]; this.buttonColors.pressedColor = state == States.active ? colors[States.specialActive] : colors[States.specialInactive]; this.buttonColors.highlightedColor = state == States.active ? colors[States.specialActive] : colors[States.specialInactive]; this.buttonColors.disabledColor = state == States.active ? colors[States.specialActive] : colors[States.specialInactive]; this.button.colors = this.buttonColors; } }
public GameObject CreateBodyObject(ulong id) { GameObject body = new GameObject(GameManager.ActivePatient.Name); Material boneMaterial = defaultBoneMaterial; for (Kinect.JointType jt = Kinect.JointType.SpineBase; jt <= Kinect.JointType.ThumbRight; jt++) { GameObject jointObj = GameObject.CreatePrimitive(PrimitiveType.Sphere); PatientJoint patientJoint = GameManager.ActivePatient.GetJointByName(jt.ToString()); LineRenderer lr = jointObj.AddComponent <LineRenderer>(); Renderer jointRenderer = jointObj.GetComponent <Renderer>(); if (patientJoint.Active == false) { jointRenderer.material = disabledJointMaterial; } else if (patientJoint.KinectJoint.Stressed) { jointRenderer.material = stressedJointMaterial; } else { jointRenderer.material = jointMaterial; } lr.SetVertexCount(2); lr.material = boneMaterial; lr.SetWidth(0.05f, 0.05f); jointObj.transform.localScale = new Vector3(0.3f, 0.3f, 0.3f); jointObj.name = jt.ToString(); jointObj.transform.parent = body.transform; } return(body); }
public DistanceValueBehaviour(double value, string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, PatientJoint activeJoint, PatientJoint passiveJoint, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(value, unityObjectName, statisticType, affectedJoint, activeJoint, passiveJoint, settingsManager, feedback, pitchType, previous, repetitions, statisticManager) { logger.AddLogAppender <ConsoleAppender>(); }
public AngleValueBehaviour(double value, string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, PatientJoint activeJoint, PatientJoint childJoint, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(value, unityObjectName, statisticType, affectedJoint, activeJoint, childJoint, settingsManager, feedback, pitchType, previous, repetitions, statisticManager) { this.tolerance = settingsManager.GetValue <int>("ingame", "angleTolerance"); this.angle = 0; this.minAngle = initialValue - tolerance; this.maxAngle = initialValue + tolerance; }
public Joint(string name, StatisticType statisticType, PatientJoint affectedJoint, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(settingsManager, feedback, pitchType, name, statisticType, affectedJoint, previous, repetitions, statisticManager) { this.type = Types.joint; }
public HoldAction(string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, double value, FulFillable previous, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, int repetitions, WriteStatisticManager statisticManager) : base(unityObjectName, statisticType, affectedJoint, value, previous, settingsManager, feedback, pitchType, repetitions, statisticManager) { }
public Informable(SettingsManager settingsManager, Feedback feedback, PitchType pitchType, string name, StatisticType statisticType, PatientJoint affectedJoint, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(name, statisticType, affectedJoint, previous, repetitions, statisticManager) { this.database = Database.Instance(); this.feedback = feedback; this.pitchType = pitchType; }
public BaseAction(string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, double value, FulFillable previous, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, int repetitions, WriteStatisticManager statisticManager) : base(settingsManager, feedback, pitchType, unityObjectName, statisticType, affectedJoint, previous, repetitions, statisticManager) { this.type = Types.action; this.initialValue = this.value = value; this.information = Models.Model.GetModel <Models.ExerciseInformation>(unityObjectName).Order; }
public Step(string name, StatisticType statisticType, PatientJoint affectedJoint, BaseStep prevStep, int repetitions, WriteStatisticManager statisticManager) : base(name, statisticType, affectedJoint, prevStep, repetitions, statisticManager) { this.type = Types.step; }
public BaseStep(string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(unityObjectName, statisticType, affectedJoint, previous, repetitions, statisticManager) { this.unityObjectName = unityObjectName; }
public Exercise(string name, StatisticType statisticType, PatientJoint affectedJoint, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(name, statisticType, affectedJoint, previous, repetitions, statisticManager) { }
public EqualHeightBehaviour(string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, PatientJoint activeJoint, PatientJoint passiveJoint, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(unityObjectName, statisticType, affectedJoint, activeJoint, passiveJoint, settingsManager, feedback, pitchType, previous, repetitions, statisticManager) { this.tolerance = settingsManager.GetValue <double>("ingame", "distanceTolerance"); }
private StatisticData AddStatisticData(StatisticType dataType, PatientJoint affectedJoint) { return(statisticManager.AddStatistic(name, dataType, StatisticStates.unfulfilled, "", affectedJoint)); }
public BaseJointValueBehaviour(double value, string unityObjectName, StatisticType statisticType, PatientJoint affectedJoint, PatientJoint activeJoint, PatientJoint passiveJoint, SettingsManager settingsManager, Feedback feedback, PitchType pitchType, FulFillable previous, int repetitions, WriteStatisticManager statisticManager) : base(unityObjectName, statisticType, affectedJoint, activeJoint, passiveJoint, settingsManager, feedback, pitchType, previous, repetitions, statisticManager) { this.initialValue = this.value = value; }
public StepGroup(string description, StatisticType statisticType, PatientJoint affectedJoint, BaseStep previous, int repetitions, WriteStatisticManager statisticManager) : base(description, statisticType, affectedJoint, previous, repetitions, statisticManager) { }
public StatisticData AddStatistic(string name, StatisticType dataType, StatisticStates state, string message, PatientJoint affectedJoint) { var statistic = new StatisticData(date, name, dataType, state, message, affectedJoint, GameManager.ActiveExercise, GameManager.ActivePatient); GameManager.ActivePatient.CurrentStatistic.Add(statistic); return(statistic); }