示例#1
0
    def __init__(self, robot, actions):
        Action.__init__(self, robot)
        self._actions = actions
        self._cursor = 0

        for ac in self._actions:
            ac.event_done = SequenceAction.FinishNormal
示例#2
0
文件: shoot.py 项目: pluskid/irobot2
 def __init__(self, robot, stype, strike):
     Action.__init__(self, robot)
     self._stype = stype
     self._strike = strike
     self._state = self.NOT_CHARGED
示例#3
0
文件: shoot.py 项目: pluskid/irobot2
 def __init__(self, robot, dest, stype, strike):
     Action.__init__(self, robot)
     aturn  = AcTurn(robot, dest-robot['k.position'])
     ashoot = AcShoot(robot, stype, strike)
     self._action = SequenceAction(robot, [aturn, ashoot])