示例#1
0
文件: worldstate.py 项目: bitcraft/mh
    def warpPlayer(self, area, position):
        """
        move player to another map
        """

        area.add(self.hero)
        area.setPosition(self.hero, position)
        sd.push(WorldState(area))
        sd.done()
示例#2
0
def bodyWarp(sender, **kwargs):
    area = sender
    body = kwargs['body']
    destination = kwargs['destination']
    state = kwargs['caller']

    if state == None:
        return

    if body == state.hero:
        sd.push(WorldState(destination))
        sd.done()