Beispiel #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)
Beispiel #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))
Beispiel #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()
Beispiel #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
Beispiel #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"
         },
     ]
Beispiel #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] = []
Beispiel #7
0
 def __init__(self):
     States.__init__(self)
     self.next = "menu"
Beispiel #8
0
 def __init__(self):
     States.__init__(self)
     self.next = "details"
Beispiel #9
0
 def __init__(self):
     States.__init__(self)
     self.next = "menu"
     self.config = get_game_config()