dev-jjjjjeong-bin / Invaders-SDP

3 stars 15 forks source link

[Bug] The game freezes when the character dies after being hit by a box. #86

Closed RyuJeMu closed 1 week ago

RyuJeMu commented 1 week ago

Problem Description

When the player dies after being hit by a box, the game freezes and stop screen.

Exception in thread "main" java.lang.NullPointerException: Cannot read the array length because "image" is null at engine.DrawManager.drawEntity(DrawManager.java:253) at screen.GameScreen.draw(GameScreen.java:438) at screen.GameScreen.update(GameScreen.java:350) at screen.Screen.run(Screen.java:89) at screen.GameScreen.run(GameScreen.java:253) at engine.Frame.setScreen(Frame.java:59) at engine.Core.main(Core.java:172)

Error

It is confirmed that the screen freezes when the player dies after being hit by a box, regardless of whether it happens at the first or second attempt.

image

Todo List

  1. Start the game and proceed with the gameplay.
  2. When the player dies, make sure they die by being hit by a box.
  3. Check if the screen freezes.
Guicha commented 1 week ago

We fixed this issue in the latest PR thank you for your feedback !