sorry, in my prev response you must read 'ParticleSystem' in lieu of
'Sprite'.
The prev sugestion also remains, but also:
from the code you show,
class BoxBlur(ParticleSystem):
def __init__(self, playerbox):
self.playerbox= playerbox
you store the PlayerBox instance but not *add* as a child.
Supossing you did that, if you want the sprite image rotate 180 relative to
the particle system, you can
# this is in the BoxBlur class
def update(self):
self.position = self.playerbox.position
self.rotation = 180-self.playerbox.rotation
I followed the style from your snippet, but it looks something funny to
propagate position and rotation from child to parent; I would go the other
way
# this is in the BoxBlur class
def update(self):
self.playerbox.position = self.position
self.playerbox.rotation = 180-self.rotation
hth
--
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
-~----------~----~----~----~------~----~------~--~---