ya2 · news · projects · code · about

855fd7b58d1fc441e9a18a8ad5c7ba203968ba87
[pmachines.git] / pmachines / items / shelf.py
1 from panda3d.bullet import BulletBoxShape
2 from pmachines.items.item import Item
3
4
5 class Shelf(Item):
6
7 def __init__(self, world, plane_node, cb_inst, curr_bottom, repos, json, mass=1, pos=(0, 0, 0), r=0, count=0, restitution=.5, friction=.6):
8 super().__init__(world, plane_node, cb_inst, curr_bottom, repos, 'assets/models/bam/shelf/shelf.bam', json, mass=mass, pos=pos, r=r, count=count, restitution=restitution, friction=friction)
9
10 def _set_shape(self, apply_scale=True):
11 self.node.add_shape(BulletBoxShape((1, .5, .05)))