www.rinner.st

the blog/wiki/website/homepage/internetpräsenz of Stefan Rinner

Wednesday, Feb 5, 2003

sprites = new SpriteManager(this);
Sprite spriteA = sprites.create(assets.getAsset("zit-logo"), "myFirstSprite");
Sprite spriteB = sprites.create(assets.getAsset("mq-logo"), "mySecondSprite");
Sprite spriteC = sprites.create(assets.getAsset("zit-logo"), "myThirdSprite");
Sprite spriteD = sprites.create(assets.getAsset("mq-logo"), "myFourthSprite");
Sprite spriteE = sprites.create(assets.getAsset("zit-logo"), "myFifthSprite");
Sprite spriteF = sprites.create(assets.getAsset("mq-logo"), "mySixthSprite");
spriteA.setBehavior(new LinearModuloMovement(new Point(20, 1)));
spriteB.setBehavior(new LinearModuloMovement(new Point(15, 2)));
spriteC.setBehavior(new LinearModuloMovement(new Point(40, 1)));
spriteD.setBehavior(new LinearModuloMovement(new Point(1, 1)));
spriteE.setBehavior(new LinearModuloMovement(new Point(12, 23)));
spriteF.setBehavior(new LinearModuloMovement(new Point(1, 3)));
spriteA.setTransparency(0.7f);
//Display the frame
setSize(width, height);
setVisible(true);
setTitle("SpriteEngine");