Mercurial > fife-parpg
comparison demos/rio_de_hola/scripts/agents/cloud.py @ 499:3dff106b945b
Combined the settings extension with the editor settings module. It is now a little more robust. Note that the settings file format has changed.
All demos and tools now use the new settings extension.
author | prock@33b003aa-7bff-0310-803a-e67f0ece8222 |
---|---|
date | Fri, 14 May 2010 17:37:42 +0000 |
parents | 70697641fca3 |
children |
comparison
equal
deleted
inserted
replaced
498:5ff83f209333 | 499:3dff106b945b |
---|---|
26 import random | 26 import random |
27 | 27 |
28 _STATE_NONE, _STATE_FLOATING, _STATE_DISAPPEAR, _STATE_APPEAR = 0, 1, 2, 3 | 28 _STATE_NONE, _STATE_FLOATING, _STATE_DISAPPEAR, _STATE_APPEAR = 0, 1, 2, 3 |
29 | 29 |
30 class Cloud(Agent): | 30 class Cloud(Agent): |
31 def __init__(self, model, agentName, layer, uniqInMap=False): | 31 def __init__(self, settings, model, agentName, layer, uniqInMap=False): |
32 super(Cloud, self).__init__(model, agentName, layer, uniqInMap) | 32 super(Cloud, self).__init__(settings, model, agentName, layer, uniqInMap) |
33 self.state = _STATE_NONE | 33 self.state = _STATE_NONE |
34 | 34 |
35 def isOutOfBounds(self, c): | 35 def isOutOfBounds(self, c): |
36 return (c.x < 0) or (c.x > 100) or (c.y < 0) or (c.y > 100) | 36 return (c.x < 0) or (c.x > 100) or (c.y < 0) or (c.y > 100) |
37 | 37 |