Mercurial > fife-parpg
comparison clients/rio_de_hola/scripts/agents/hero.py @ 129:9a1529f9625e
* Indentation patch by GreyGhost
author | mvbarracuda@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Thu, 07 Aug 2008 15:46:46 +0000 |
parents | ae3b8139c7c7 |
children |
comparison
equal
deleted
inserted
replaced
128:6e1fd3571440 | 129:9a1529f9625e |
---|---|
20 self.idlecounter += 1 | 20 self.idlecounter += 1 |
21 if self.idlecounter % 7 == 0: | 21 if self.idlecounter % 7 == 0: |
22 heroTexts = TDS.readSetting("heroTexts", type='list', text=True) | 22 heroTexts = TDS.readSetting("heroTexts", type='list', text=True) |
23 txtindex = random.randint(0, len(heroTexts) - 1) | 23 txtindex = random.randint(0, len(heroTexts) - 1) |
24 instance.say(heroTexts[txtindex], 2500) | 24 instance.say(heroTexts[txtindex], 2500) |
25 | 25 |
26 def start(self): | 26 def start(self): |
27 self.idle() | 27 self.idle() |
28 | 28 |
29 def idle(self): | 29 def idle(self): |
30 self.state = _STATE_IDLE | 30 self.state = _STATE_IDLE |
31 self.agent.act('stand', self.agent.getFacingLocation()) | 31 self.agent.act('stand', self.agent.getFacingLocation()) |
32 | 32 |
33 def run(self, location): | 33 def run(self, location): |
34 self.state = _STATE_RUN | 34 self.state = _STATE_RUN |
35 self.agent.move('run', location, 4 * float(TDS.readSetting("TestAgentSpeed"))) | 35 self.agent.move('run', location, 4 * float(TDS.readSetting("TestAgentSpeed"))) |
36 | 36 |
37 def kick(self, target): | 37 def kick(self, target): |
38 self.state = _STATE_KICK | 38 self.state = _STATE_KICK |
39 self.agent.act('kick', target) | 39 self.agent.act('kick', target) |
40 | 40 |
41 def talk(self, target): | 41 def talk(self, target): |
42 self.state = _STATE_TALK | 42 self.state = _STATE_TALK |
43 self.agent.act('talk', target) | 43 self.agent.act('talk', target) |