質問編集履歴
2
不正な削除の打ち消し
test
CHANGED
File without changes
|
test
CHANGED
@@ -5,3 +5,163 @@
|
|
5
5
|
「論プロエディタ」というものを使って、学習ゲームを作っています。
|
6
6
|
|
7
7
|
テキストのオブジェクトをマウスでクリックしたら次の画面(問題)が移るようにしたいのですが、このページの移り変わりをどうプログラムで表せばよいのかわかりません。どのようなプログラムで表したらよいでしょうか。単語をクリックしたら次の問題に行く感じにしたいです。
|
8
|
+
|
9
|
+
|
10
|
+
|
11
|
+
##現在入力しているプログラムです(論プロエディタ)
|
12
|
+
|
13
|
+
```
|
14
|
+
|
15
|
+
public class NewClass extends Turtle {
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
//起動処理
|
20
|
+
|
21
|
+
public static void main(String[] args) {
|
22
|
+
|
23
|
+
Turtle.startTurtle(new NewClass(), args);
|
24
|
+
|
25
|
+
}
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
//タートルを動かす処理
|
30
|
+
|
31
|
+
public void start() {
|
32
|
+
|
33
|
+
//Textturtle
|
34
|
+
|
35
|
+
{ TextTurtle cyu = new TextTurtle("Could you understand proposition?");
|
36
|
+
|
37
|
+
TextTurtle lgs = new TextTurtle("Let's get started");
|
38
|
+
|
39
|
+
TextTurtle ex1 = new TextTurtle(" I'll be ready to leave ____ about twenty minutes.");
|
40
|
+
|
41
|
+
TextTurtle in = new TextTurtle("in"); //answer
|
42
|
+
|
43
|
+
TextTurtle on = new TextTurtle("on");
|
44
|
+
|
45
|
+
TextTurtle at = new TextTurtle("at");
|
46
|
+
|
47
|
+
TextTurtle ex2 = new TextTurtle("The child responded to his mother's demands ____ throwing a tantrum.");
|
48
|
+
|
49
|
+
TextTurtle with = new TextTurtle("with");//answer
|
50
|
+
|
51
|
+
TextTurtle by = new TextTurtle("by");
|
52
|
+
|
53
|
+
TextTurtle from = new TextTurtle("from");
|
54
|
+
|
55
|
+
TextTurtle ex3 = new TextTurtle(" What are the main ingredients ____ this casserole?");
|
56
|
+
|
57
|
+
TextTurtle about = new TextTurtle("about");
|
58
|
+
|
59
|
+
TextTurtle to = new TextTurtle("to");
|
60
|
+
|
61
|
+
TextTurtle of = new TextTurtle("of");//answer
|
62
|
+
|
63
|
+
TextTurtle ex4 = new TextTurtle("She has a lot of admiration ____ all that you have done.");
|
64
|
+
|
65
|
+
TextTurtle fo = new TextTurtle("for");//answer
|
66
|
+
|
67
|
+
TextTurtle on2 = new TextTurtle("on");
|
68
|
+
|
69
|
+
TextTurtle from2 = new TextTurtle("from");
|
70
|
+
|
71
|
+
TextTurtle ex5 = new TextTurtle("He always arrives ____ time.");
|
72
|
+
|
73
|
+
TextTurtle in2 = new TextTurtle("in");
|
74
|
+
|
75
|
+
TextTurtle on3 = new TextTurtle("on");
|
76
|
+
|
77
|
+
TextTurtle at2 = new TextTurtle("at");
|
78
|
+
|
79
|
+
|
80
|
+
|
81
|
+
//hide
|
82
|
+
|
83
|
+
hide();
|
84
|
+
|
85
|
+
ex1.hide();
|
86
|
+
|
87
|
+
in.hide();
|
88
|
+
|
89
|
+
on.hide();
|
90
|
+
|
91
|
+
at.hide();
|
92
|
+
|
93
|
+
ex2.hide();
|
94
|
+
|
95
|
+
with.hide();
|
96
|
+
|
97
|
+
by.hide();
|
98
|
+
|
99
|
+
from.hide();
|
100
|
+
|
101
|
+
ex3.hide();
|
102
|
+
|
103
|
+
about.hide();
|
104
|
+
|
105
|
+
to.hide();
|
106
|
+
|
107
|
+
of.hide();
|
108
|
+
|
109
|
+
ex4.hide();
|
110
|
+
|
111
|
+
fo.hide();
|
112
|
+
|
113
|
+
on2.hide();
|
114
|
+
|
115
|
+
from2.hide();
|
116
|
+
|
117
|
+
ex5.hide();
|
118
|
+
|
119
|
+
in2.hide();
|
120
|
+
|
121
|
+
on3.hide();
|
122
|
+
|
123
|
+
at2.hide();
|
124
|
+
|
125
|
+
|
126
|
+
|
127
|
+
|
128
|
+
|
129
|
+
|
130
|
+
|
131
|
+
//startscreen
|
132
|
+
|
133
|
+
|
134
|
+
|
135
|
+
{
|
136
|
+
|
137
|
+
cyu.warp(350,200);
|
138
|
+
|
139
|
+
lgs.warp(350,300);
|
140
|
+
|
141
|
+
if(lgs.contains(mouseX(),mouseY()))
|
142
|
+
|
143
|
+
{ cyu.hide();
|
144
|
+
|
145
|
+
lgs.hide();
|
146
|
+
|
147
|
+
}
|
148
|
+
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
}
|
160
|
+
|
161
|
+
}
|
162
|
+
|
163
|
+
}
|
164
|
+
|
165
|
+
}
|
166
|
+
|
167
|
+
```
|
1
誤字
test
CHANGED
File without changes
|
test
CHANGED
@@ -2,162 +2,6 @@
|
|
2
2
|
|
3
3
|
|
4
4
|
|
5
|
-
|
5
|
+
「論プロエディタ」というものを使って、学習ゲームを作っています。
|
6
6
|
|
7
7
|
テキストのオブジェクトをマウスでクリックしたら次の画面(問題)が移るようにしたいのですが、このページの移り変わりをどうプログラムで表せばよいのかわかりません。どのようなプログラムで表したらよいでしょうか。単語をクリックしたら次の問題に行く感じにしたいです。
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
##現在入力しているプログラムです(論プロエディタ)
|
12
|
-
|
13
|
-
public class NewClass extends Turtle {
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
//起動処理
|
18
|
-
|
19
|
-
public static void main(String[] args) {
|
20
|
-
|
21
|
-
Turtle.startTurtle(new NewClass(), args);
|
22
|
-
|
23
|
-
}
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
//タートルを動かす処理
|
28
|
-
|
29
|
-
public void start() {
|
30
|
-
|
31
|
-
//Textturtle
|
32
|
-
|
33
|
-
{ TextTurtle cyu = new TextTurtle("Could you understand proposition?");
|
34
|
-
|
35
|
-
TextTurtle lgs = new TextTurtle("Let's get started");
|
36
|
-
|
37
|
-
TextTurtle ex1 = new TextTurtle(" I'll be ready to leave ____ about twenty minutes.");
|
38
|
-
|
39
|
-
TextTurtle in = new TextTurtle("in"); //answer
|
40
|
-
|
41
|
-
TextTurtle on = new TextTurtle("on");
|
42
|
-
|
43
|
-
TextTurtle at = new TextTurtle("at");
|
44
|
-
|
45
|
-
TextTurtle ex2 = new TextTurtle("The child responded to his mother's demands ____ throwing a tantrum.");
|
46
|
-
|
47
|
-
TextTurtle with = new TextTurtle("with");//answer
|
48
|
-
|
49
|
-
TextTurtle by = new TextTurtle("by");
|
50
|
-
|
51
|
-
TextTurtle from = new TextTurtle("from");
|
52
|
-
|
53
|
-
TextTurtle ex3 = new TextTurtle(" What are the main ingredients ____ this casserole?");
|
54
|
-
|
55
|
-
TextTurtle about = new TextTurtle("about");
|
56
|
-
|
57
|
-
TextTurtle to = new TextTurtle("to");
|
58
|
-
|
59
|
-
TextTurtle of = new TextTurtle("of");//answer
|
60
|
-
|
61
|
-
TextTurtle ex4 = new TextTurtle("She has a lot of admiration ____ all that you have done.");
|
62
|
-
|
63
|
-
TextTurtle fo = new TextTurtle("for");//answer
|
64
|
-
|
65
|
-
TextTurtle on2 = new TextTurtle("on");
|
66
|
-
|
67
|
-
TextTurtle from2 = new TextTurtle("from");
|
68
|
-
|
69
|
-
TextTurtle ex5 = new TextTurtle("He always arrives ____ time.");
|
70
|
-
|
71
|
-
TextTurtle in2 = new TextTurtle("in");
|
72
|
-
|
73
|
-
TextTurtle on3 = new TextTurtle("on");
|
74
|
-
|
75
|
-
TextTurtle at2 = new TextTurtle("at");
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
//hide
|
80
|
-
|
81
|
-
hide();
|
82
|
-
|
83
|
-
ex1.hide();
|
84
|
-
|
85
|
-
in.hide();
|
86
|
-
|
87
|
-
on.hide();
|
88
|
-
|
89
|
-
at.hide();
|
90
|
-
|
91
|
-
ex2.hide();
|
92
|
-
|
93
|
-
with.hide();
|
94
|
-
|
95
|
-
by.hide();
|
96
|
-
|
97
|
-
from.hide();
|
98
|
-
|
99
|
-
ex3.hide();
|
100
|
-
|
101
|
-
about.hide();
|
102
|
-
|
103
|
-
to.hide();
|
104
|
-
|
105
|
-
of.hide();
|
106
|
-
|
107
|
-
ex4.hide();
|
108
|
-
|
109
|
-
fo.hide();
|
110
|
-
|
111
|
-
on2.hide();
|
112
|
-
|
113
|
-
from2.hide();
|
114
|
-
|
115
|
-
ex5.hide();
|
116
|
-
|
117
|
-
in2.hide();
|
118
|
-
|
119
|
-
on3.hide();
|
120
|
-
|
121
|
-
at2.hide();
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
//startscreen
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
{
|
134
|
-
|
135
|
-
cyu.warp(350,200);
|
136
|
-
|
137
|
-
lgs.warp(350,300);
|
138
|
-
|
139
|
-
if(lgs.contains(mouseX(),mouseY()))
|
140
|
-
|
141
|
-
{ cyu.hide();
|
142
|
-
|
143
|
-
lgs.hide();
|
144
|
-
|
145
|
-
}
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
}
|
158
|
-
|
159
|
-
}
|
160
|
-
|
161
|
-
}
|
162
|
-
|
163
|
-
}
|