Changeset 208:3d54fe7a2998


Ignore:
Timestamp:
Sep 3, 2013, 9:42:51 PM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
rebase_source:
114036dbed7f2754a8ce0e88ade7691d0179d29d
Message:

Fun with mass and friction.

Location:
nagslang
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nagslang/enemies.py

    r207 r208  
    4343
    4444    def _setup_physics(self, space, position):
    45         self._body = make_body(5, pymunk.inf, position, 0.8)
     45        self._body = make_body(10, pymunk.inf, position, 0.8)
    4646
    4747        self._shape = pymunk.Circle(self._body, 30)
    4848
    4949        self._shape.elasticity = 1.0
    50         self._shape.friction = 10.0
     50        self._shape.friction = 0.05
    5151        self._shape.collision_type = COLLISION_TYPE_ENEMY
    5252        self._physicser = SingleShapePhysicser(space, self._shape)
  • nagslang/game_object.py

    r207 r208  
    217217        self.shape = pymunk.Poly(
    218218            body, [(-20, -20), (20, -20), (20, 20), (-20, 20)])
     219        self.shape.friction = 0.5
    219220        self.shape.collision_type = COLLISION_TYPE_BOX
    220221        super(Box, self).__init__(
  • nagslang/protagonist.py

    r207 r208  
    4343            self.WOLF_FORM: pymunk.Circle(self._body, 30),
    4444        }
     45        self._shapes[self.HUMAN_FORM].friction = 1.0
     46        self._shapes[self.WOLF_FORM].friction = 0.05
    4547        self._physicsers = {}
    4648        for form, shape in self._shapes.iteritems():
    4749            shape.elasticity = 1.0
    48             shape.friction = 10.0
    4950            shape.collision_type = COLLISION_TYPE_PLAYER
    5051            self._physicsers[form] = SingleShapePhysicser(space, shape)
Note: See TracChangeset for help on using the changeset viewer.