private void OnVoxelModelAvailable(VoxelModelReceivedEventArgs e) { var handler = VoxelModelAvailable; if (handler != null) { handler(this, e); } }
void ManagerVoxelModelReceived(object sender, VoxelModelReceivedEventArgs e) { // our model just downloaded, set it if (e.Model.Name == _voxelEntity.ModelName) { _visualVoxelModel = _manager.GetModel(e.Model.Name); _manager.VoxelModelAvailable -= ManagerVoxelModelReceived; if (_voxelEntity.DefaultSize == Vector3.Zero && _visualVoxelModel.VoxelModel.States[0].BoundingBox != null) { SetEntityVoxelBB(_visualVoxelModel.VoxelModel.States[0].BoundingBox); } } }