public void depth(int depth)
	{
		lastDepth=this.depth;
		this.depth=depth;
		EntityEvent event=new EntityEvent(this);
		if(lastDepth!=this.depth)
			for(EntityListener listener:listeners)
				listener.entityDepthChange(event);
		
	}