1
This commit is contained in:
parent
ef14af8401
commit
a8939e79c8
@ -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"`
|
||||
@ -145,7 +155,6 @@ func (this *team) StartGame() {
|
||||
payload := "normal_room:" + sign + "|" + q5.EncodeJson(&startInfo)
|
||||
this.stateNotifyMsg.JoinMsg.TeamUuid = proto.String(this.GetTeamUuid())
|
||||
this.stateNotifyMsg.JoinMsg.Payload = proto.String(payload)
|
||||
}
|
||||
}
|
||||
|
||||
func (this *team) broadcastMsg(msg proto.Message) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user