added debug mssages to Node
This commit is contained in:
parent
d2fce2161e
commit
59a7b0299f
1 changed files with 5 additions and 0 deletions
|
|
@ -4,6 +4,8 @@ import java.util.ArrayList;
|
|||
|
||||
import org.lwjgl.opengl.GL11;
|
||||
|
||||
import ei.engine.util.MultiPrintStream;
|
||||
|
||||
public class Node extends Sprite {
|
||||
/** the sprites of this node */
|
||||
protected ArrayList<Entity> entities;
|
||||
|
|
@ -20,6 +22,7 @@ public class Node extends Sprite {
|
|||
*/
|
||||
public boolean add(Entity s){
|
||||
if(!entities.contains(s)){
|
||||
MultiPrintStream.out.println("Adding Entity To Node("+getName()+"): "+s.getName());
|
||||
entities.add(s);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -47,6 +50,7 @@ public class Node extends Sprite {
|
|||
public boolean remove(String name){
|
||||
int i = getId(name);
|
||||
if(i >= 0){
|
||||
MultiPrintStream.out.println("Removing Entity From Node("+getName()+"): "+name);
|
||||
entities.remove(i);
|
||||
return true;
|
||||
}
|
||||
|
|
@ -55,6 +59,7 @@ public class Node extends Sprite {
|
|||
|
||||
public boolean remove(Entity e){
|
||||
if(entities.contains(e)){
|
||||
MultiPrintStream.out.println("Removing Entity From Node("+getName()+"): "+e.getName());
|
||||
entities.remove(e);
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue