Changeset 318:26d1978fa1da for nagslang


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

BOX is no longer accurate

Location:
nagslang
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • nagslang/constants.py

    r292 r318  
    2020COLLISION_TYPE_WALL = 2
    2121COLLISION_TYPE_SWITCH = 3
    22 COLLISION_TYPE_BOX = 4
     22COLLISION_TYPE_FURNITURE = 4
    2323COLLISION_TYPE_ENEMY = 5
    2424COLLISION_TYPE_DOOR = 6
     
    2626COLLISION_TYPE_WEREWOLF_ATTACK = 8
    2727
    28 SWITCH_PUSHERS = [COLLISION_TYPE_PLAYER, COLLISION_TYPE_BOX]
     28SWITCH_PUSHERS = [COLLISION_TYPE_PLAYER, COLLISION_TYPE_FURNITURE]
    2929
    3030CALLBACK_COLLIDERS = [
     
    3232    # fire callbacks on the game object associated with the shape.
    3333    COLLISION_TYPE_SWITCH,
    34     COLLISION_TYPE_BOX,
     34    COLLISION_TYPE_FURNITURE,
    3535    COLLISION_TYPE_ENEMY,
    3636    COLLISION_TYPE_DOOR,
  • nagslang/enemies.py

    r310 r318  
    55
    66from nagslang import render
    7 from nagslang.constants import (COLLISION_TYPE_ENEMY, COLLISION_TYPE_BOX,
     7from nagslang.constants import (COLLISION_TYPE_ENEMY, COLLISION_TYPE_FURNITURE,
    88                                ZORDER_MID)
    99from nagslang.events import EnemyDeathEvent
     
    6969            body, [(-20, -20), (20, -20), (20, 20), (-20, 20)])
    7070        self.shape.friction = 0.5
    71         self.shape.collision_type = COLLISION_TYPE_BOX
     71        self.shape.collision_type = COLLISION_TYPE_FURNITURE
    7272        super(DeadEnemy, self).__init__(
    7373            SingleShapePhysicser(space, self.shape),
  • nagslang/game_object.py

    r313 r318  
    1010from nagslang.mutators import FLIP_H
    1111from nagslang.constants import (
    12     SWITCH_PUSHERS, COLLISION_TYPE_SWITCH, COLLISION_TYPE_BOX, ZORDER_LOW,
    13     ZORDER_FLOOR, COLLISION_TYPE_DOOR, COLLISION_TYPE_PROJECTILE,
    14     COLLISION_TYPE_WEREWOLF_ATTACK)
     12    COLLISION_TYPE_DOOR, COLLISION_TYPE_FURNITURE, COLLISION_TYPE_PROJECTILE,
     13    COLLISION_TYPE_SWITCH, COLLISION_TYPE_WEREWOLF_ATTACK,
     14    SWITCH_PUSHERS, ZORDER_FLOOR, ZORDER_LOW)
    1515from nagslang.resources import resources
    1616from nagslang.events import DoorEvent
     
    240240            body, [(-20, -20), (20, -20), (20, 20), (-20, 20)])
    241241        self.shape.friction = 0.5
    242         self.shape.collision_type = COLLISION_TYPE_BOX
     242        self.shape.collision_type = COLLISION_TYPE_FURNITURE
    243243        super(Box, self).__init__(
    244244            SingleShapePhysicser(space, self.shape),
Note: See TracChangeset for help on using the changeset viewer.