Spaces:
Running
Running
Update index.html
Browse files- index.html +9 -8
index.html
CHANGED
@@ -7,14 +7,13 @@
|
|
7 |
body {
|
8 |
margin: 0;
|
9 |
overflow: hidden;
|
10 |
-
background: url('back1.webp') repeat;
|
11 |
-
background-size: auto;
|
12 |
font-family: Arial, sans-serif;
|
13 |
cursor: crosshair;
|
14 |
-
image-rendering: pixelated;
|
15 |
}
|
16 |
|
17 |
-
/* 배경 이미지 위에 어두운 오버레이 추가 */
|
18 |
body::before {
|
19 |
content: '';
|
20 |
position: fixed;
|
@@ -22,8 +21,8 @@
|
|
22 |
left: 0;
|
23 |
width: 100%;
|
24 |
height: 100%;
|
25 |
-
background: rgba(0, 0, 0, 0.3);
|
26 |
-
pointer-events: none;
|
27 |
z-index: 1;
|
28 |
}
|
29 |
|
@@ -128,9 +127,10 @@
|
|
128 |
position: absolute;
|
129 |
width: 40px;
|
130 |
height: 40px;
|
131 |
-
background:
|
132 |
-
|
133 |
z-index: 80;
|
|
|
134 |
}
|
135 |
|
136 |
.explosion {
|
@@ -347,6 +347,7 @@
|
|
347 |
zombie.y += Math.sin(angle) * zombie.speed;
|
348 |
zombie.element.style.left = `${zombie.x - 20}px`;
|
349 |
zombie.element.style.top = `${zombie.y - 20}px`;
|
|
|
350 |
|
351 |
const distToPlayer = Math.hypot(playerX - zombie.x, playerY - zombie.y);
|
352 |
if (distToPlayer < 40) {
|
|
|
7 |
body {
|
8 |
margin: 0;
|
9 |
overflow: hidden;
|
10 |
+
background: url('back1.webp') repeat;
|
11 |
+
background-size: auto;
|
12 |
font-family: Arial, sans-serif;
|
13 |
cursor: crosshair;
|
14 |
+
image-rendering: pixelated;
|
15 |
}
|
16 |
|
|
|
17 |
body::before {
|
18 |
content: '';
|
19 |
position: fixed;
|
|
|
21 |
left: 0;
|
22 |
width: 100%;
|
23 |
height: 100%;
|
24 |
+
background: rgba(0, 0, 0, 0.3);
|
25 |
+
pointer-events: none;
|
26 |
z-index: 1;
|
27 |
}
|
28 |
|
|
|
127 |
position: absolute;
|
128 |
width: 40px;
|
129 |
height: 40px;
|
130 |
+
background: url('zom1.webp') no-repeat center center;
|
131 |
+
background-size: cover;
|
132 |
z-index: 80;
|
133 |
+
transform-origin: center;
|
134 |
}
|
135 |
|
136 |
.explosion {
|
|
|
347 |
zombie.y += Math.sin(angle) * zombie.speed;
|
348 |
zombie.element.style.left = `${zombie.x - 20}px`;
|
349 |
zombie.element.style.top = `${zombie.y - 20}px`;
|
350 |
+
zombie.element.style.transform = `rotate(${angle}rad)`; // 좀비 회전
|
351 |
|
352 |
const distToPlayer = Math.hypot(playerX - zombie.x, playerY - zombie.y);
|
353 |
if (distToPlayer < 40) {
|