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()
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()