actor.py 941B

12345678910111213141516171819202122232425262728293031323334
  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. 'actors/man_w8.png',
  18. 'actors/man_w9.png',
  19. 'actors/man_w10.png',
  20. ],
  21. # ANIMATION_CRAWL: [
  22. # 'actors/man_c1.png',
  23. # 'actors/man_c2.png',
  24. # 'actors/man_c3.png',
  25. # 'actors/man_c4.png',
  26. # ]
  27. }
  28. def __init__(self, subject: Subject) -> None:
  29. super().__init__(pyglet.resource.image('actors/man.png'), subject=subject)