cutechicken commited on
Commit
7d05cf8
β€’
1 Parent(s): 27e962a

Update game.js

Browse files
Files changed (1) hide show
  1. game.js +2 -8
game.js CHANGED
@@ -10,7 +10,7 @@ const ENEMY_GROUND_HEIGHT = 0;
10
  const ENEMY_SCALE = 1;
11
  const MAX_HEALTH = 1000;
12
  const ENEMY_MOVE_SPEED = 0.1;
13
- const ENEMY_COUNT_MAX = 5;
14
  const PARTICLE_COUNT = 15;
15
  const BUILDING_COUNT = 50;
16
  const ENEMY_CONFIG = {
@@ -1386,12 +1386,6 @@ class Game {
1386
 
1387
  async initialize() {
1388
  try {
1389
- // λ‘œλ”© μ‹œμž‘
1390
- this.isLoading = true;
1391
- document.getElementById('loading').style.display = 'block';
1392
- document.getElementById('startButton').disabled = true;
1393
- document.getElementById('startButton').textContent = 'Loading...';
1394
-
1395
  // BGM이 아직 μž¬μƒλ˜μ§€ μ•Šμ€ κ²½μš°μ—λ§Œ μž¬μƒ
1396
  if (!this.bgmPlaying && !this.bgm) {
1397
  this.bgm = new Audio('sounds/BGM.ogg');
@@ -2009,7 +2003,7 @@ class Game {
2009
 
2010
  spawnEnemies() {
2011
  const spawnEnemy = () => {
2012
- if (this.enemies.length < 5 && !this.isGameOver) { // μ΅œλŒ€ 5λŒ€λ‘œ μ œν•œ
2013
  const position = this.getValidEnemySpawnPosition();
2014
  if (position) {
2015
  const type = Math.random() < 0.7 ? 'tank' : 'heavy';
 
10
  const ENEMY_SCALE = 1;
11
  const MAX_HEALTH = 1000;
12
  const ENEMY_MOVE_SPEED = 0.1;
13
+ const ENEMY_COUNT_MAX = 3;
14
  const PARTICLE_COUNT = 15;
15
  const BUILDING_COUNT = 50;
16
  const ENEMY_CONFIG = {
 
1386
 
1387
  async initialize() {
1388
  try {
 
 
 
 
 
 
1389
  // BGM이 아직 μž¬μƒλ˜μ§€ μ•Šμ€ κ²½μš°μ—λ§Œ μž¬μƒ
1390
  if (!this.bgmPlaying && !this.bgm) {
1391
  this.bgm = new Audio('sounds/BGM.ogg');
 
2003
 
2004
  spawnEnemies() {
2005
  const spawnEnemy = () => {
2006
+ if (this.enemies.length < 3 && !this.isGameOver) { // μ΅œλŒ€ 3λŒ€λ‘œ μ œν•œ
2007
  const position = this.getValidEnemySpawnPosition();
2008
  if (position) {
2009
  const type = Math.random() < 0.7 ? 'tank' : 'heavy';