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 2.9 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. from enum import Enum
  2. from typing import List, Dict, Tuple
  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. ClassRoom = 4
  14. Gate = 5
  15. HiddenGate = 6
  16. Window = 7
  17. Door = 8
  18. Chest = 9
  19. class ShapeType(Enum):
  20. NullShapeType = 0
  21. Square = 1
  22. Circle = 2
  23. class PlayerType(Enum):
  24. NullPlayerType = 0
  25. StudentPlayer = 1
  26. TrickerPlayer = 2
  27. class PropType(Enum):
  28. NullPropType = 0
  29. PropType1 = 1
  30. class BulletType(Enum):
  31. NullBulletType = 0
  32. LineBullet = 1
  33. CommonBullet = 2
  34. FastBullet = 3
  35. OrdinaryBullet = 4
  36. AtomBomb = 5
  37. class StudentType(Enum):
  38. NullStudentType = 0
  39. StudentType1 = 1
  40. class TrickerType(Enum):
  41. NullTrickerType = 0
  42. TrickerType1 = 1
  43. class StudentBuffType(Enum):
  44. NullStudentBuffType = 0
  45. StudentBuffType1 = 1
  46. class TrickerBuffType(Enum):
  47. NullTrickerBuffType = 0
  48. TrickerBuffType1 = 1
  49. class PlayerState(Enum):
  50. NullState = 0
  51. Idle = 1
  52. Learning = 2
  53. Addicted = 3
  54. Quit = 4
  55. Graduated = 5
  56. Treated = 6
  57. Rescued = 7
  58. Stunned = 8
  59. Treating = 9
  60. Rescuing = 10
  61. Swinging = 11
  62. Attacking = 12
  63. Locking = 13
  64. Rummaging = 14
  65. Climbing = 15
  66. class MessageOfObj(Enum):
  67. NullMessageOfObj = 0
  68. StudentMessage = 1
  69. TrickerMessage = 2
  70. PropMessage = 3
  71. BulletMessage = 4
  72. BombedBulletMessage = 5
  73. ClassroomMessage = 6
  74. GateMessage = 7
  75. ChestMessage = 8
  76. class Player:
  77. x: int
  78. y: int
  79. speed: int
  80. viewRange: int
  81. playerID: int
  82. guid: int
  83. radius: int
  84. damage: int
  85. timeUntilSkillAvailable: List[float]
  86. playerType: PlayerType
  87. prop: List[PropType]
  88. place: PlaceType
  89. playerState: PlayerState
  90. class Student(Player):
  91. determination: int
  92. addiction: int
  93. studentType: StudentType
  94. buff: List[StudentBuffType]
  95. class Tricker(Player):
  96. trickerType: TrickerType
  97. buff: List[TrickerBuffType]
  98. class Prop:
  99. x: int
  100. y: int
  101. size: int
  102. guid: int
  103. type: PropType
  104. place: PlaceType
  105. facingDirection: float
  106. isMoving: bool
  107. class Bullet:
  108. bulletType: BulletType
  109. x: int
  110. y: int
  111. facingDirection: float
  112. guid: int
  113. team: PlayerType
  114. place: PlaceType
  115. bombRange: float
  116. class BombedBullet():
  117. bulletType: BulletType
  118. x: int
  119. y: int
  120. facingDirection: float
  121. mappingID: int
  122. bombRange: float
  123. class GameMap:
  124. classroomState: Dict[tuple[int, int], int]
  125. gateState: Dict[tuple[int, int], int]
  126. chestState: Dict[tuple[int, int], bool]
  127. doorState: Dict[tuple[int, int], bool]
  128. class GameInfo:
  129. gameTime: int
  130. subjectLeft: int
  131. studentGraduated: int
  132. studentQuited: int
  133. studentScore: int
  134. trickerScore: int
  135. gateOpened: bool
  136. hiddenGateRefreshed: bool
  137. hiddenGateOpened: bool