20 lines
619 B
Go
20 lines
619 B
Go
package pvp
|
|
|
|
import (
|
|
"go_dreamfactory/lego/sys/timewheel"
|
|
"go_dreamfactory/pb"
|
|
"sync"
|
|
)
|
|
|
|
type BattleItem struct {
|
|
Id string //战斗id
|
|
Ptype pb.PvpType //pvp类型
|
|
State pb.PvpState //战斗状态
|
|
Red *pb.PvpUserInfo //红方id
|
|
Redformation *pb.BattleFormation //红方阵型列表
|
|
Blue *pb.PvpUserInfo //红方id
|
|
Blueformation *pb.BattleFormation //红方阵型列表
|
|
readytimer *timewheel.Task //准备倒计时定时器
|
|
lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象
|
|
}
|