Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
だから、私が探しているのは、プレイヤーのスプライトから 30 ピクセル離れたランダムな場所にスプライトを生成する方法です。どうすればいいですか?
他の人がすでに言っているように、少なくともコードを試す必要があります。そうしないと、Web サイトの目的を悪用していることになります。
それにもかかわらず:
radius = Math.random()*maxRadius; angle = Math.random()*2*Math.PI; x = Math.cos(angle)*radius + x_of_circle_center; y = Math.sin(angle)*radius + y_of_circle_center;