On Apr 9, 2009, at 16:12, Braindamage <braindam...@lowtown.se> wrote:

>
>
> On 9 Apr, 21:28, Tristam MacDonald <swiftco...@gmail.com> wrote:
>> On Thu, Apr 9, 2009 at 3:13 PM, Braindamage  
>> <braindam...@lowtown.se> wrote:
>>
>>> This is so fundamental and simple that it makes me crazy that it  
>>> wont
>>> work.
>>
>>> Simple question really; Does calling sprite_instance.delete() remove
>>> it from it's groups and batch to never be rendered again? Somehow my
>>> animation sprites keep on animating after I've called it's delete
>>> method, and I can't find any other way to kill a sprite!
>>
>>> I've got a character class that keeps one of the sprite animations  
>>> at
>>> the time in it's image attribute depending on the character's state.
>>> When the state is changed, I call delete on the sprite in self.image
>>> and replace it with a brand new sprite with the next animation. Each
>>> time I do this, it stacks up animations in the same location.
>>
>>> Is it a bug with animated sprites that it refuses termination or  
>>> have
>>> I put the sprite somewhere where I simply can't remove it?
>>
>> Try setting sprite.group and sprite.batch to None. This should  
>> ensure it is
>> removed from the batch/group.
>>
>> --
>> Tristam MacDonaldhttp://swiftcoder.wordpress.com/
>
>
> I've tried doing this to be absolutely sure, but it still wont remove
> it from the screen:
> image.group = None
> image.batch = None
> image.delete()
> image = None
> ...
> image = Sprite(...)
>
> I can't see how I could be any more thorough than that... It should be
> completely wiped out. There's no more references of it anywhere (I'm
> quite certain), unless it still just haven't gotten the message that
> it shouldn't be in the batch.
>

Really silly question, but are you clearing the screen?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to pyglet-users@googlegroups.com
To unsubscribe from this group, send email to 
pyglet-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to