Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot animate sprite from constructor. #65

Open
icarito opened this issue Jun 12, 2014 · 1 comment
Open

Cannot animate sprite from constructor. #65

icarito opened this issue Jun 12, 2014 · 1 comment

Comments

@icarito
Copy link
Contributor

icarito commented Jun 12, 2014

Here's a full traceback of what happens when I try:

[icarito@aiki Comodo.activity]$ python2 run_game.py
CISC374 Launcher
===================================
launcher version:        0.3       
spyral version:          0.9.7     
resolution:              Autodetect
fullscreen:              False     
Max FPS:                 30        
Locale:                  default   
Profiling:               Disabled  
Traceback (most recent call last):
  File "run_game.py", line 93, in <module>
    launch()
  File "run_game.py", line 74, in launch
    game.main()
  File "/home/icarito/Proyectos/sugar-build/activities/Comodo.activity/game/__init__.py", line 5, in main
    spyral.director.push(escena.Juego(activity))
  File "/home/icarito/Proyectos/sugar-build/activities/Comodo.activity/game/escena.py", line 70, in __init__
    self.fondo1 = Fondo(self, 1)
  File "/home/icarito/Proyectos/sugar-build/activities/Comodo.activity/game/escena.py", line 20, in __init__
    self.avanzo()
  File "/home/icarito/Proyectos/sugar-build/activities/Comodo.activity/game/escena.py", line 25, in avanzo
    self.animate(animacion)
  File "/home/icarito/Proyectos/sugar-build/activities/Comodo.activity/libraries/spyral/spyral/sprite.py", line 551, in animate
    e)
  File "/home/icarito/Proyectos/sugar-build/activities/Comodo.activity/libraries/spyral/spyral/event.py", line 125, in handle
    scene._handle_event(event_name, event)
AttributeError: 'NoneType' object has no attribute '_handle_event'
@acbart
Copy link
Member

acbart commented Dec 29, 2014

Hmm... You may need to pass in the scene explicitly - otherwise it tries to guess the scene by looking at the top of the director's stack, which hasn't finished being pushed to yet. But if I'm reading htings correctly, that's all happening behind the API calls? Need to dig in further...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants