just great. Thanks you
This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.
Show posts Menu protected void addTexture(String textureName, String textureFile){
if (!TextureManager.getInstance().containsTexture(textureName)){
Texture tmpTexture = new Texture(Constants.TEXTURE_PATH+textureFile);
TextureManager.getInstance().addTexture(textureName, tmpTexture);
}
}
protected void addTexture(String textureFile){
addTexture(textureFile,textureFile);
}
public void startLoop(){
while (true){
[...]
myPanel3D.updateLoop(); // panel with the first JPCT world
menuTabbedPanel.getMyPreviewPanel().updateLoop(); // panel with the second JPCT world
// both these panels have a JPCTPanel super class that implements the updateLoop method
[...]
try{
Thread.sleep(10);
}
catch (InterruptedException ie){
System.err.println("startLoop");
ie.printStackTrace();
}
Thread.yield();
}
}
public void updateLoop(){
buffer.clear();
updateCamera();
theWorld.renderScene(buffer);
theWorld.draw(buffer);
buffer.update();
synchronized(evt3DList){
this.processEvt3DList();
}
synchronized(draggedCoordinateList){
this.processDraggedCoordinate();
}
buffer.display(null);
myCanvas.repaint();
}
public Object3D[][] generateSplittedGroundMap(){
Object3D [][] splittedMap = new Object3D[zSize][xSize];
for (int i =0; i<zSize; i++){
for (int j = 0; j<xSize; j++){
MapElement me = mapData[i][j];
if (me.getGround()!=null){
splittedMap[i][j] =elementFactory.getObject(me.getGround());
TextureInfo ti = new TextureInfo(texMan.getTextureID("ground"));
ti.add(texMan.getTextureID("blueGrid"),TextureInfo.MODE_ADD);
splittedMap[i][j].setTexture(ti);
}
}
}
return splitedMap;
}
Page created in 0.023 seconds with 11 queries.