blob: 937bd778a2f150e11a9f37821fa6bfbaa91f1da0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
package sims.test.gui
class DebugWorld extends sims.dynamics.World with Publisher {
override def +=(b: sims.dynamics.Body) = {
super.+=(b)
publish(BodyAdded(this, b))
}
override def -=(b: sims.dynamics.Body) = {
super.-=(b)
publish(BodyRemoved(this, b))
}
override def +=(j: sims.dynamics.Joint) = {
super.+=(j)
publish(JointAdded(this, j))
}
override def -=(j: sims.dynamics.Joint) = {
super.-=(j)
publish(JointRemoved(this, j))
}
override def step() = {
super.step()
publish(Stepped(this))
}
}
|