forked from junkdog/artemis-odb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,40 @@ | ||
package com.artemis.link; | ||
|
||
/** | ||
* Callbacks for links between entities. | ||
*/ | ||
public interface LinkListener { | ||
|
||
/** | ||
* Established connection between <code>sourceId:ComponentType:Field</code> | ||
* and <code>targetId</code>. | ||
* | ||
* @param sourceId entity owning component. | ||
* @param targetId a valid entity id. | ||
*/ | ||
void onLinkEstablished(int sourceId, int targetId); | ||
|
||
/** | ||
* Deletion of source entity or its component. | ||
* | ||
* @param sourceId entity owning component. | ||
*/ | ||
void onLinkKilled(int sourceId); | ||
|
||
/** | ||
* Target entity dead. | ||
* | ||
* @param sourceId entity owning component. | ||
* @param deadTargetId a valid entity id. | ||
*/ | ||
void onTargetDead(int sourceId, int deadTargetId); | ||
|
||
/** | ||
* Target entity has changed. | ||
* | ||
* @param sourceId entity owning component. | ||
* @param targetId a valid entity id. | ||
* @param oldTargetId previous entity id. | ||
*/ | ||
void onTargetChanged(int sourceId, int targetId, int oldTargetId); | ||
} |