Ignore:
Timestamp:
09/05/13 22:37:26 (8 years ago)
Author:
David Sharpe
Branch:
default
Phase:
public
Rebase:
36376630353139353836626165396336663535386431643932383332613364336634636231386363
Message:

Basic claw attack, stealing liberally from other people's code! ;)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r308 r312  
    88    COLLISION_TYPE_WALL, COLLISION_TYPE_PLAYER, CALLBACK_COLLIDERS)
    99from nagslang.enemies import DeadEnemy
    10 from nagslang.events import ScreenChange, DoorEvent, FireEvent, EnemyDeathEvent
     10from nagslang.events import ScreenChange, DoorEvent, FireEvent, EnemyDeathEvent, ClawEvent
    1111from nagslang.level import Level
    1212from nagslang.screens.base import Screen
    13 from nagslang.game_object import Bullet
     13from nagslang.game_object import Bullet, ClawAttack
    1414from nagslang.sound import sound
    1515
     
    157157                                   ev.enemy_type)
    158158            self._drawables.add(dead_enemy)
     159        elif ClawEvent.matches(ev):
     160            claw_attack = ClawAttack(self.space, ev.source, ev.vector,
     161                                     ev.source_collision_type)
     162            self._drawables.add(claw_attack)
    159163        self.keys.handle_event(ev)
    160164
Note: See TracChangeset for help on using the changeset viewer.