Ignore:
Timestamp:
Sep 6, 2013, 11:10:53 PM (7 years ago)
Author:
Stefano Rivera <stefano@…>
Branch:
default
Message:

Use Result instead of ClawEvent?

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/protagonist.py

    r393 r394  
    1010    NON_GAME_OBJECT_COLLIDERS, BULLET_DAMAGE, BULLET_SPEED, CLAW_DAMAGE,
    1111    CMD_TOGGLE_FORM, CMD_ACTION)
    12 from nagslang.events import ClawEvent
    1312from nagslang.game_object import (
    14     GameObject, Physicser, Result, Bullet, make_body)
     13    GameObject, Physicser, Result, Bullet, ClawAttack, make_body)
    1514from nagslang.mutators import FLIP_H
    1615from nagslang.resources import resources
     
    313312                      / 20) + 30
    314313        vec = vec_from_angle(self.angle, claw_range)
    315         ClawEvent.post(self.physicser.position, vec, CLAW_DAMAGE)
     314        return Result(add=(ClawAttack(
     315            self.get_space(), self.physicser.position, vec, CLAW_DAMAGE),))
    316316
    317317    def in_wolf_form(self):
Note: See TracChangeset for help on using the changeset viewer.