4消或5消生成新的元素

This commit is contained in:
meixiongfeng 2023-10-24 10:30:21 +08:00
parent 6cfbac78eb
commit eb83dd957a

View File

@ -133,7 +133,7 @@ func (this *MapData) Check5X(color int32) (bEliminate bool, score int32, count i
}
this.oid++
// 生成一个新的类型元素
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err != nil {
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err == nil {
this.Plat[k+2] = &pb.GirdeData{
Oid: this.oid,
Color: k1,
@ -161,7 +161,7 @@ func (this *MapData) Check5X(color int32) (bEliminate bool, score int32, count i
}
this.oid++
// 生成一个新的类型元素
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err != nil {
if conf, err := this.module.configure.GetGameBlock(k1, FiveType); err == nil {
this.Plat[k+2*Width] = &pb.GirdeData{
Oid: this.oid,
Color: k1,
@ -257,7 +257,7 @@ func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count i
this.oid++
// 生成一个新的类型元素
if conf, err := this.module.configure.GetGameBlock(k1, FourUType); err != nil { // 上下类型
if conf, err := this.module.configure.GetGameBlock(k1, FourUType); err == nil { // 上下类型
this.Plat[newElem] = &pb.GirdeData{
Oid: this.oid,
Color: k1,
@ -304,7 +304,7 @@ func (this *MapData) Check4X(color int32) (bEliminate bool, score int32, count i
this.oid++
// 生成一个新的类型元素
if conf, err := this.module.configure.GetGameBlock(k1, FourLType); err != nil { // 左右类型
if conf, err := this.module.configure.GetGameBlock(k1, FourLType); err == nil { // 左右类型
this.Plat[newElem] = &pb.GirdeData{
Oid: this.oid,
Color: k1,