コード例 #1
0
 protected override void ThreadFunction()
 {
     _worldDataAccess.GetToken(new TokenRequest((int)_position.x - _radius, (int)_position.x + _radius, (int)_position.z + _radius, (int)_position.z - _radius), _persistentDataPath,
                               token =>
     {
         Debug.Log("LoadTokenJob.ThreadFunction token: " + token);
         Output = token;
     });
 }
コード例 #2
0
    protected override void ThreadFunction()
    {
        try
        {
            _worldDataAccess.GetToken(_tokenRequest, _persistentDataPath, (dataToken) =>
            {
                for (int x = _state.Radius; x < dataToken.Request.width - _state.Radius; x++)
                {
                    for (int y = _state.Radius; y < dataToken.Request.height - _state.Radius; y++)
                    {
                        SimulateAreaWithRadius(dataToken, x, y);
                    }
                }

                //_worldDataAccess.SaveToken(_tokenRequest);
                _onComplete();
            });
        }
        catch (Exception e)
        {
            Debug.LogError("SimulateAreaJob Error: \n" + e);
            throw;
        }
    }