public static boolean bodyinBounds(Body body) { UserData userData = (UserData) body.getUserData(); switch (userData.getUserDataType()) { case RIGHTARM: case ENEMYRIGHT: case GROUND: case ENEMYRIGHT2: case ENEMYRIGHT3: case ENEMYRIGHT4: case FIGHTER: case ENEMYLEFT: case ENEMYLEFT2: case ENEMYLEFT3: case ENEMYLEFT4: return body.getPosition().x + userData.getWidth() > 0; } return true; }
public static boolean bodyIsRightArm(Body body) { UserData userData = (UserData) body.getUserData(); return userData != null && userData.getUserDataType() == UserDataType.RIGHTARM; }
public static boolean bodyIsLeftEnemy4(Body body) { UserData userData = (UserData) body.getUserData(); return userData != null && userData.getUserDataType() == UserDataType.ENEMYLEFT4; }
public static boolean bodyIsFighter(Body body) { UserData userData = (UserData) body.getUserData(); return userData != null && userData.getUserDataType() == UserDataType.FIGHTER; }
public static boolean bodyIsGround(Body body) { UserData userData = (UserData) body.getUserData(); return userData != null && userData.getUserDataType() == UserDataType.GROUND; }
public static boolean bodyIsEnemyRight4(Body body) { UserData userData = (UserData) body.getUserData(); return userData != null && userData.getUserDataType() == UserDataType.ENEMYRIGHT4; }