Esempio n. 1
0
 public void Dispose()
 {
     if (PSMoveManager.GetManagerInstance() != null)
     {
         PSMoveManager.GetManagerInstance().ReleasePSMove(dataContext);
     }
 }
Esempio n. 2
0
        public void Dispose()
        {
            if (ManagerInstance != null)
            {
                PSMoveWorker.GetWorkerInstance().OnGameEnded();

                ManagerInstance = null;
            }
        }
Esempio n. 3
0
        /// <summary>
        /// NOTE! This function does NOT pair the controller by Bluetooth.
        /// If the controller is not already paired, it can only be connected by USB.
        /// See README for more information.
        /// </summary>
        public PSMoveController(Vector3 Position)
        {
            transform        = new Transform();
            transform.parent = new Transform()
            {
                position = Position
            };
            if (PSMoveManager.GetManagerInstance() != null)
            {
                dataContext = PSMoveManager.GetManagerInstance().AcquirePSMove(this.PSMoveID);
            }
            model = OrbIt.Game.Content.Load <Model>("PSMove");

            BasicEffect.EnableDefaultLighting(model, true);
        }
Esempio n. 4
0
 // Unity Callbacks
 public void Initialize()
 {
     if (ManagerInstance == null)
     {
         ManagerInstance = this;
         PSMoveHitchWatchdog.EmitHitchLogging = this.EmitHitchLogging;
         PSMoveWorker.GetWorkerInstance().OnGameStarted(
             new PSMoveWorkerSettings()
         {
             bUseManualExposure   = this.UseManualExposure,
             ManualExposureValue  = this.ManualExposureValue,
             InitialTrackingColor = this.InitialTrackingColor,
             PSMoveOffset         = this.PSMoveOffset,
             Filter3DType         = this.Filter3DType,
             bTrackerEnabled      = this.TrackerEnabled,
             //ApplicationDataPath = Application.dataPath
         });
     }
 }