actor.py 1021B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. # coding: utf-8
  2. import pyglet
  3. from synergine2.config import Config
  4. from synergine2.simulation import Subject
  5. from synergine2_cocos2d.actor import Actor
  6. from opencombat.gui.animation import ANIMATION_WALK
  7. from opencombat.gui.animation import ANIMATION_CRAWL
  8. FLAG_DE = 'DE'
  9. FLAG_URSS = 'URSS'
  10. FLAG_COLORS = {
  11. FLAG_DE
  12. }
  13. class Man(Actor):
  14. animation_image_paths = {
  15. ANIMATION_WALK: [
  16. 'actors/man.png',
  17. 'actors/man_w1.png',
  18. 'actors/man_w2.png',
  19. 'actors/man_w3.png',
  20. 'actors/man_w4.png',
  21. 'actors/man_w5.png',
  22. 'actors/man_w6.png',
  23. 'actors/man_w7.png',
  24. ],
  25. ANIMATION_CRAWL: [
  26. 'actors/man_c1.png',
  27. 'actors/man_c2.png',
  28. 'actors/man_c3.png',
  29. 'actors/man_c4.png',
  30. ]
  31. }
  32. def __init__(
  33. self,
  34. config: Config,
  35. subject: Subject,
  36. ) -> None:
  37. super().__init__('actors/man.png', subject=subject, config=config)