+from panda3d.core import NodePath
from pmachines.scene import Scene
from pmachines.items.box import Box
from pmachines.items.shelf import Shelf
from pmachines.items.domino import Domino, DownStrategy
from pmachines.items.basketball import Basketball
from pmachines.items.teetertooter import TeeterTooter
+from ya2.p3d.gfx import P3dGfxMgr
class SceneDomino(Scene):
return _('Domino')
def _set_items(self):
- self.items = []
#self.items += [Box(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
#self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, mass=0, pos=(-1.2, 0, -.6))]
#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', (35, 60))
+ self._set_test_item('drag_stop_0', (-1.82, .06))
+ self._set_test_item('drag_stop_1', (.49, .06))
+ self._set_test_item('drag_stop_2', (-1.54, .06))
+ self._set_test_item('drag_start_1', (-1.54, .4))
+ self._set_test_item('drag_stop_3', (-1.05, .4))
+
def _instr_txt(self):
txt = _('Scene: ') + self.name() + '\n\n'
txt += _('Goal: every domino piece must fall\n\n')