Changeset 296:eb08426a58fe for nagslang


Ignore:
Timestamp:
Sep 5, 2013, 9:43:37 PM (7 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Message:

Levers look like levers.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/game_object.py

    r295 r296  
    77from nagslang import puzzle
    88from nagslang import render
     9from nagslang.mutators import FLIP_H
    910from nagslang.constants import (
    1011    SWITCH_PUSHERS, COLLISION_TYPE_SWITCH, COLLISION_TYPE_BOX, ZORDER_LOW,
     
    319320        super(ToggleSwitch, self).__init__(
    320321            SingleShapePhysicser(space, self.shape),
    321             render.ShapeStateRenderer(),
     322            render.ImageStateRenderer({
     323                True: resources.get_image('objects', 'lever.png'),
     324                False: resources.get_image(
     325                    'objects', 'lever.png', transforms=(FLIP_H,)),
     326            }),
    322327            puzzle.ParentAttrPuzzler('toggle_on'),
    323328            interactible=environment.Interactible(
Note: See TracChangeset for help on using the changeset viewer.