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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109
  1. from enum import Enum
  2. from typing import List, Dict
  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. BlackRoom = 5
  15. Gate = 6
  16. HiddenGate = 7
  17. class ShapeType(Enum):
  18. NullShapeType = 0
  19. Square = 1
  20. Circle = 2
  21. class PlayerType(Enum):
  22. NullPlayerType = 0
  23. StudentPlayer = 1
  24. TrickerPlayer = 2
  25. class PropType(Enum):
  26. NullPropType = 0
  27. PropType1 = 1
  28. class StudentType(Enum):
  29. NullStudentType = 0
  30. StudentType1 = 1
  31. class TrickerType(Enum):
  32. NullTrickerType = 0
  33. TrickerType1 = 1
  34. class StudentBuffType(Enum):
  35. NullStudentBuffType = 0
  36. StudentBuffType1 = 1
  37. class TrickerBuffType(Enum):
  38. NullTrickerBuffType = 0
  39. TrickerBuffType1 = 1
  40. class StudentState(Enum):
  41. NullStudentState = 0
  42. Idle = 1
  43. Learning = 2
  44. Fail = 3
  45. Emotional = 4
  46. Quit = 5
  47. Graduated = 6
  48. class Player:
  49. x: int
  50. y: int
  51. speed: int
  52. viewRange: int
  53. playerID: int
  54. guid: int
  55. radius: int
  56. timeUntilSkillAvailable: float
  57. playerType: PlayerType
  58. prop: PropType
  59. place: PlaceType
  60. class Student(Player):
  61. state: StudentState
  62. determination: int
  63. failNum: int
  64. failTime: float
  65. emoTime: float
  66. studentType: StudentType
  67. buff: List[StudentBuffType]
  68. class Tricker(Player):
  69. damage: int
  70. movable: bool
  71. trickerType: TrickerType
  72. buff: List[TrickerBuffType]
  73. class Prop:
  74. x: int
  75. y: int
  76. size: int
  77. guid: int
  78. type: PropType
  79. place: PlaceType
  80. facingDirection: float
  81. isMoving: bool