Asteroid Fracture Method Delta Engine Documentation

Namespace: Asteroids
Assembly: Asteroids (in Asteroids.exe) Version: 1.1.1.0 (1.1.1)
Syntax

public void Fracture()
Remarks

Tests: Asteroids.Tests.AsteroidTests
Examples

2 unit tests call Asteroids.Asteroid.Fracture
[Test, CloseAfterFirstFrame]
public void FractureAsteroid()
{
    var asteroid = new Asteroid(new InteractionLogic());
    asteroid.Fracture();
    Assert.IsFalse(asteroid.IsActive);
}
[Test, CloseAfterFirstFrame]
public void ShowAsteroidsOfSeveralSizemodsAndFracture()
{
    var gameLogic = new InteractionLogic();
    var largeAsteroid = new Asteroid(gameLogic);
    new Asteroid(gameLogic, 2);
    new Asteroid(gameLogic, 3);
    largeAsteroid.Fracture();
    Assert.IsFalse(largeAsteroid.IsActive);
}
See Also