public WorldManager(GameComponent myComponent, JPanel myCanvas, Collection<SimObject> objects) {
		if (NetClient.isNet() || NetServer.isNet()) {
			this.timer = new WorldTimer(this);
			Thread t = new Thread(this.timer);
			t.start();
			this.timeT = t;
		}
		if (NetClient.isNet()) {
			NetClient.setWorld(this);
		}
		else if (NetServer.isNet()) {
			NetServer.setWorld(this);
		}
		this.myComponent = myComponent;
		this.myCanvas = myCanvas;
		this.physicsWorld = new World(GRAVITY);
		this.allObjects = new TreeSet<SimObject>();
		this.pendingObjects = new HashSet<SimObject>();
		this.doomedObjects = new HashSet<SimObject>();
		for (SimObject obj : objects) this.addObject(obj);
		this.physicsWorld.setContactListener(new ContactListener() {

			@Override
			public void beginContact(Contact arg0) {
				Body b1 = arg0.getFixtureA().getBody();
				Body b2 = arg0.getFixtureB().getBody();
				SimObject o1 = null, o2 = null;
				for (SimObject obj : WorldManager.this.allObjects) {
					if (obj.getBody() == null) continue;
					if (obj.getBody().equals(b1)) o1 = obj;
					if (obj.getBody().equals(b2)) o2 = obj;
				}
				o1.collideWith(o2);
				o2.collideWith(o1);
			}

			@Override
			public void endContact(Contact arg0) {
				// nope
				
			}

			@Override
			public void postSolve(Contact arg0, ContactImpulse arg1) {
				// no
				
			}

			@Override
			public void preSolve(Contact arg0, Manifold arg1) {
				// definitely not
				
			}
			
		});
	}