fe07278144c47a04fc77b62e1f1a3ebfa9f92a57
1 from panda3d
.bullet
import BulletBoxShape
, BulletRigidBodyNode
, BulletGhostNode
2 from pmachines
.items
.item
import Item
7 def __init__(self
, world
, plane_node
, cb_inst
, curr_bottom
, repos
, mass
=1, pos
=(0, 0, 0), r
=0, count
=0):
8 super().__init
__(world
, plane_node
, cb_inst
, curr_bottom
, repos
, 'assets/gltf/domino/domino.gltf', mass
=mass
, pos
=pos
, r
=r
, count
=count
)
11 self
.node
.add_shape(BulletBoxShape((.1, .25, .5)))
14 class TargetDomino(Domino
):
16 def __init__(self
, world
, plane_node
, cb_inst
, curr_bottom
, repos
, mass
=1, pos
=(0, 0, 0), r
=0, count
=0, tgt_degrees
=0):
17 self
._tgt
_degrees
= tgt_degrees
18 super().__init
__(world
, plane_node
, cb_inst
, curr_bottom
, repos
, mass
=mass
, pos
=pos
, r
=r
, count
=count
)
20 def end_condition(self
):
21 return abs(self
._np
.get_r()) >= self
._tgt
_degrees