def on_back_to_mainmenu(self): try: self.host.sfd.close() self.client.sfd.close() except Exception: pass director.pop() director.next_scene = FlipAngular3DTransition(director.next_scene)
def back_to_mainmenu(self): director.pop() director.next_scene = FlipAngular3DTransition(director.next_scene)
def on_setting(self): next_scene = SettingScene() director.push(FlipAngular3DTransition(next_scene))
def on_connect(self): next_scene = ConnectScene(ConnectMenu) director.push(FlipAngular3DTransition(next_scene))
def on_score(self): next_scene = CheckScene() director.push(FlipAngular3DTransition(next_scene))
def on_start(self): '''切换到游戏场景''' next_scene = MajorScene(PlayMenuScene) director.push(FlipAngular3DTransition(next_scene))
def on_new_game(self): game_layer = Game(1) game_scene = cocos.scene.Scene(game_layer) cocos.director.director.push( FlipAngular3DTransition(game_scene, 1))
def on_new_game(self): director.push(FlipAngular3DTransition(get_newgame()))