Mercurial > rinkhals
comparison gamelib/animal.py @ 439:cf4b020e6385
Start of serializer for buildings and support for reference cycles.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sat, 21 Nov 2009 18:34:36 +0000 |
parents | 16437cf4a2b8 |
children | 7b5e4b6dd889 |
comparison
equal
deleted
inserted
replaced
438:16437cf4a2b8 | 439:cf4b020e6385 |
---|---|
52 def make(cls): | 52 def make(cls): |
53 """Override default Simplifiable object creation.""" | 53 """Override default Simplifiable object creation.""" |
54 return cls((0, 0)) | 54 return cls((0, 0)) |
55 make = classmethod(make) | 55 make = classmethod(make) |
56 | 56 |
57 def unsimplify(cls, value): | 57 def unsimplify(cls, *args, **kwargs): |
58 """Override default Simplifiable unsimplification.""" | 58 """Override default Simplifiable unsimplification.""" |
59 obj = super(Animal, cls).unsimplify(value) | 59 obj = super(Animal, cls).unsimplify(*args, **kwargs) |
60 obj.redraw() | 60 obj.redraw() |
61 return obj | 61 return obj |
62 unsimplify = classmethod(unsimplify) | 62 unsimplify = classmethod(unsimplify) |
63 | 63 |
64 def loop(self, tv, _sprite): | 64 def loop(self, tv, _sprite): |