actor.py 976B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. from synergine2_cocos2d.animation import ANIMATION_CRAWL
  7. FLAG_DE = 'DE'
  8. FLAG_URSS = 'URSS'
  9. FLAG_COLORS = {
  10. FLAG_DE
  11. }
  12. class Man(Actor):
  13. animation_image_paths = {
  14. ANIMATION_WALK: [
  15. 'actors/man.png',
  16. 'actors/man_w1.png',
  17. 'actors/man_w2.png',
  18. 'actors/man_w3.png',
  19. 'actors/man_w4.png',
  20. 'actors/man_w5.png',
  21. 'actors/man_w6.png',
  22. 'actors/man_w7.png',
  23. ],
  24. ANIMATION_CRAWL: [
  25. 'actors/man_c1.png',
  26. 'actors/man_c2.png',
  27. 'actors/man_c3.png',
  28. 'actors/man_c4.png',
  29. ]
  30. }
  31. def __init__(
  32. self,
  33. subject: Subject,
  34. ) -> None:
  35. super().__init__(pyglet.resource.image('actors/man.png'), subject=subject)