@Override
public void onEvent(Event e) {
if(e != null){
if(e.getType().equals("Collision")){
CollisionEvent collis = (CollisionEvent) e;
SpriteComponent sprite = (SpriteComponent) collis.getCollidedWith().getSiblingByType(SpriteComponent.class.getName());
if(sprite != null){
sprite.setImageFilename("res/img/red_dot.png", true);
}
}else if(e.getType().equals("CollisionStopped")){
CollisionEvent collis = (CollisionEvent) e;
SpriteComponent sprite = (SpriteComponent) collis.getCollidedWith().getSiblingByType(SpriteComponent.class.getName());
if(sprite != null){
sprite.setImageFilename("res/img/dot.png", true);
}
}else if(e.getType().equals("MousePressed")){
Collection<Component> comps = ComponentSystem.getInstance().getAllComponents().getComponentsOfType(SpriteComponent.class.getName()).getAllComponents();