Ignore:
Timestamp:
09/02/13 16:31:03 (8 years ago)
Author:
Jeremy Thurgood <firxen@…>
Branch:
default
Phase:
public
Rebase:
63393636353839336261366531323765373462396633643337663138353262663165393862306138
Message:

Two switch puzzle!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • nagslang/screens/area.py

    r133 r140  
    77from nagslang.constants import ZORDER_HIGH
    88from nagslang.events import ScreenChange
    9 from nagslang.game_object import FloorSwitch, FloorLight, PuzzleGlue, Box
     9from nagslang.game_object import (
     10    FloorSwitch, FloorLight, PuzzleGlue, Box, StateLogicalAndPuzzler)
    1011from nagslang.level import Level
    1112from nagslang.protagonist import Protagonist
     
    7879        glue = PuzzleGlue()
    7980        switch = FloorSwitch(self.space, (300, 400))
     81        switch2 = FloorSwitch(self.space, (300, 600))
    8082        light = FloorLight(self.space, (300, 500), 'switch')
    81         light2 = FloorLight(self.space, (250, 500), 'switch')
     83        light2 = FloorLight(self.space, (250, 500), 'both_switches')
    8284        light2.zorder = ZORDER_HIGH
    8385        glue.add_component('switch', switch.puzzler)
     86        glue.add_component('switch2', switch2.puzzler)
    8487        glue.add_component('light', light.puzzler)
    8588        glue.add_component('light2', light2.puzzler)
     89        glue.add_component(
     90            'both_switches', StateLogicalAndPuzzler('switch', 'switch2'))
    8691        self._drawables.add(switch)
     92        self._drawables.add(switch2)
    8793        self._drawables.add(light)
    8894        self._drawables.add(light2)
Note: See TracChangeset for help on using the changeset viewer.