Changeset 335:78b805549b4e for nagslang


Ignore:
Timestamp:
Sep 6, 2013, 9:48:48 AM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Message:

More interesting claw attack.

Location:
nagslang
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r333 r335  
    420420class ClawAttack(GameObject):
    421421    def __init__(self, space, position, vector, damage):
    422         body = make_body(1, pymunk.inf, position + vector)
     422        body = make_body(1, pymunk.inf, position)
    423423        body.angle = vector.angle
    424424        self.shape = pymunk.Circle(body, 30)
     
    432432                transforms=(FLIP_H,))),
    433433        )
     434        self.physicser.apply_impulse(vector)
    434435
    435436    def update(self, dt):
    436437        super(ClawAttack, self).update(dt)
    437         if self.lifetime > 0.2:
     438        if self.lifetime > 0.1:
    438439            self.physicser.remove_from_space()
    439440            self.remove = True
  • nagslang/protagonist.py

    r334 r335  
    265265
    266266    def claw(self):
    267         vec = vec_from_angle(self.angle, 30)
     267        vec = vec_from_angle(self.angle, 300)
    268268        ClawEvent.post(self.physicser.position, vec, CLAW_DAMAGE)
    269269
Note: See TracChangeset for help on using the changeset viewer.