예제 #1
0
 def __init__(self, window):
     self._log = slogging.get(__name__)
     self._window = window
     self._sprite_batch = pyglet.graphics.Batch()
     self.camera = TrackingCamera()
     self._register_draw_callback()
     self.log = slogging.get(__name__)
예제 #2
0
파일: player.py 프로젝트: potat0/catghost
    def __init__(self, game):
        self.log = slogging.get(__name__)
        self.game = game
        self._position = (200, 300)
        self._mass = 1
        self._radius = 14
        physics.Circle.__init__(self, self._position, self._mass, self._radius)

        self._control_body = pymunk.Body(pymunk.inf, pymunk.inf)
        self._control_body.position = self._position
        self._joint = pymunk.PivotJoint(self._body, self._control_body, (0, 0), (0, 0))
        self._joint.max_force = 20000
        self._joint.bias_coef = 0
        self.jump_state = jump_state_falling

        self.collision_type = collisiontypes.avatar
        self.add_to_physics_engine(game.get_physics_engine())
        self._input_request = InputRequest()
예제 #3
0
 def __init__(self):
     slogging.init()
     self.log = slogging.get(__name__)