You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

structures.py 1.6 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. from enum import Enum
  2. from typing import List
  3. class GameState(Enum):
  4. NullGameState = 0
  5. GameStart = 1
  6. GameRunning = 2
  7. GameEnd = 3
  8. class PlaceType(Enum):
  9. NullPlaceType = 0
  10. Land = 1
  11. Wall = 2
  12. Grass = 3
  13. Machine = 4
  14. Gate = 5
  15. HiddenGate = 6
  16. class ShapeType(Enum):
  17. NullShapeType = 0
  18. Square = 1
  19. Circle = 2
  20. class PlayerType(Enum):
  21. NullPlayerType = 0
  22. HumanPlayer = 1
  23. ButcherPlayer = 2
  24. class PropType(Enum):
  25. NullPropType = 0
  26. PropType1 = 1
  27. class HumanType(Enum):
  28. NullHumanType = 0
  29. HumanType1 = 1
  30. class ButcherType(Enum):
  31. NullButcherType = 0
  32. ButcherType1 = 1
  33. class HumanBuffType(Enum):
  34. NullHumanBuffType = 0
  35. HumanBuffType1 = 1
  36. class ButcherBuffType(Enum):
  37. NullButcherBuffType = 0
  38. ButcherBuffType1 = 1
  39. class HumanState(Enum):
  40. NullHumanState = 0
  41. Idle = 1
  42. Fixing = 2
  43. Dying = 3
  44. OnChair = 4
  45. Dead = 5
  46. class Player:
  47. x: int
  48. y: int
  49. speed: int
  50. viewRange: int
  51. playerID: int
  52. guid: int
  53. radius: int
  54. timeUntilSkillAvailable: float
  55. playerType: PlayerType
  56. prop: PropType
  57. place: PlaceType
  58. class Human(Player):
  59. state: HumanState
  60. life: int
  61. hangedTime: int
  62. humanType: HumanType
  63. buff: List[HumanBuffType]
  64. class Butcher(Player):
  65. damage: int
  66. movable: bool
  67. butcherType: ButcherType
  68. buff: List[ButcherBuffType]
  69. class Prop:
  70. x: int
  71. y: int
  72. size: int
  73. guid: int
  74. type: PropType
  75. place: PlaceType
  76. facingDirection: float
  77. isMoving: bool