コード例 #1
0
        public MapboxLocationServiceMock(byte[] locationLogFileContents)
        {
            if (null == locationLogFileContents || locationLogFileContents.Length < 1)
            {
                throw new ArgumentNullException("locationLogFileContents");
            }

            _logReader          = new LocationLogReader(locationLogFileContents);
            _locationEnumerator = _logReader.GetLocations();
        }
コード例 #2
0
//#endif


        private void OnDestroy()
        {
            if (null != _locationEnumerator)
            {
                _locationEnumerator.Dispose();
                _locationEnumerator = null;
            }
            if (null != _logReader)
            {
                _logReader.Dispose();
                _logReader = null;
            }
        }
コード例 #3
0
 protected virtual void Dispose(bool disposeManagedResources)
 {
     if (!_disposed)
     {
         if (disposeManagedResources)
         {
             if (null != _locationEnumerator)
             {
                 _locationEnumerator.Dispose();
                 _locationEnumerator = null;
             }
             if (null != _logReader)
             {
                 _logReader.Dispose();
                 _logReader = null;
             }
         }
         _disposed = true;
     }
 }
コード例 #4
0
//#if UNITY_EDITOR
        //protected override void Awake()
        protected override void Awake()
        {
            base.Awake();
            _logReader          = new LocationLogReader(_locationLogFile.bytes);
            _locationEnumerator = _logReader.GetLocations();
        }