Mercurial > skaapsteker
changeset 100:3eafceff6293
Have monsters also collide with players as an interim solution while I relax, eat dinner and think about the best way to use the new collision layers.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Mon, 04 Apr 2011 19:20:05 +0200 |
parents | 086abc674cda |
children | b502e732f821 |
files | skaapsteker/sprites/player.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/skaapsteker/sprites/player.py Mon Apr 04 19:05:12 2011 +0200 +++ b/skaapsteker/sprites/player.py Mon Apr 04 19:20:05 2011 +0200 @@ -3,7 +3,7 @@ import pygame.transform import os -from skaapsteker.sprites.base import TILE_SIZE, PC_LAYER +from skaapsteker.sprites.base import TILE_SIZE, PC_LAYER, MONSTER_LAYER from skaapsteker.physics import Sprite from skaapsteker.constants import Layers from skaapsteker.data import get_files, load_image @@ -12,6 +12,7 @@ class Player(Sprite): collision_layer = PC_LAYER + collides_with = set([MONSTER_LAYER]) def __init__(self): Sprite.__init__(self)