Merge branch 'release' of git.pogorockgames.com:mango-games/server/game into release
This commit is contained in:
commit
d28d1a2cde
|
@ -53,9 +53,9 @@ const (
|
|||
)
|
||||
|
||||
func GetTimeout(param []int64, index int) time.Duration {
|
||||
if index >= 0 && index < len(param) {
|
||||
return time.Duration(param[index]) * time.Second
|
||||
}
|
||||
//if index >= 0 && index < len(param) {
|
||||
// return time.Duration(param[index]) * time.Second
|
||||
//}
|
||||
switch index {
|
||||
case TimeoutStart:
|
||||
return ThirteenWaterStartTimeout
|
||||
|
|
|
@ -1109,35 +1109,8 @@ func (this *StateShow) OnEnter(s *base.Scene) {
|
|||
logger.Logger.Tracef("(this *StateShow) OnEnter, sceneid=%v currpos:%v", s.GetSceneId(), sceneEx.currOpPos)
|
||||
sceneEx.ShowCards()
|
||||
// 每人看牌5秒,特殊牌型不算;
|
||||
//var n int
|
||||
//var has bool
|
||||
//for _, v := range sceneEx.players {
|
||||
// if v != nil && v.IsGameing() && v.cardsO != nil {
|
||||
// n++
|
||||
// if v.cardsO.PokerType == 1 { // 有青龙
|
||||
// has = true
|
||||
// }
|
||||
// }
|
||||
//}
|
||||
//n -= sceneEx.specialTypeNum
|
||||
//sceneEx.specialTime = time.Second * time.Duration(n*5)
|
||||
//// pk动画 2秒
|
||||
//sceneEx.specialTime += time.Second * 2
|
||||
//// 特殊牌型 4.5秒;至尊青龙5.5秒
|
||||
//if sceneEx.specialTypeNum > 0 {
|
||||
// if has {
|
||||
// sceneEx.specialTime += time.Millisecond * 5500
|
||||
// } else {
|
||||
// sceneEx.specialTime += time.Millisecond * 4500
|
||||
// }
|
||||
//}
|
||||
|
||||
sceneEx.specialTime = 0
|
||||
// pk动画 2秒
|
||||
sceneEx.specialTime += time.Second * 2
|
||||
// 2人且有特殊牌型,直接播放特殊牌型动画'
|
||||
var n int // 玩家数量
|
||||
var has bool // 是否有青龙
|
||||
var n int
|
||||
var has bool
|
||||
for _, v := range sceneEx.players {
|
||||
if v != nil && v.IsGameing() && v.cardsO != nil {
|
||||
n++
|
||||
|
@ -1146,16 +1119,18 @@ func (this *StateShow) OnEnter(s *base.Scene) {
|
|||
}
|
||||
}
|
||||
}
|
||||
if n == 2 && sceneEx.specialTypeNum > 0 {
|
||||
n -= sceneEx.specialTypeNum
|
||||
sceneEx.specialTime = time.Second * time.Duration(n*5)
|
||||
// pk动画 2秒
|
||||
sceneEx.specialTime += time.Second * 2
|
||||
// 特殊牌型 4.5秒;至尊青龙5.5秒
|
||||
if sceneEx.specialTypeNum > 0 {
|
||||
if has {
|
||||
sceneEx.specialTime += time.Millisecond * 5500
|
||||
} else {
|
||||
sceneEx.specialTime += time.Millisecond * 4500
|
||||
}
|
||||
} else {
|
||||
sceneEx.specialTime = time.Second * time.Duration(5)
|
||||
}
|
||||
|
||||
logger.Logger.Tracef("show cards: %v %v", n, sceneEx.specialTime)
|
||||
if sceneEx.specialTime <= 0 {
|
||||
sceneEx.specialTime = time.Second
|
||||
|
|
Loading…
Reference in New Issue