pantelis pantelakis

Greenhorn
+ Follow
since May 13, 2011
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by pantelis pantelakis

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?
12 years ago
Hi,

I want to create a group of same sprites.
I am using netbeans, GameEngine.
I tryied to create an array of sprites. Although is seems ok (i can system.out info) the sprtites are not visible on the GameCanvas.
The sprite are ssetVisible(true)
I also tried this with Vector

Can anybody help me with this??
Thanks in advance.
12 years ago
Hi

I want to create a List/Vector/Array of sprites.
It seems that i have created it but it is not visible allthough I can system.out.println information.
It is also setVisible(true);

Can anybody help??
12 years ago