On Wed, Apr 11, 2012 at 6:35 PM, Ivo F.A.C. Fokkema
<[email protected]>wrote:

>
>
> Alright, see attached! It's running in the test directory. It's not
> super clean code, and I actually still have a hack there to make the
> lifebar disappear when the unit dies, but oh well... you get the idea.
>
> Ivo
>
>
>

Looks good on screen.

The parts for text and color are small and clear.

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.

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.

cheers!

claudio

--

-- 
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