android - Painting texture in cocos2d-x -
i working on baby app , there bath scene in user applies soap baby's body. drags soap bar on body painting , soap bubbles appear on body wherever soap applied painting soap texture brush (soap bar).
i have soap bar sprite , texture sprite , baby sprite.
how can achieve effect ?
edit: have bubbles sprite. , want wherever user touches, opacity of point in sprite becomes 1 or 255. in start opacity 0 won't visible , when user drags soap on baby's body opacity become 255 every point user drags soap over.
i think achieve following way:
- place "baby bubbles" in cclayer (as sprite). background.
- create second layer in front of first , put cctexture2d it, filled white.
- whenever user touches screen, @ point, draw brush sprite texture. brush sprite must draw transparency.
was helpful?
Comments
Post a Comment