|
@@ -249,7 +249,7 @@ export class gameManager extends Component {
|
|
|
gameManager.mp3_cache.clear()
|
|
|
}
|
|
|
|
|
|
- public init(gr:game_run,data:scene_item_data[]){
|
|
|
+ public init(gr:game_run,data:scene_item_data[],callback=null){
|
|
|
this.mGameRun = gr;
|
|
|
gameManager.Singleton = this;
|
|
|
this.mSceneManager.init(this)
|
|
@@ -261,7 +261,7 @@ export class gameManager extends Component {
|
|
|
if( this.mGameData.length<=0){
|
|
|
return tools.showToast("错误的场景信息")
|
|
|
}
|
|
|
- this.startLevelGame()
|
|
|
+ this.startLevelGame(callback)
|
|
|
}
|
|
|
|
|
|
public runGame(data:scene_item_data[]){
|
|
@@ -292,8 +292,9 @@ export class gameManager extends Component {
|
|
|
ClientEvent.off(config.EventRun.WIDGET_FINISH,this.onWidgetFinishEvent.bind(this),this)
|
|
|
}
|
|
|
|
|
|
- public startLevelGame(){
|
|
|
+ public startLevelGame(callback=null){
|
|
|
this.initEvent()
|
|
|
+ callback()
|
|
|
console.log("this.mGameData",this.mGameData,this.mCurSceneIndex)
|
|
|
this.mSceneManager.startLevelGame(this.mGameData[this.mCurSceneIndex])
|
|
|
taskServce.initTask(this.mGameData[this.mCurSceneIndex]._task_data)
|