FarseerPhysics.Dynamics.BreakableBody.decompose C# (CSharp) Метод

decompose() публичный Метод

public decompose ( ) : void
Результат void
		void decompose()
		{
			// Unsubsribe from the PostSolve delegate
			_world.contactManager.onPostSolve -= onPostSolve;

			for( int i = 0; i < parts.Count; i++ )
			{
				var oldFixture = parts[i];

				var shape = oldFixture.shape.clone();
				object userData = oldFixture.userData;

				mainBody.destroyFixture( oldFixture );

				var body = BodyFactory.CreateBody( _world, mainBody.position, mainBody.rotation, BodyType.Dynamic, mainBody.userData );

				var newFixture = body.createFixture( shape );
				newFixture.userData = userData;
				parts[i] = newFixture;

				body.angularVelocity = _angularVelocitiesCache[i];
				body.linearVelocity = _velocitiesCache[i];
			}

			_world.removeBody( mainBody );
			_world.removeBreakableBody( this );
		}