> What looks bad is that both Unit and LifeBar are fidling with the
> presentation of life value.
> Moving the color, text and background logic from Unit to LifeBar
> would left the responsibility of life value presentation entirely to
> LifeBar, which is good for separation of concerns.

Thanks for your comments! You are completely right of course, I never
had a separate class for it, until I included your implementation. Of
course I should move the "old" updateBar() function and the other life
bar related code in the Unit class to the LifeBar object. I just quickly
put this together, but I'll put it on my to do list :)

I've been working on this game on and off for the last 3 years, so by
the current speed, you can expect a fully functional game with clean
code by 2016 ;)



> I noticed you included in your code a 'copyright <my name>' for a
> class I posted in this thread. Don't do that please. I understand it
> was meant as a credit, but it hinders code reuse,  and annoys people.
> Just saying, not mad at it.

Is it the (c) specifically or the fact that your name is there?
Personally I think it's only just to credit the original authors, and it
never hinders me, but I'm just one person of course :)

Regards,

Ivo


-- 
You received this message because you are subscribed to the Google Groups 
"cocos2d discuss" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cocos-discuss?hl=en.

Reply via email to