質問編集履歴
2
記入漏れ
test
CHANGED
File without changes
|
test
CHANGED
@@ -66,7 +66,7 @@
|
|
66
66
|
|
67
67
|
setTimeout(function () { $("#result").text("Miss"); }, 950);
|
68
68
|
|
69
|
-
$('missshotVideo').fadeIn()
|
69
|
+
$('#missshotVideo').fadeIn()
|
70
70
|
|
71
71
|
|
72
72
|
|
1
コード再記載
test
CHANGED
File without changes
|
test
CHANGED
@@ -28,7 +28,31 @@
|
|
28
28
|
|
29
29
|
```Javascript
|
30
30
|
|
31
|
+
$('#doit').on('click', function () {
|
32
|
+
|
33
|
+
const dfMove = Math.floor(Math.random() * 3);
|
34
|
+
|
35
|
+
// Defense Right
|
36
|
+
|
37
|
+
if (dfMove == 0) {
|
38
|
+
|
39
|
+
$("#action").text("Right");
|
40
|
+
|
41
|
+
$('#Right_btn').on('click', function () {
|
42
|
+
|
43
|
+
$("#result").text('Stopped');
|
44
|
+
|
45
|
+
})
|
46
|
+
|
47
|
+
// ゲームオーバーへsettimeout?
|
48
|
+
|
31
|
-
$('#Shoot_btn').on('click', function () {
|
49
|
+
$('#Shoot_btn').on('click', function () {
|
50
|
+
|
51
|
+
$("#result").text('Shooted');
|
52
|
+
|
53
|
+
})
|
54
|
+
|
55
|
+
$('#Shoot_btn').on('click', function () {
|
32
56
|
|
33
57
|
const shootResult = Math.floor(Math.random() * 2);
|
34
58
|
|
@@ -42,8 +66,12 @@
|
|
42
66
|
|
43
67
|
setTimeout(function () { $("#result").text("Miss"); }, 950);
|
44
68
|
|
69
|
+
$('missshotVideo').fadeIn()
|
70
|
+
|
71
|
+
|
72
|
+
|
45
73
|
}
|
46
74
|
|
47
|
-
|
75
|
+
|
48
76
|
|
49
77
|
```
|