回答
-
クラス-応用11-回答
Thursday, October 29, 2026 in クラス-応用11
Categories:
問題 クラス-応用11 の回答ページです. 回答例 Button btnRed, btnGreen, btnBlue; color bg; // 現在の背景色 void setup() { size(500, 300); noStroke(); bg = color(240); // Button(左上のx, 左上のy, 幅, 高さ, 色) btnRed = new Button( 50, 200, 120, 60, color(230, 60, 60)); btnGreen = new …
-
クラス-基礎8-回答
Thursday, October 29, 2026 in クラス-基礎8
Categories:
問題 クラス-基礎8 の回答ページです. 回答例 Circle base, body, head; // Circle型の変数を3つ用意する void setup() { size(400, 400); noStroke(); // 下の雪玉 base = new Circle(); base.x = 200; base.y = 290; base.d = 160; // 真ん中の雪玉 body = new Circle(); body.x = 200; body.y = 170; body.d …
-
クラス-基礎11-回答
Thursday, October 29, 2026 in クラス-基礎11
Categories:
問題 クラス-基礎11 の回答ページです. 回答例 Tree tree1, tree2, tree3; // Tree型の変数を3つ用意する void setup() { size(400, 400); noStroke(); // 奥の木(左) tree1 = new Tree(); tree1.x = 110; tree1.y = 300; // 奥の木(右) tree2 = new Tree(); tree2.x = 290; tree2.y = 300; // 手前の木 tree3 = …
-
回答
Monday, January 01, 0001 in 配列-応用7
Categories:
問題 配列-応用7 の回答ページです. 回答例 float[] x=new float[5]; int[] muki = new int[5]; color[] colors = new color[5]; void setup(){ size(600,400); for(int i = 0; i<5; i++){ x[i] = 100+ i*80; muki[i] = 1; colors[i] = color(random(256),random(256),random(256)); } …