Collision methods anyone.
Hi, I am making a 2d platform game. Ok I use a tile class to display each individual tile for the background.
below is how I display each tile in turn every frame
Graphics g2 = g.create(x,y,_width,_height);
g2.drawImage(_tileImage,-tileX,-tileY,null);
updateBound(x,y);
note the updateBound(x,y) actually updates the bounding box of that particular background tile.
The main character controlled by the player also has a bounding box.
ok here is where I test to see if there is a collision between a particular background tile and the main character.
however I cna't detect and collsions anyone know why.
publicboolean collisionTest(MainCharacter _character,int tileNum){
return _character.getCharacterBounds().intersects(bkCollection[tileNum].getBound());
}
anyone have any ideas. thanks

