public void initialize(ZgManager aZig) { Inst = this; mZig = aZig; mAll = new XboneAll(); mLog = new XboneUnityLogPlugin(); mPLM = new XbonePLM(aZig.mManager); mKinect = new XboneKinect(); mStorage = new XboneStorage(); mEvents = new XboneEvents(); mAll.Start(); mLog.Start(); mPLM.Start(); mKinect.Start(); mEvents.Start(); //TODO DELETE solves nothing //solves some jit problems //System.Environment.SetEnvironmentVariable("MONO_REFLECTION_SERIALIZER", "yes"); Initialized = true; }
public ZgManager(ManagerManager aManager) : base(aManager) { //ZgInterface = new EmptyZig(); #if UNITY_XBOXONE && !UNITY_EDITOR ZgInterface = new MicrosoftZig(); #else ZgInterface = new ZigFuZig(); #endif ZgInterface.initialize(this); Joints = new Dictionary <ZgJointId, ZgInputJoint>() { { ZgJointId.Head, new ZgInputJoint(ZgJointId.Head) }, { ZgJointId.Torso, new ZgInputJoint(ZgJointId.Torso) }, { ZgJointId.Waist, new ZgInputJoint(ZgJointId.Waist) }, { ZgJointId.LeftShoulder, new ZgInputJoint(ZgJointId.LeftShoulder) }, { ZgJointId.LeftElbow, new ZgInputJoint(ZgJointId.LeftElbow) }, { ZgJointId.LeftHand, new ZgInputJoint(ZgJointId.LeftHand) }, { ZgJointId.LeftHip, new ZgInputJoint(ZgJointId.LeftHip) }, { ZgJointId.LeftKnee, new ZgInputJoint(ZgJointId.LeftKnee) }, { ZgJointId.LeftAnkle, new ZgInputJoint(ZgJointId.LeftAnkle) }, { ZgJointId.RightShoulder, new ZgInputJoint(ZgJointId.RightShoulder) }, { ZgJointId.RightElbow, new ZgInputJoint(ZgJointId.RightElbow) }, { ZgJointId.RightHand, new ZgInputJoint(ZgJointId.RightHand) }, { ZgJointId.RightHip, new ZgInputJoint(ZgJointId.RightHip) }, { ZgJointId.RightKnee, new ZgInputJoint(ZgJointId.RightKnee) }, { ZgJointId.RightAnkle, new ZgInputJoint(ZgJointId.RightAnkle) }, }; //pfft, unity can't seem to compile this //foreach(ZigJointId e in Enum.GetValues(typeof(ZigJointId))) // Joints[e] = new ZigInputJoint(e); }