Skip to content

Commit

Permalink
junkdog#385: javadoc LinkListener
Browse files Browse the repository at this point in the history
  • Loading branch information
junkdog committed Apr 26, 2016
1 parent 30fb50c commit 1ef6de1
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions artemis/src/main/java/com/artemis/link/LinkListener.java
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);
}

0 comments on commit 1ef6de1

Please sign in to comment.