aboutsummaryrefslogtreecommitdiff
path: root/src/test/scala/sims/test/gui/DebugWorld.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/scala/sims/test/gui/DebugWorld.scala')
-rw-r--r--src/test/scala/sims/test/gui/DebugWorld.scala29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/test/scala/sims/test/gui/DebugWorld.scala b/src/test/scala/sims/test/gui/DebugWorld.scala
new file mode 100644
index 0000000..937bd77
--- /dev/null
+++ b/src/test/scala/sims/test/gui/DebugWorld.scala
@@ -0,0 +1,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))
+ }
+} \ No newline at end of file