Yes you are write.
Sorry.
Bellow the GameDesign Class
public class GameDesign {
public Vector ar = new Vector(2);
private Image platform_tiles;
public int[] objseq001 = {68, 68};
public Vector ar = new Vector(2);
public void updateLayerManagerForTestLevel(LayerManager lm) throws java.io.IOException {
...
getObjAr(0).setPosition(176, 144);
getObjAr(0).setVisible(true);
lm.append(getObjAr(0));
}
public Sprite getObjAr(int i) throws java.io.IOException {
if (ar.isEmpty()) {
// write pre-init user code here
System.out.println("getObjAr");
//Image platform_tiles1 = Image.createImage("/topview_tiles.png");
ar.addElement(new Sprite (getTopview_tiles(), 16, 16)) ;
((Sprite)ar.elementAt(i)).setFrameSequence(objseq001);
// write post-init user code here
}
System.out.println(((Sprite)ar.elementAt(i)).getWidth());
return (Sprite)ar.elementAt(i);
}
And here the TestGameCanvas
public TestGameCanvas() {
...
private void init() throws IOException {
this.timer = new Timer();
this.gameDesign = new GameDesign();
...
this.ar.addElement(gameDesign.getObjAr(0));
}
}
This is the code.
But nothing seems to be visible ...
Any body please for a hint or an idea?