|
@@ -388,6 +388,7 @@ export class GameCtr extends Component {
|
|
|
this.optionsAppearAction()
|
|
this.optionsAppearAction()
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.log('handleOptions处理完成处理下一个')
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -406,6 +407,8 @@ export class GameCtr extends Component {
|
|
|
this.optionsAppearAction()
|
|
this.optionsAppearAction()
|
|
|
}
|
|
}
|
|
|
} else {
|
|
} else {
|
|
|
|
|
+ console.log('handleVoteResul处理完成处理下一个')
|
|
|
|
|
+
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
@@ -427,23 +430,35 @@ export class GameCtr extends Component {
|
|
|
|
|
|
|
|
this.roleNodes[data.data.name] = role
|
|
this.roleNodes[data.data.name] = role
|
|
|
|
|
|
|
|
|
|
+ console.log('handleNewPlayer处理完成处理下一个')
|
|
|
|
|
+
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//单独处理死亡
|
|
//单独处理死亡
|
|
|
handleDeath(data: any) {
|
|
handleDeath(data: any) {
|
|
|
this.roleCtr.deathNodes = data.data
|
|
this.roleCtr.deathNodes = data.data
|
|
|
|
|
+
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//处理收到state时间:如果realStart == false ,则更新游戏初始状态
|
|
//处理收到state时间:如果realStart == false ,则更新游戏初始状态
|
|
|
handleStateResul(data: any) {
|
|
handleStateResul(data: any) {
|
|
|
if (!this.realStart) {
|
|
if (!this.realStart) {
|
|
|
|
|
+ console.log("处理开始前的status")
|
|
|
this.historyInfo.push(data.data)
|
|
this.historyInfo.push(data.data)
|
|
|
-
|
|
|
|
|
this.updateGame(this.gameInfo, this.historyInfo)
|
|
this.updateGame(this.gameInfo, this.historyInfo)
|
|
|
|
|
+
|
|
|
|
|
+ console.log('handleStateResul处理完成处理下一个')
|
|
|
|
|
+
|
|
|
|
|
+ this.processCtr.doneProcessing()
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
- this.processCtr.doneProcessing()
|
|
|
|
|
|
|
+ else{
|
|
|
|
|
+ console.log("处理开始后的status完成,处理下一个")
|
|
|
|
|
+ this.processCtr.doneProcessing()
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
//处理重置
|
|
//处理重置
|
|
@@ -489,7 +504,10 @@ export class GameCtr extends Component {
|
|
|
} else {
|
|
} else {
|
|
|
this.optionsCtr.setOptions(this.optionsLabel)
|
|
this.optionsCtr.setOptions(this.optionsLabel)
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
this.playShowOptionsOneShot()
|
|
this.playShowOptionsOneShot()
|
|
|
|
|
+ console.log("展示选项处理完成,处理下一个")
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
this.storyActionStatus = 1
|
|
this.storyActionStatus = 1
|
|
|
} else if (this.storyActionStatus === 1) {
|
|
} else if (this.storyActionStatus === 1) {
|
|
@@ -499,6 +517,9 @@ export class GameCtr extends Component {
|
|
|
console.log("selectedOptionNum:" + this.selectedOptionNum)
|
|
console.log("selectedOptionNum:" + this.selectedOptionNum)
|
|
|
this.optionsCtr.selectOption(this.selectedOptionNum + 1)
|
|
this.optionsCtr.selectOption(this.selectedOptionNum + 1)
|
|
|
this.playSelectedOneShot()
|
|
this.playSelectedOneShot()
|
|
|
|
|
+
|
|
|
|
|
+ console.log("选中选项处理完成,处理下一个")
|
|
|
|
|
+
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
this.storyActionStatus = 2
|
|
this.storyActionStatus = 2
|
|
|
} else if (this.storyActionStatus === 2) {
|
|
} else if (this.storyActionStatus === 2) {
|
|
@@ -587,6 +608,8 @@ export class GameCtr extends Component {
|
|
|
.call(() => {
|
|
.call(() => {
|
|
|
this.storyActionStatus = 0
|
|
this.storyActionStatus = 0
|
|
|
this.optionsAppearAction()
|
|
this.optionsAppearAction()
|
|
|
|
|
+
|
|
|
|
|
+ console.log("剧情上移处理完成,处理下一个")
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
})
|
|
})
|
|
|
.start()
|
|
.start()
|
|
@@ -641,9 +664,7 @@ export class GameCtr extends Component {
|
|
|
this.roleNodes[this.player[i].name] = role
|
|
this.roleNodes[this.player[i].name] = role
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- this.scheduleOnce(() => {
|
|
|
|
|
- this.processCtr.doneProcessing()
|
|
|
|
|
- }, 3)
|
|
|
|
|
|
|
+
|
|
|
} else {
|
|
} else {
|
|
|
throw new Error("gameInfo or historyInfo is null")
|
|
throw new Error("gameInfo or historyInfo is null")
|
|
|
}
|
|
}
|
|
@@ -690,6 +711,8 @@ export class GameCtr extends Component {
|
|
|
const differenceInDays = differenceInMilliseconds / (1000 * 60 * 60 * 24) + 1
|
|
const differenceInDays = differenceInMilliseconds / (1000 * 60 * 60 * 24) + 1
|
|
|
this.dayLabel.string = "第" + differenceInDays + "天"
|
|
this.dayLabel.string = "第" + differenceInDays + "天"
|
|
|
|
|
|
|
|
|
|
+ console.log("更新日期处理完成,处理下一个")
|
|
|
|
|
+
|
|
|
this.processCtr.doneProcessing()
|
|
this.processCtr.doneProcessing()
|
|
|
}
|
|
}
|
|
|
|
|
|