上传pvp代码
This commit is contained in:
parent
a787e1f29d
commit
b0f39590d1
@ -7,6 +7,7 @@ import (
|
||||
"sync"
|
||||
)
|
||||
|
||||
///Pvp 战斗对象
|
||||
type BattleItem struct {
|
||||
Id string //战斗id
|
||||
Ptype pb.PvpType //pvp类型
|
||||
@ -14,9 +15,13 @@ type BattleItem struct {
|
||||
Red *pb.PvpUserInfo //红方id
|
||||
RedSession comm.IUserSession //红方连接对象
|
||||
Redformation *pb.BattleFormation //红方阵型列表
|
||||
RedOffline bool //红方离线
|
||||
Blue *pb.PvpUserInfo //蓝方id
|
||||
BlueSession comm.IUserSession //蓝方连接对象
|
||||
Blueformation *pb.BattleFormation //蓝方阵型列表
|
||||
BlueOffline bool //蓝方离线
|
||||
readytimer *timewheel.Task //准备倒计时定时器
|
||||
operatetimer *timewheel.Task //操作倒计时定时器
|
||||
curroperate int32 //当前操作玩家 1 红方 2 蓝方
|
||||
lock sync.Mutex //战斗锁 防止计时器和消息同时操作对象
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user