示例#1
0
 def __init__(self):
     States.__init__(self)
     self.next = "menu"
     self.color = pg.Color("black")
     self.FONT = pg.font.Font("freesansbold.ttf", 30)
     self.rect = pg.Rect(WORLD_WIDTH / 2 - 250, WORLD_HEIGH / 2, 50, 50)
     self.text = ""
     self.txt_surface = self.FONT.render(self.text, True, self.color)
示例#2
0
 def __init__(self):
     States.__init__(self)
     self.next = "menu"
     top_left = Point(WORLD_WIDTH / 2, 0)
     human_type = get_human_type()
     human_instance = HumanFactory(human_type,
                                   top_left.x + self.HERO_PLACEMENT.x,
                                   self.HERO_PLACEMENT.y)
     dog = Duchshund(self.HERO_PLACEMENT.x, self.HERO_PLACEMENT.y + 90)
     self.dog_stage = DuchshundStage(dog, Point(0, 0), (200, 150))
     self.human_stage = HumanStage(human_instance, top_left, (200, 250))
示例#3
0
 def __init__(self):
     States.__init__(self)
     MenuCore.__init__(self)
     self.next = "menu"
     self.options = [
         "The best scores", "About author", "Controls", "Main Menu"
     ]
     self.states_names_options = [
         "scores", "about_author", "controls", "menu"
     ]
     self.from_bottom = 100
     self.spacer = 75
     self.pre_render_options()
示例#4
0
 def __init__(self):
     States.__init__(self)
     MenuCore.__init__(self)
     self.next = "game"
     self.options = [
         "Play",
         "Choose heroes",
         "Details",
         "Quit",
     ]
     self.states_names_options = [
         "game",
         "picker_room",
         "details",
     ]  # last option is by default quit
     self.pre_render_options()
     self.from_bottom = 100
     self.spacer = 75
示例#5
0
 def __init__(self):
     States.__init__(self)
     self.FONT = pg.font.Font("freesansbold.ttf", 30)
     self.next = "details"
     self.controls_board = [
         {
             "description": "Human"
         },
         {
             "button": "w",
             "description": "jump"
         },
         {
             "button": "enter",
             "description": "shoot"
         },
         {
             "description": "Dog"
         },
         {
             "button": "space",
             "description": "jump"
         },
         {
             "button": "shift",
             "description": "shoot"
         },
         {
             "description": "Other"
         },
         {
             "button": "q",
             "description": "escape from view"
         },
         {
             "button": "r",
             "description": "repeat game"
         },
     ]
示例#6
0
 def __init__(self):
     States.__init__(self)
     self.next = "details"
     self.FONT = pg.font.Font("freesansbold.ttf", 30)
     self.board_of_scores: List[Scores] = []
示例#7
0
 def __init__(self):
     States.__init__(self)
     self.next = "menu"
示例#8
0
 def __init__(self):
     States.__init__(self)
     self.next = "details"
示例#9
0
 def __init__(self):
     States.__init__(self)
     self.next = "menu"
     self.config = get_game_config()