-
-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide explicit resurrection listener for CombatEntity.
- Fix issue where death and hit events were not fired on registered CombatEntityListeners. - Streamline API for removing listeners: Adjust method name to "removeListener" where possible.
- Loading branch information
1 parent
e87f708
commit 63fb8cf
Showing
8 changed files
with
80 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
src/de/gurkenlabs/litiengine/entities/CombatEntityResurrectListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package de.gurkenlabs.litiengine.entities; | ||
|
||
import java.util.EventListener; | ||
|
||
/** | ||
* This listener provides callbacks for when an {@code ICombatEntity} was resurrected. | ||
* | ||
* @see ICombatEntity#resurrect() | ||
*/ | ||
@FunctionalInterface | ||
public interface CombatEntityResurrectListener extends EventListener { | ||
/** | ||
* This method is called whenever a {@code ICombatEntity} was resurrected. | ||
* | ||
* @param entity | ||
* The combat entity that was resurrected. | ||
*/ | ||
public void resurrect(ICombatEntity entity); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters