Closed Dream-no24 closed 4 days ago
The method for dropping items from magenta mobs works as follows:
However, enemies that die due to the explosive mob are not killed by the _destroy called from _manageCollisions_additem but rather by the chain explosion method explosive from the EnemyShipFormation class. In other words, magenta mobs killed by the explosion method in EnemyShipFormation didn’t drop items because they were not detected as dead in GameScreen.
To fix this, I modified the code so that instead of dropping an item when a collision occurs, items are dropped when _destroy is called and the magenta mob dies.
After testing, I confirmed that when the Magenta enemy is destroyed by an explosive enemy, the item is dropped correctly.
Excellent work, thank you!
https://github.com/user-attachments/assets/afa43f08-8185-4541-8dd0-54449e8e633f
Problem Description
Currently, purple enemies are supposed to drop items upon death. However, when they are killed by exploding enemy ships, they do not drop any items.
Todo List
Feature Description
Ensure purple enemies drop items in all situations, including when killed by exploding enemy ships.
Additional Information
Purple enemies that drop items and explosive enemyship are developed by Team Enemy. The interaction between exploding ships and item drops may need additional logic.