示例#1
0
    def __init__(self, terrain):
        unit.Unit.__init__(self, terrain)

        self.active_listeners = manager.init_listener()
        self.active_listeners.update(
            [
                (e.FLOWER_UP, self.action_up),
                (e.FLOWER_DOWN, self.action_down),
                (e.FLOWER_LEFT, self.action_left),
                (e.FLOWER_RIGHT, self.action_right),
                (e.FLOWER_SKIP, self.action_skip),
            ]
        )

        self.growth = 5
示例#2
0
    def __init__(self, terrain, executor):
        unit.Unit.__init__(self, terrain)

        self.active_listeners = manager.init_listener()
        self.active_listeners.update(
            [
                (e.FLOWER_SEED, self.action_seed),
                (e.FLOWER_THORN, self.action_thorns),
                (e.FLOWER_POISON, self.action_poison),
                (e.FLOWER_CANCEL, self.action_cancel),
            ]
        )

        self.executor = executor

        manager.restore_default()
        manager.update_current(unit.Unit.active().active_listeners)
示例#3
0
    def __init__(self, terrain):
        unit.Unit.__init__(self, terrain)

        self.active_listeners = manager.init_listener()
        self.active_listeners.update([(e.AI_SKIP, self.action_skip)])