當前位置: 首頁>>代碼示例>>Python>>正文


Python engine.Engine類代碼示例

本文整理匯總了Python中gemuo.engine.Engine的典型用法代碼示例。如果您正苦於以下問題:Python Engine類的具體用法?Python Engine怎麽用?Python Engine使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Engine類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。

示例1: __init__

    def __init__(self, client, path):
        Engine.__init__(self, client)

        self.player = client.world.player
        self.path = list(path)

        self._next_walk()
開發者ID:cculianu,項目名稱:gemuo,代碼行數:7,代碼來源:walk.py

示例2: __init__

    def __init__(self, client, goal):
        Engine.__init__(self, client)

        self.goal = goal

        d = deferred_skills(client)
        d.addCallbacks(self._got_skills, self._failure)
開發者ID:cculianu,項目名稱:gemuo,代碼行數:7,代碼來源:jojo.py

示例3: __init__

    def __init__(self, client, target):
        Engine.__init__(self, client)

        self.target = target

        d = deferred_find_item_in_backpack(client, lambda x: x.item_id == ITEM_BANDAGE)
        d.addCallbacks(self._found_bandage, self._failure)
開發者ID:cculianu,項目名稱:gemuo,代碼行數:7,代碼來源:heal.py

示例4: __init__

    def __init__(self, client, container, ids):
        Engine.__init__(self, client)
        self.container = container
        self.ids = ids

        d = OpenContainer(client, container).deferred
        d.addCallbacks(self._opened, self._failure)
開發者ID:cculianu,項目名稱:gemuo,代碼行數:7,代碼來源:items.py

示例5: __init__

    def __init__(self, client, map):
        Engine.__init__(self, client)
        self._map = map
        self.tries = 5

        print "Bank"
        self._walk()
開發者ID:cculianu,項目名稱:gemuo,代碼行數:7,代碼來源:lumber.py

示例6: __init__

    def __init__(self, client, server, port, channel):
        Engine.__init__(self, client)

        self.channel = channel
        self.irc = None

        d = reactor.connectTCP(server, port, self)
開發者ID:cculianu,項目名稱:gemuo,代碼行數:7,代碼來源:irc.py

示例7: __init__

    def __init__(self, client, responses):
        Engine.__init__(self, client)

        assert len(responses) > 0
        self.responses = list(responses)

        self.call_id = reactor.callLater(5, self._timeout)
開發者ID:cculianu,項目名稱:gemuo,代碼行數:7,代碼來源:menu.py

示例8: __init__

    def __init__(self, client, spell, target):
        Engine.__init__(self, client)

        self.spell = spell
        self.target = target

        self.target_mutex = client.target_mutex
        self.target_mutex.get_target(self._target_ok, self._target_abort)
開發者ID:cculianu,項目名稱:gemuo,代碼行數:8,代碼來源:magery.py

示例9: __init__

 def __init__(self, client, red_friends, house_rectangle):
     Engine.__init__(self, client)
     self.target = None
     self.red_friends = red_friends
     self.xmin = house_rectangle[0]
     self.xmax = house_rectangle[2]
     self.ymin = house_rectangle[1]
     self.ymax = house_rectangle[3]
開發者ID:cculianu,項目名稱:gemuo,代碼行數:8,代碼來源:housekeeper.py

示例10: __init__

    def __init__(self, client, map):
        Engine.__init__(self, client)

        self.map = map
        self.min_x, self.min_y = 1429,1540
        self.max_x, self.max_y = 1516,1734
        self.random = random.Random()
        self._next_walk()
開發者ID:cculianu,項目名稱:gemuo,代碼行數:8,代碼來源:stroll.py

示例11: __init__

 def __init__(self, client, itemid, amount):
     Engine.__init__(self, client)
     self.buy_items = list()
     self.vendor = None
     self.itemid = itemid
     self.amount = amount
     self.call_id = reactor.callLater(2, self._timeout)
     self.get_offer()
開發者ID:cculianu,項目名稱:gemuo,代碼行數:8,代碼來源:buy.py

示例12: __init__

    def __init__(self, client, items, container):
        Engine.__init__(self, client)

        self._items = []
        self._items.extend(items)
        self._container = container

        self._next()
開發者ID:cculianu,項目名稱:gemuo,代碼行數:8,代碼來源:restock.py

示例13: __init__

    def __init__(self, client, username, password, character):
        Engine.__init__(self, client)

        self._username = username
        self._password = password
        self._character = character

        self._client.send(p.AccountLogin(username, password))
開發者ID:cculianu,項目名稱:gemuo,代碼行數:8,代碼來源:login.py

示例14: __init__

    def __init__(self, client, to):
        Engine.__init__(self, client)

        self._to = to

        d = deferred_find_player_item(client, lambda x: x.item_id == ITEM_GOLD)
        # No gold is success, because this engine is meant for use
        # cases where you donate all your money to raise Karma
        d.addCallbacks(self._donate, self._success)
開發者ID:cculianu,項目名稱:gemuo,代碼行數:9,代碼來源:donate.py

示例15: __init__

 def __init__(self, client):
     Engine.__init__(self, client)
     self.mutex = thread.allocate_lock()
     self.entities = dict()
     self.player = None
     self.walk = None
     self.combatant = None
     self.map_width = None
     self.map_height = None
開發者ID:cculianu,項目名稱:gemuo,代碼行數:9,代碼來源:world.py


注:本文中的gemuo.engine.Engine類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。