ya2 · news · projects · code · about

abstract test positions in world units
[pmachines.git] / pmachines / scenes / scene_domino_box.py
index a4860589539a8c013057c867ba33bbd9b2f0ab71..08f03251da4050ba847648f21097e4c288ec9678 100644 (file)
@@ -13,7 +13,6 @@ class SceneDominoBox(Scene):
         return _('Domino and box')
 
     def _set_items(self):
-        self.items = []
         self.items += [Box(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, mass=5, count=2)]
         #self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=9)]
         self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, mass=0, pos=(-.56, 0, .21))]
@@ -45,6 +44,12 @@ class SceneDominoBox(Scene):
         #self.items += [Basketball(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
         #self.items += [TeeterTooter(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
 
+    def _define_test_items(self):
+        self._pos_mgr.register('drag_start_0', (65, 60))
+        self._set_test_item('drag_stop_0', (3.21, -.78))
+        self._set_test_item('drag_stop_1', (3.21, .33))
+        self._set_test_item('drag_stop_2', (2.16, 1.87))
+
     def _instr_txt(self):
         txt = _('Scene: ') + self.name() + '\n\n'
         txt += _('Goal: only the last piece of each row must be up\n\n')