This commit is contained in:
aozhiwei 2024-03-13 17:54:41 +08:00
parent ef14af8401
commit a8939e79c8

View File

@ -110,6 +110,16 @@ func (this *team) StartGame() {
if !this.Started() {
this.state = constant.TEAM_STATE_STARTED
this.startTime = f5.GetApp().GetNowSeconds()
this.genStartGameInfo()
f5.GetTimer().SetInterval(1000, func(e int32, args *q5.Args) {
if e == q5.TIMER_EXEC_EVENT {
this.SendStateNotify()
}
})
}
}
func (this *team) genStartGameInfo() {
startInfo := struct {
ZoneId int32 `json:"zone_id"`
NodeId int32 `json:"node_id"`
@ -146,7 +156,6 @@ func (this *team) StartGame() {
this.stateNotifyMsg.JoinMsg.TeamUuid = proto.String(this.GetTeamUuid())
this.stateNotifyMsg.JoinMsg.Payload = proto.String(payload)
}
}
func (this *team) broadcastMsg(msg proto.Message) {
for _, m := range this.accountIdHash {