Hi zusammen
Folgendes Problem;
Ball[] ball ={
new Ball(xGui, yGui, 150, 150, Color.YELLOW),
new Ball(xGui, yGui, 300, 300, Color.RED),
// new Ball(xGui, yGui, 200, 150, Color.BLUE),
// new Ball(xGui, yGui, 400, 150, Color.GREEN),
// new Ball(xGui, yGui, 100, 150, Color.PINK),
// new Ball(xGui, yGui, 90, 150, Color.CYAN),
};
for (int i = 0; i < ball.length; i++) {
this.add(ball);
}
Ich möchte die Objekte im Array auf die Koordinaten vergleichen,wie kann ich das anstellen?
Folgendes Problem;
Ball[] ball ={
new Ball(xGui, yGui, 150, 150, Color.YELLOW),
new Ball(xGui, yGui, 300, 300, Color.RED),
// new Ball(xGui, yGui, 200, 150, Color.BLUE),
// new Ball(xGui, yGui, 400, 150, Color.GREEN),
// new Ball(xGui, yGui, 100, 150, Color.PINK),
// new Ball(xGui, yGui, 90, 150, Color.CYAN),
};
for (int i = 0; i < ball.length; i++) {
this.add(ball);
}
Ich möchte die Objekte im Array auf die Koordinaten vergleichen,wie kann ich das anstellen?