Merge lp:virqua into lp:virqua/preview
Proposed by
Daniel Phillips
Status: | Merged |
---|---|
Approved by: | Daniel Phillips |
Approved revision: | 3 |
Merged at revision: | 3 |
Proposed branch: | lp:virqua |
Merge into: | lp:virqua/preview |
Diff against target: |
413 lines (+139/-141) 16 files modified
config.py (+1/-1) constants.py (+17/-1) decofish.py (+62/-0) exfighter.py (+9/-0) exhunter.py (+9/-0) exprey.py (+9/-0) fish.py (+14/-0) fish/__init__.py (+0/-14) fish/cloak.py (+0/-10) fish/decofish.py (+0/-51) fish/exfighter.py (+0/-9) fish/exhunter.py (+0/-9) fish/exprey.py (+0/-9) fish/functions.py (+0/-32) functions.py (+1/-1) main.py (+17/-4) |
To merge this branch: | bzr merge lp:virqua |
Related bugs: | |
Related blueprints: |
VirQua Environment Code
(Essential)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Daniel Phillips | Approve | ||
Review via email:
|
Description of the change
Updated preview due to changes in how the environment will interact with the fish.
update() is the only method in a fish class that should move the rect or change the fish's direction.
The other methods are just to provide info to the environment or obtain updated information from the environment. The new info is used the next time update() runs. See decofish.py for an almost-complete fish.
Also, everything has moved into the same directory level so ignore the mention of fish/ in readme.txt.
To post a comment you must log in.
Approved since people need to know how to write fish the right way.
Using anything other then update() to tell the fish to move would make the environment code a lot more work.
Basically, I can shove all the fish in pygame sprite-groups then call update() on the sprite-group which will automatically call update() on each of the fish.
Also, I can call draw() on the sprite-group to easily repaint all the fish.