ya2 · news · projects · code · about

json: instructions
[pmachines.git] / pmachines / scenes / scene_box.py
CommitLineData
4586cbf6 1from pmachines.scene import Scene
8c9bf90e
FC
2
3
4class SceneBox(Scene):
5
3fe18d73 6 filename = 'assets/scenes/box.json'
92c29685 7
aa577aeb
FC
8 # @staticmethod
9 # def name():
10 # return _('Box')
0eff64a3 11
98741d67
FC
12 # def _set_items(self):
13 # super()._set_items()
25c59f4a 14 # self.items += [Box(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
0eff64a3 15 #self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
1f76fd96
FC
16 # self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, mass=0, pos=(.46, 0, -3.95))]
17 # self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, mass=0, pos=(4.43, 0, -3.95))]
18 # self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, mass=0, pos=(-1.29, 0, .26), r=28.45)]
19 # self.items += [Shelf(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, mass=0, pos=(2.15, 0, -1.49), r=28.45)]
98741d67
FC
20 # self.items += [Box(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, pos=(-1.55, 0, 1.23), friction=.4)]
21 # self.items += [Box(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, pos=(4.38, 0, -3.35))]
22 # self.items[-1].set_strategy(HitStrategy(self.items[-2], self.items[-1].node, self.items[-1]._world))
9fc7f6fb
FC
23 #self.items += [Domino(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=2)]
24 #self.items += [TargetDomino(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, pos=(-1.14, 0, -.04), tgt_degrees=60)]
25 #self.items += [TargetDomino(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, pos=(-.49, 0, -.04), tgt_degrees=60)]
26 #self.items += [TargetDomino(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, pos=(0.94, 0, -.04), tgt_degrees=60)]
27 #self.items += [TargetDomino(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, pos=(1.55, 0, -.04), tgt_degrees=60)]
28 #self.items += [TargetDomino(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, pos=(2.09, 0, -.04), tgt_degrees=88)]
0eff64a3
FC
29 #self.items += [Basketball(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
30 #self.items += [TeeterTooter(self._world, self._mouse_plane_node, self.cb_inst, self.current_bottom, self.repos, count=3)]
31
da03f030
FC
32 # def _define_test_items(self):
33 # self._pos_mgr.register('drag_start_0', (65, 60))
34 # self._set_test_item('drag_stop_0', (.42, -3.29))
35 # self._set_test_item('drag_stop_1', (.42, -2.18))
36 # self._set_test_item('drag_stop_2', (.35, -1.06))
067a36db 37
aa577aeb
FC
38 # def _instr_txt(self):
39 # txt = _('Scene: ') + self.name() + '\n\n'
40 # txt += _('Goal: the left box must hit the right box\n\n')
41 # txt += _('keep \5mouse_l\5 pressed to drag an item\n\n'
42 # 'keep \5mouse_r\5 pressed to rotate an item')
43 # return txt
0e86689f 44
b8161d21
FC
45 # def _win_condition(self):
46 # return all(itm.strategy.win_condition() for itm in self.items) and not self._paused