私は移行中の私の落下円が現在どの位置にあるかを調べようとします。何が必要ですか?各秒を設定するタイマー。円の位置?または、実際の位置の値を取得する方法の提案。
このコードは、私のhitOuterCirlceメソッドの一部と、同じgetCenterX(円の値)を示しています。
// (x-u)*(x-u) + (y-v) )*(y-v) < (r * r)
// outer circle:
double u = 2 * (3.141 * circle.getRadius());
double res1 = (circle.getCenterX() - u) * (circle.getCenterX() - u);
double v = (1.333 * 3.141) * (circle.getRadius() * circle.getRadius()) * circle.getRadius();
double res2 = (circle.getCenterY() - v) * (circle.getCenterY() - v);
double res3 = (circle.getRadius() * circle.getRadius());
どうすればこれを修正できますか?
グリーツ