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.
私は Robocode でロボットを作成しましたが、特に RGBA を使用して、カスタム カラーを使用したいと考えています。
それは可能ですか?
私は試した:
setBodyColor(Color.fromArgb(150, 0, 150)); setBodyColor(Color(0.0f,0.0f,0.0f,0.0f));
しかし、どちらも機能しませんでした。助言がありますか?
これは私のために働いた:
メソッドを追加:
private Color Color(int r, int g, int b, int a) { return new Color(r, g, b, a); }
そして、それを呼び出します:
setBodyColor(Color(0.0f, 0.0f, 0.0f, 0.0f));