Ignore:
Timestamp:
09/06/13 16:41:29 (9 years ago)
Author:
David Sharpe
Branch:
default
Phase:
public
Message:

Tweaks to the claw attack.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/protagonist.py

    r341 r356  
     1import math
     2
    13import pymunk
    24import pymunk.pygame_util
     
    298300
    299301    def claw(self):
    300         vec = vec_from_angle(self.angle, 300)
     302        claw_range = (math.sqrt(math.pow(self.physicser.get_velocity()[0], 2) +
     303                                math.pow(self.physicser.get_velocity()[1], 2))
     304                      / 20) + 30
     305        vec = vec_from_angle(self.angle, claw_range)
    301306        ClawEvent.post(self.physicser.position, vec, CLAW_DAMAGE)
    302307
Note: See TracChangeset for help on using the changeset viewer.