MCPcopy Create free account
hub / github.com/marblexu/PythonPlantsVsZombies / initPlay

Method initPlay

source/state/level.py:111–129  ·  view source on GitHub ↗
(self, card_list)

Source from the content-addressed store, hash-verified

109 self.initPlay(self.panel.getSelectedCards())
110
111 def initPlay(self, card_list):
112 self.state = c.PLAY
113 if self.bar_type == c.CHOOSEBAR_STATIC:
114 self.menubar = menubar.MenuBar(card_list, self.map_data[c.INIT_SUN_NAME])
115 else:
116 self.menubar = menubar.MoveBar(card_list)
117 self.drag_plant = False
118 self.hint_image = None
119 self.hint_plant = False
120 if self.background_type == c.BACKGROUND_DAY and self.bar_type == c.CHOOSEBAR_STATIC:
121 self.produce_sun = True
122 else:
123 self.produce_sun = False
124 self.sun_timer = self.current_time
125
126 self.removeMouseImage()
127 self.setupGroups()
128 self.setupZombies()
129 self.setupCars()
130
131 def play(self, mouse_pos, mouse_click):
132 if self.zombie_start_time == 0:

Callers 2

initStateMethod · 0.95
chooseMethod · 0.95

Calls 4

removeMouseImageMethod · 0.95
setupGroupsMethod · 0.95
setupZombiesMethod · 0.95
setupCarsMethod · 0.95

Tested by

no test coverage detected