質問編集履歴

3

タイトル変更

2020/12/22 05:48

投稿

kano00
kano00

スコア3

test CHANGED
@@ -1 +1 @@
1
- JavaScript 円と形の衝突判定
1
+ JavaScript 円と形の衝突判定
test CHANGED
File without changes

2

コード修正

2020/12/22 05:48

投稿

kano00
kano00

スコア3

test CHANGED
File without changes
test CHANGED
@@ -246,7 +246,7 @@
246
246
 
247
247
 
248
248
 
249
- // 障害物1
249
+ // 障害物1
250
250
 
251
251
  if (
252
252
 
@@ -262,13 +262,13 @@
262
262
 
263
263
  if (
264
264
 
265
- (y < obstacle.y + obstacleHeight - ballRadius &&
265
+ (y < obstacle.y + obstacleHeight + ballRadius &&
266
266
 
267
267
  x > obstacle.x &&
268
268
 
269
269
  x < obstacle.x + obstacleWidth) ||
270
270
 
271
- (y > obstacle.y + ballRadius &&
271
+ (y > obstacle.y - ballRadius &&
272
272
 
273
273
  x > obstacle.x &&
274
274
 
@@ -282,7 +282,7 @@
282
282
 
283
283
  (x < obstacle.x + obstacleWidth + ballRadius &&
284
284
 
285
- y > obstacle.y - ballRadius &&
285
+ y > obstacle.y &&
286
286
 
287
287
  y < obstacle.y + obstacleHeight) ||
288
288
 
@@ -320,13 +320,13 @@
320
320
 
321
321
  if (
322
322
 
323
- (y < obstacle2.y + obstacle2Height - ballRadius &&
323
+ (y < obstacle2.y + obstacle2Height + ballRadius &&
324
324
 
325
325
  x > obstacle2.x &&
326
326
 
327
327
  x < obstacle2.x + obstacle2Width) ||
328
328
 
329
- (y > obstacle2.y + ballRadius &&
329
+ (y > obstacle2.y - ballRadius &&
330
330
 
331
331
  x > obstacle2.x &&
332
332
 
@@ -340,7 +340,7 @@
340
340
 
341
341
  (x < obstacle2.x + obstacle2Width + ballRadius &&
342
342
 
343
- y > obstacle2.y - ballRadius &&
343
+ y > obstacle2.y &&
344
344
 
345
345
  y < obstacle2.y + obstacle2Height) ||
346
346
 

1

HTMLコード修正

2020/12/20 01:44

投稿

kano00
kano00

スコア3

test CHANGED
File without changes
test CHANGED
@@ -36,12 +36,8 @@
36
36
 
37
37
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
38
38
 
39
- <link rel="stylesheet" href="style.css" />
40
-
41
39
  <title>Document</title>
42
40
 
43
- <!-- <script type="text/javascript" src="excanvas.js"></script> -->
44
-
45
41
  </head>
46
42
 
47
43
  <body>