Changeset 610:29d67c51fd33


Ignore:
Timestamp:
Sep 7, 2013, 10:39:41 PM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Message:

Better KeyedHatch?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r609 r610  
    108108        self._extra_shapes = extra_shapes
    109109        shape.physicser = self
     110        for es in extra_shapes:
     111            es.physicser = self
    110112
    111113    def get_shape(self):
     
    562564            body.world_to_local(tuple(end2)), 7)
    563565        self.shape.collision_type = COLLISION_TYPE_DOOR
     566        other_shape = pymunk.Circle(body, 30)
     567        other_shape.collision_type = COLLISION_TYPE_DOOR
     568        other_shape.sensor = True
    564569        self._key_item = key_item
    565570        super(KeyedHatch, self).__init__(
    566             SingleShapePhysicser(space, self.shape),
     571            MultiShapePhysicser(space, self.shape, other_shape),
    567572            render.KeyedHatchRenderer(
    568573                resources.get_image(
Note: See TracChangeset for help on using the changeset viewer.