娃娃机结果通知修改
This commit is contained in:
parent
6a5eef06ea
commit
2693793aa9
|
@ -18,6 +18,7 @@ type PlayerEx struct {
|
|||
IsWin bool // 是否抓到娃娃
|
||||
gainCoin int64 // 本局赢的金币
|
||||
taxCoin int64 //本局税收
|
||||
lastIsWin bool // 上一局是否抓到娃娃
|
||||
}
|
||||
|
||||
func (this *PlayerEx) Clear(baseScore int32) {
|
||||
|
@ -27,6 +28,7 @@ func (this *PlayerEx) Clear(baseScore int32) {
|
|||
|
||||
this.gainCoin = 0
|
||||
this.IsWin = false
|
||||
this.lastIsWin = false
|
||||
}
|
||||
|
||||
func (this *PlayerEx) CanOp(sceneEx *SceneEx) bool {
|
||||
|
@ -233,7 +235,7 @@ func (this *PlayerEx) SendPlayerGameBilled(RoundId int32) {
|
|||
if this != nil {
|
||||
|
||||
result := 0
|
||||
if this.IsWin {
|
||||
if this.lastIsWin {
|
||||
result = 1
|
||||
}
|
||||
pack := &clawdoll.SCCLAWDOLLRoundGameBilled{
|
||||
|
|
|
@ -804,6 +804,7 @@ func (this *StateBilled) OnEnter(s *base.Scene) {
|
|||
sceneEx.SaveGamePlayerListLog(playerEx.SnId, logParam)
|
||||
}
|
||||
|
||||
playerEx.lastIsWin = playerEx.IsWin
|
||||
playerEx.ReStartGame()
|
||||
}
|
||||
}
|
||||
|
@ -933,6 +934,8 @@ func (this *StateWaitPayCoin) OnEnter(s *base.Scene) {
|
|||
playingEx := sceneEx.GetPlayingEx()
|
||||
if playingEx != nil {
|
||||
playingEx.SendPlayerGameBilled(int32(sceneEx.RoundId))
|
||||
|
||||
playingEx.lastIsWin = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue