Re: [Super-tux-devel] To be done
Brought to you by:
wkendrick
From: Ingo R. <gr...@gm...> - 2004-04-02 13:59:31
|
Ricardo Cruz <ri...@ae...> writes: > I forgot to mention that I also think that there should be an Enemy > base class and each enemy would be derivated from that. That way > enemies creation would be simpler and flexibler and the bad_guy.c > wouldn't be so overcrowed. Of course, then there should be an > enemies directory, so that there won't too many files in src... The biggest problem with having different classes here is that a lot of enemies share different behaviours, ie. a lot of them walk on the ground and such, just doing different things on different events. Representing that doesn't work all that good in plain old derivated classes, it works much easier with a simple switch statement here and there. Sure one could now go on and make behaviours more flexible and seperate them itself out into seperate classes, but that could get a bit tricky and is something that is better done past Milestone1. -- WWW: http://pingus.seul.org/~grumbel/ JabberID: gr...@ja... ICQ: 59461927 |