-
import pulpcore.scene.Scene2D;
-
import pulpcore.image.CoreFont;
-
import pulpcore.image.CoreGraphics;
-
import pulpcore.sprite.Label;
-
import pulpcore.sprite.Sprite;
-
import pulpcore.sprite.FilledSprite;
-
-
public class PulpcoreDemo extends Scene2D
-
{
-
-
FilledSprite background;
-
-
public void load()
-
{
-
//Create a background
-
background = new FilledSprite(CoreGraphics.BLUE);
-
add(background);
-
-
//Build a new label
-
helloWorld =
new Label(CoreFont.
getSystemFont(),
-
"Hello World!", 200, 200);
-
-
//Make the label nice and centered
-
helloWorld.setAnchor(Sprite.HCENTER | Sprite.VCENTER);
-
-
//Add the label to the scene so it will be rendered
-
add(helloWorld);
-
}
-
-
public void update(int elapsedTime)
-
{
-
//Nothing is needed here today!
-
}
-
}
-