actor.py 841B

12345678910111213141516171819202122232425262728293031
  1. # coding: utf-8
  2. import pyglet
  3. from synergine2.simulation import Subject
  4. from synergine2_cocos2d.actor import Actor
  5. from synergine2_cocos2d.animation import ANIMATION_WALK
  6. class Man(Actor):
  7. animation_image_paths = {
  8. ANIMATION_WALK: [
  9. 'actors/man.png',
  10. 'actors/man_w1.png',
  11. 'actors/man_w2.png',
  12. 'actors/man_w3.png',
  13. 'actors/man_w4.png',
  14. 'actors/man_w5.png',
  15. 'actors/man_w6.png',
  16. 'actors/man_w7.png',
  17. ],
  18. # ANIMATION_CRAWL: [
  19. # 'actors/man_c1.png',
  20. # 'actors/man_c2.png',
  21. # 'actors/man_c3.png',
  22. # 'actors/man_c4.png',
  23. # ]
  24. }
  25. def __init__(self, subject: Subject) -> None:
  26. super().__init__(pyglet.resource.image('actors/man.png'), subject=subject)