Changeset 288:ddcfc159dc2a


Ignore:
Timestamp:
04/08/11 19:23:00 (12 years ago)
Author:
Simon Cross <hodgestar@…>
Branch:
default
Phase:
public
Message:

Combine 'fox' and 'player' sections in game.json.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • data/game.json

    r287 r288  
    44        "tails" : [],
    55        "cur_health" : 40,
    6         "max_health" : 40
     6        "max_health" : 40,
     7        "level": "temple",
     8        "doorway": "starting"
    79    },
    810    "missions": {
     
    4143        "theatre" : "theatre",
    4244        "town" : "town"
    43     },
    44     "player": {"level": "temple", "doorway": "starting"}
     45    }
    4546}
  • skaapsteker/levelscene.py

    r273 r288  
    2323
    2424        if doorway_def is not None:
    25             player_def = self.game_state.world.player
    26             player_def.level, player_def.doorway = doorway_def.split('.')
    27         self._level = level.Level(self.game_state.world.player.level, soundsystem)
     25            fox = self.game_state.world.fox
     26            fox.level, fox.doorway = doorway_def.split('.')
     27        self._level = level.Level(self.game_state.world.fox.level, soundsystem)
    2828        self._player_dead = False
    2929        self._dialogue = None
     
    4646
    4747    def setup_player(self):
    48         doorway = self._level.doorways[self.game_state.world.player.doorway]
     48        doorway = self._level.doorways[self.game_state.world.fox.doorway]
    4949        self._player = player.Player(self.game_state.world, self._soundsystem)
    5050        self._player.set_facing(doorway.facing)
Note: See TracChangeset for help on using the changeset viewer.