Hi All,
I'm begining to setup the collisions for the game objects, so far I have this:
How do I go about adding other classes into the method like:
and
I've tried to use an || operator but couldnt see how to add it in correctly.
Thanks
private void checkRightWalls()
{
int spriteWidth = getImage().getWidth();
int xDistance = (int)(spriteWidth / 2);
Actor rightWall = getOneObjectAtOffset(xDistance, 0, SteppingTile.class);
if(rightWall != null)
{
int wallWidth = rightWall.getImage().getWidth();
int newX = rightWall.getX() - (wallWidth + getImage().getWidth()) / 2;
setLocation(newX - shared.speed, getY());
}
}Actor rightWall = getOneObjectAtOffset(xDistance, 0, Block.class);
Actor rightWall = getOneObjectAtOffset(xDistance, 0, Pipe.class);
