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 org.lwjgl.opengl.GL11;
|
||||||
|
|
||||||
|
import ei.engine.util.MultiPrintStream;
|
||||||
|
|
||||||
public class Node extends Sprite {
|
public class Node extends Sprite {
|
||||||
/** the sprites of this node */
|
/** the sprites of this node */
|
||||||
protected ArrayList<Entity> entities;
|
protected ArrayList<Entity> entities;
|
||||||
|
|
@ -20,6 +22,7 @@ public class Node extends Sprite {
|
||||||
*/
|
*/
|
||||||
public boolean add(Entity s){
|
public boolean add(Entity s){
|
||||||
if(!entities.contains(s)){
|
if(!entities.contains(s)){
|
||||||
|
MultiPrintStream.out.println("Adding Entity To Node("+getName()+"): "+s.getName());
|
||||||
entities.add(s);
|
entities.add(s);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -47,6 +50,7 @@ public class Node extends Sprite {
|
||||||
public boolean remove(String name){
|
public boolean remove(String name){
|
||||||
int i = getId(name);
|
int i = getId(name);
|
||||||
if(i >= 0){
|
if(i >= 0){
|
||||||
|
MultiPrintStream.out.println("Removing Entity From Node("+getName()+"): "+name);
|
||||||
entities.remove(i);
|
entities.remove(i);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
@ -55,6 +59,7 @@ public class Node extends Sprite {
|
||||||
|
|
||||||
public boolean remove(Entity e){
|
public boolean remove(Entity e){
|
||||||
if(entities.contains(e)){
|
if(entities.contains(e)){
|
||||||
|
MultiPrintStream.out.println("Removing Entity From Node("+getName()+"): "+e.getName());
|
||||||
entities.remove(e);
|
entities.remove(e);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue