質問編集履歴

2

修正

2016/04/29 14:06

投稿

ywotnf
ywotnf

スコア16

test CHANGED
File without changes
test CHANGED
@@ -46,10 +46,12 @@
46
46
 
47
47
  </AnchorPane>
48
48
 
49
-
50
-
51
49
  ```
52
50
 
51
+
52
+
53
+ ```java
54
+
53
55
  import javafx.scene.input.KeyEvent;
54
56
 
55
57
  import javafx.scene.layout.AnchorPane;

1

追記

2016/04/29 14:06

投稿

ywotnf
ywotnf

スコア16

test CHANGED
File without changes
test CHANGED
@@ -1,8 +1,54 @@
1
- ```Java
2
-
3
-
4
-
5
-
1
+ ```xml
2
+
3
+ <?xml version="1.0" encoding="UTF-8"?>
4
+
5
+
6
+
7
+ <?import javafx.scene.effect.*?>
8
+
9
+ <?import javafx.scene.control.*?>
10
+
11
+ <?import javafx.scene.text.*?>
12
+
13
+ <?import javafx.scene.shape.*?>
14
+
15
+ <?import java.lang.*?>
16
+
17
+ <?import javafx.scene.layout.*?>
18
+
19
+
20
+
21
+ <AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" onKeyPressed="#KeyPress" onKeyReleased="#KeyRelease" prefHeight="400.0" prefWidth="600.0" xmlns="http://javafx.com/javafx/8" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Game">
22
+
23
+ <children>
24
+
25
+ <Rectangle arcHeight="5.0" arcWidth="5.0" fill="#838383" height="400.0" layoutX="425.0" stroke="#838383" strokeType="INSIDE" width="175.0" />
26
+
27
+ <Rectangle arcHeight="5.0" arcWidth="5.0" height="400.0" stroke="BLACK" strokeType="INSIDE" width="425.0" />
28
+
29
+ <Label layoutX="486.0" layoutY="14.0" prefHeight="43.0" prefWidth="78.0" text="Score" textFill="#1b92e8">
30
+
31
+ <font>
32
+
33
+ <Font name="Lao UI Bold" size="29.0" />
34
+
35
+ </font>
36
+
37
+ <effect>
38
+
39
+ <Bloom />
40
+
41
+ </effect>
42
+
43
+ </Label>
44
+
45
+ </children>
46
+
47
+ </AnchorPane>
48
+
49
+
50
+
51
+ ```
6
52
 
7
53
  import javafx.scene.input.KeyEvent;
8
54
 
@@ -192,7 +238,7 @@
192
238
 
193
239
 
194
240
 
195
- Game g = new Gcont();
241
+ Game g = new Game
196
242
 
197
243
  g.GStart(pane);
198
244
 
@@ -216,6 +262,8 @@
216
262
 
217
263
 
218
264
 
265
+
266
+
219
267
  JavaFXを使ってゲームを作っているのですが、キーボード入力がうまくいきません。
220
268
 
221
269
  KeyPress()メソッドで変数が変更されているのにrun()メソッドでは変更されていません。