comparison nagslang/game_object.py @ 563:a68951a9fe40

More Cargo bay.
author David Sharpe <decoydavid@gmail.com>
date Sat, 07 Sep 2013 22:26:53 +0200
parents 57efcd81647b
children 33f28f1cb0eb 6d2f6fcd914d
comparison
equal deleted inserted replaced
562:66dd5ac002b7 563:a68951a9fe40
359 ("state_source", "puzzler")] 359 ("state_source", "puzzler")]
360 360
361 361
362 class SokoBox(GameObject): 362 class SokoBox(GameObject):
363 def __init__(self, space, position): 363 def __init__(self, space, position):
364 body = make_body(1, pymunk.inf, position) 364 body = make_body(1, pymunk.inf, position, 0.2)
365 self.shape = pymunk.Poly( 365 self.shape = pymunk.Poly(
366 body, [(-40, -40), (40, -40), (40, 40), (-40, 40)]) 366 body, [(-40, -40), (40, -40), (40, 40), (-40, 40)])
367 self.shape.friction = 0.5 367 self.shape.friction = 0.5
368 self.shape.collision_type = COLLISION_TYPE_FURNITURE 368 self.shape.collision_type = COLLISION_TYPE_FURNITURE
369 super(Box, self).__init__( 369 super(SokoBox, self).__init__(
370 SingleShapePhysicser(space, self.shape), 370 SingleShapePhysicser(space, self.shape),
371 render.ImageRenderer( 371 render.ImageRenderer(
372 resources.get_image('objects', 'sokobox.png')), 372 resources.get_image('objects', 'sokobox.png')),
373 ) 373 )
374 374