私はこれを理解できないようです、そしてあなたたちが私を助けることができればそれは素晴らしいでしょう!作成済みのオブジェクトをコンストラクターに渡して、すべての値を取得できるようにしようとしています。
public class Drops {
Ship ship;
Bullet[] bullet;
Aliens[] aliens;
Movement movement;
public Drops(Ship ship,Bullet[] bull,Aliens[] alienT) {
this.ship = ship;
for (int a = 0; a < MainGamePanel.maxAliens;a++) {
System.out.println(a +" " +alienT[a].x); // THIS WORKS, when nothing
// is being assigned, so the values
// are being passed correctly.
this.aliens[a] = alienT[a];
for (int b = 0; b < MainGamePanel.maxShots;b++){
this.bullet[b] = bull[b];
}
}
}
// that is is the class, and also where the error occurs
メインでは、このようにコンストラクターに値を送信しています
drop = new Drops(ship, bull, alienT);
shipはアレイブルではなく、alienTは両方ともアレイです。
前もって感謝します!