【高棉象棋的每步时长优化】
https://www.tapd.cn/31044302/prong/stories/view/1131044302001000540
This commit is contained in:
parent
c6799597c3
commit
d792e0ceb1
|
@ -10,12 +10,12 @@ const (
|
|||
)
|
||||
|
||||
const (
|
||||
WaitStartTimeout = time.Second * 3 // 开始游戏
|
||||
HandCardTimeout = time.Second * 1 // 发牌
|
||||
PlayerOpTimeout = time.Second * 16 // 玩家操作阶段
|
||||
BilledTimeout = time.Second * 1 // 结算
|
||||
|
||||
PlayerTotalTime = time.Minute*15 + time.Second // 下棋总时长
|
||||
WaitStartTimeout = time.Second * 3 // 开始游戏
|
||||
HandCardTimeout = time.Second * 1 // 发牌
|
||||
PlayerOpTimeout = time.Second * 61 // 玩家操作阶段
|
||||
BilledTimeout = time.Second * 1 // 结算
|
||||
PlayerFirstOpTimeout = time.Second * 31
|
||||
PlayerTotalTime = time.Minute*10 + time.Second // 下棋总时长
|
||||
)
|
||||
|
||||
// 场景状态
|
||||
|
|
|
@ -1164,8 +1164,14 @@ func (this *SceneStatePlayerOp) OnTick(s *base.Scene) {
|
|||
}
|
||||
}
|
||||
|
||||
if now.Sub(sceneEx.StateStartTime) > rule.PlayerOpTimeout {
|
||||
f()
|
||||
if sceneEx.chess.GetRound() == 1 || sceneEx.chess.GetRound() == 2 {
|
||||
if now.Sub(sceneEx.StateStartTime) > rule.PlayerFirstOpTimeout {
|
||||
f()
|
||||
}
|
||||
} else {
|
||||
if now.Sub(sceneEx.StateStartTime) > rule.PlayerOpTimeout {
|
||||
f()
|
||||
}
|
||||
}
|
||||
|
||||
curPlayer := sceneEx.seats[sceneEx.GetCurOpPos()]
|
||||
|
|
Loading…
Reference in New Issue