23 lines
755 B
Go
23 lines
755 B
Go
package pvp
|
|
|
|
import (
|
|
"go_dreamfactory/comm"
|
|
"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
|
|
RedSession comm.IUserSession //红方连接对象
|
|
Redformation *pb.BattleFormation //红方阵型列表
|
|
Blue *pb.PvpUserInfo //蓝方id
|
|
BlueSession comm.IUserSession //蓝方连接对象
|
|
Blueformation *pb.BattleFormation //蓝方阵型列表
|
|
readytimer *timewheel.Task //准备倒计时定时器
|
|
lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象
|
|
}
|