Search in sources :

Example 21 with Sprite

use of com.b3dgs.lionengine.graphic.Sprite in project lionengine by b3dgs.

the class SpriteTest method testLoadSurface.

/**
 * Test load with surface.
 */
@Test(expected = LionEngineException.class)
public void testLoadSurface() {
    final Sprite sprite = new SpriteImpl(Graphics.createImageBuffer(64, 32));
    sprite.load();
}
Also used : Sprite(com.b3dgs.lionengine.graphic.Sprite) Test(org.junit.Test)

Example 22 with Sprite

use of com.b3dgs.lionengine.graphic.Sprite in project lionengine by b3dgs.

the class SpriteTest method testLoadMediaAlready.

/**
 * Test load with media already loaded.
 */
@Test(expected = LionEngineException.class)
public void testLoadMediaAlready() {
    final Sprite sprite = new SpriteImpl(media);
    sprite.load();
    sprite.load();
}
Also used : Sprite(com.b3dgs.lionengine.graphic.Sprite) Test(org.junit.Test)

Aggregations

Sprite (com.b3dgs.lionengine.graphic.Sprite)22 Test (org.junit.Test)22 ImageBuffer (com.b3dgs.lionengine.graphic.ImageBuffer)3 FilterBilinear (com.b3dgs.lionengine.core.filter.FilterBilinear)1 Graphic (com.b3dgs.lionengine.graphic.Graphic)1