This commit is contained in:
aozhiwei 2024-03-19 20:46:46 +08:00
parent 61adb6734b
commit 9c59c73822

View File

@ -149,16 +149,7 @@ func (this *team) getMainTeam() *team {
}
func (this *team) onMatchOk(startTime int64) {
this.state = constant.TEAM_STATE_STARTED
this.startTime = startTime
this.stateNotifyMsg.State = proto.Int32(this.state)
this.genStartGameInfo()
this.SendStateNotify()
f5.GetTimer().SetInterval(1000, func(e int32, args *q5.Args) {
if e == q5.TIMER_EXEC_EVENT {
this.SendStateNotify()
}
})
this.doStartGame(startTime)
}
func (this *team) CanStartGame(hum common.Player) bool {
@ -184,8 +175,14 @@ func (this *team) StartGame() {
_matchMgr.addMatch(this)
this.SendStateNotify()
} else {
this.doStartGame(f5.GetApp().GetNowSeconds())
}
}
}
func (this *team) doStartGame(startTime int64) {
this.state = constant.TEAM_STATE_STARTED
this.startTime = f5.GetApp().GetNowSeconds()
this.startTime = startTime
this.stateNotifyMsg.State = proto.Int32(this.state)
this.genStartGameInfo()
this.SendStateNotify()
@ -194,8 +191,6 @@ func (this *team) StartGame() {
this.SendStateNotify()
}
})
}
}
}
func (this *team) GetMemberNum() int32 {