觉醒时刻
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

1610 lines
63 KiB

import User from "../../../FrameWork/User/User";
import Common5 from "../../../Platform/th/Common5";
const { ccclass, property } = cc._decorator;
export enum GameLevel {
FirstLevel,//第一关
SecondLevel,//第二关
}
export let QiEDirection = {
Left: 1,
Right: -1
}
@ccclass
export default class GameDataManage2 {
public static allAmount = 336
public static MaxUpNaoLi = 18
public static NaoLiNumArray = [8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 88, 96, 104, 112, 120, 128, 136, 144];
public static getAllAmount() {
return this.allAmount
}
//当前关卡
public static curLevel = GameLevel.FirstLevel
public static getCurLevel() {
return this.curLevel
}
public static setCurLevel(level) {
this.curLevel = level
}
//浮冰数量
public static maxFuBingNum = 14
public static getMaxFuBingNum() {
return this.maxFuBingNum
}
public static curFuBingNum = 12
public static getFuBingNum() {
return this.curFuBingNum
}
public static addFuBingNum() {
this.curFuBingNum += 1
if (this.curFuBingNum > 14) {
this.curFuBingNum = 14
}
}
//操作区12块浮冰开放状态
public static unLockFuBingArr = []
public static getUnLockFuBingArr() {
return this.unLockFuBingArr
}
public static xiaoChuAddRate = 20
//已消除数量
public static curXiaoChuAmount = 0
public static getCurXiaoChuAmount() {
return this.curXiaoChuAmount
}
//当前可出的最大种类值
public static curMaxNumber = 4
public static oldMaxNumber = 0;
//刷新已消除数量
public static refreshXiaoChuAmount(addNum) {
this.curXiaoChuAmount += addNum
// this.curMaxNumber = 4 + Math.floor(this.curXiaoChuAmount/(((User.getQieLevel()) +3) *28) * User.getQieLevel())
if (this.curMaxNumber < GameDataManage2.qiEShuLiangAll.length) {
this.curMaxNumber = this.oldMaxNumber + Math.floor(this.curXiaoChuAmount / this.xiaoChuAddRate);
this.curMaxNumber = Math.min(this.curMaxNumber, GameDataManage2.qiEShuLiangAll.length)
}
console.log('刷新已消除数量==',this.curXiaoChuAmount, this.curMaxNumber, User.getQieLevel())
//小心条件判断需从大到小
// if (this.curXiaoChuAmount >= 40) {
// this.curMaxNumber = 15
// } else if (this.curXiaoChuAmount >= 36) {
// this.curMaxNumber = 14
// } else if (this.curXiaoChuAmount >= 32) {
// this.curMaxNumber = 13
// } else if (this.curXiaoChuAmount >= 28) {
// this.curMaxNumber = 12
// } else if (this.curXiaoChuAmount >= 24) {
// this.curMaxNumber = 11
// } else if (this.curXiaoChuAmount >= 20) {
// this.curMaxNumber = 10
// } else if (this.curXiaoChuAmount >= 16) {
// this.curMaxNumber = 9
// } else if (this.curXiaoChuAmount >= 12) {
// this.curMaxNumber = 8
// } else if (this.curXiaoChuAmount >= 8) {
// this.curMaxNumber = 7
// } else if (this.curXiaoChuAmount >= 4) {
// this.curMaxNumber = 6
// }
//this.addNaoLiValue();
}
//添加脑力值
// public static addNaoLiNum = 0;
// public static addNaoLiValue() {
// let todayGetNaoLiNum = User.getTodayGetNaoLiNum();
// console.log(todayGetNaoLiNum, User.getTodayGetNaoLiNum(), NaoLiDataManager.everydayBuChongNum)
// if (todayGetNaoLiNum >= NaoLiDataManager.everydayBuChongNum) {
// return;
// }
// if (this.NaoLiNumArray[this.addNaoLiNum] && this.curXiaoChuAmount >= this.NaoLiNumArray[this.addNaoLiNum]) {
// console.log('已添加' + this.addNaoLiNum + '个脑力值')
// this.addNaoLiNum += 1;
// User.addUserNaoLiZhi(1);
// NaoLiDataManager.addTodayGetNaoLiNum(1);
// PrefabManage.showTextTips('已添加' + this.addNaoLiNum + '个脑力值');
// }
// };
// //列数
// public static lineNum:number = 0
// public static getLineNum(){
// return this.lineNum
// }
// public static setLineNum(num){
// this.lineNum = num
// }
//当前主区出现的企鹅数据
public static curContentQiEData = []
public static getCurContentData() {
return this.curContentQiEData
}
public static setCurContentData(data) {
this.curContentQiEData = data
}
//当前补位区出现的企鹅数据
public static curBuWeiContentQiEData = []
public static getCurBuWeiContentData() {
return this.curBuWeiContentQiEData
}
public static setCurBuWeiContentData(data) {
this.curBuWeiContentQiEData = data
}
//每列剩余数量(初始值为总数/12)
public static perLineLeftNumTab = []
//获取选中的牌(索引)
public static getSelectQiEData(line) {
let lineCardData = this.curContentQiEData[line]
let selectPosTab = []
let selectDataTab = []
if (lineCardData.length > 0) {
let lastCard = lineCardData[lineCardData.length - 1]
for (var i = lineCardData.length - 1; i >= 0; i--) {
if (lastCard == lineCardData[i]) {
selectDataTab.push(lastCard)
selectPosTab.push({ xPos: line, yPos: i })
} else {
break
}
}
}
//选中的位置,选中的数值,选中行的总数量
return { selectPosTab: selectPosTab, selectDataTab: selectDataTab, selectLineLength: lineCardData.length }
}
//鸟窝飞向主区
public static niaoWoFlyToMain(line, data) {
this.curContentQiEData[line].push(data)
// console.log("鸟窝飞向主区,刷新主区数据",this.curContentQiEData)
}
//移动刷新牌区数据
public static moveRefreshContentQiEData(curData, targetData) {
// console.log("curData=",curData)
// console.log("targetData=",targetData)
for (var i = 0; i < curData.length; i++) {
this.curContentQiEData[curData[i].xPos][curData[i].yPos] = 0
this.curContentQiEData[targetData[i].xPos].push(targetData[i].data)
}
this.clearCardDataZeroNumber()
// console.log("刷新牌区数据",this.curContentQiEData)
}
//检测牌区是否可以消
public static checkIsContentXiaoChu() {
let allData = this.curContentQiEData
let recordXiaoChuLineTab = []
for (let i = 0; i < allData.length; i++) {
if (allData[i].length >= 4) {
let isAllSame = true
let number = allData[i][0]
for (let j = 0; j < allData[i].length; j++) {
if (number != allData[i][j]) {
isAllSame = false
break
}
}
if (isAllSame) {
recordXiaoChuLineTab.push(i)
}
} else {
continue
}
}
return recordXiaoChuLineTab
}
//消除整列数据
public static clearCurLineData(xiaoChuLineTab) {
for (var i = 0; i < xiaoChuLineTab.length; i++) {
this.curContentQiEData[xiaoChuLineTab[i]] = []
}
//更新消除总数
this.refreshXiaoChuAmount(4);
// console.log("消除整列数据后=",this.curContentQiEData)
}
//补位区进入主区
public static buWeiQuEnterMain(xiaoChuLineTab) {
for (var i = 0; i < xiaoChuLineTab.length; i++) {
// //更新消除总数
// this.refreshXiaoChuAmount(4);
let buWeiQuData = this.curBuWeiContentQiEData[xiaoChuLineTab[i]]
//主区数据更新
for (var j = buWeiQuData.length - 1; j >= 0; j--) {
this.curContentQiEData[xiaoChuLineTab[i]].push(buWeiQuData[j])
}
//补位区数据清空
this.curBuWeiContentQiEData[xiaoChuLineTab[i]].length = 0
//填充补位区数据
let zhongLeiNum = this.curMaxNumber
let buWeiAccount = Math.min(this.perLineLeftNumTab[xiaoChuLineTab[i]], 4)
//当列剩余数量减少
this.perLineLeftNumTab[xiaoChuLineTab[i]] -= buWeiAccount
// console.log("zhongLeiNum=",zhongLeiNum)
// console.log("buWeiAccount=",buWeiAccount)
let testNum = 0
for (var k = 0; k < buWeiAccount; k++) {
let id = Math.floor(Math.random() * zhongLeiNum) + 1
// console.log("k=,id=",k,id)
while (this.qiEShuLiangAll[id - 1] <= 0) {
id = Math.floor(Math.random() * zhongLeiNum) + 1
// console.log("进入while,id=",id)
testNum++
if (testNum > 10000) {
console.error("报错了,请检查")
return
}
}
this.curBuWeiContentQiEData[xiaoChuLineTab[i]][k] = id
this.qiEShuLiangAll[id - 1] -= 1
}
}
// console.log("补位区进入主区后主区数据",this.curContentQiEData)
// console.log("补位区进入主区后补位区数据",this.curBuWeiContentQiEData)
// console.log("全部企鹅数量",this.qiEShuLiangAll)
// console.log("每列剩余数量",this.perLineLeftNumTab)
}
//检测数据区是否还有数据
public static checkPerLineLeftNumZero() {
let isAllLeftZero = true
for (var i = 0; i < this.perLineLeftNumTab.length; i++) {
if (this.perLineLeftNumTab[i] > 0) {
isAllLeftZero = false
break
}
}
return isAllLeftZero
}
//消除特定牌数据
public static deleteSingleCardData(xPos, yPos, callFunc) {
let deleteData = this.curContentQiEData[xPos][yPos]
this.curContentQiEData[xPos][yPos] = 0
this.clearCardDataZeroNumber()
// console.log("消除特定牌数据后",this.curContentQiEData)
this.addCardToBuWeiOrLeftData(deleteData, callFunc)
}
//将删除的牌加入等待区或数据区
public static addCardToBuWeiOrLeftData(deleteData, callFunc) {
//优先加入等待区
//检测等待区是否满的(只判断12行)
let isJoinBuWeiQu = false
let joinXPos = 0
let joinYPos = 0
for (var i = 0; i < 12; i++) {
let length = this.curBuWeiContentQiEData[i].length
if (length < 4) {
isJoinBuWeiQu = true
joinXPos = i
joinYPos = length
this.curBuWeiContentQiEData[i].push(deleteData)
break
}
}
//否则加入数据区
if (!isJoinBuWeiQu) {
this.perLineLeftNumTab[0] += 1
this.qiEShuLiangAll[deleteData - 1] += 1
}
// console.log("冰冻道具后全部企鹅数量",this.qiEShuLiangAll)
// console.log("冰冻道具后每列剩余数量",this.perLineLeftNumTab)
//将补位数据传过去
let data = { isJoinBuWeiQu: isJoinBuWeiQu, joinXPos: joinXPos, joinYPos: joinYPos, deleteData: deleteData }
callFunc && callFunc(data)
}
//鸟窝出鸟
public static getNiaoWoData() {
//优先从每列剩余数量中取鸟
if (!this.checkPerLineLeftNumZero()) {
let lineLeftNumTabLength = this.perLineLeftNumTab.length
//随机列数
let randomLine = Math.floor(Math.random() * lineLeftNumTabLength)
while (this.perLineLeftNumTab[randomLine] <= 0) {
randomLine = Math.floor(Math.random() * lineLeftNumTabLength)
}
//随机鸟种类
let zhongLeiNum = this.curMaxNumber
let id = Math.floor(Math.random() * zhongLeiNum) + 1
while (this.qiEShuLiangAll[id - 1] <= 0) {
id = Math.floor(Math.random() * zhongLeiNum) + 1
}
this.qiEShuLiangAll[id - 1] -= 1//企鹅数-1
this.perLineLeftNumTab[randomLine] -= 1//本列剩余数-1
// this.refreshXiaoChuAmount(1)//取出企鹅会使消除数+1,规避可能鸟种类全部取出为0的问题
// console.log("每列剩余数量取鸟niaoId=randomLine=",id,randomLine)
// console.log("取鸟后全部企鹅数量",this.qiEShuLiangAll)
// console.log("取鸟后每列剩余数量",this.perLineLeftNumTab)
return { niaoId: id, isDengDaiQu: false }
//否则从等待区取鸟
} else {
if (this.checkBuWeiQuOver()) {
return { niaoId: -1, isDengDaiQu: true }
} else {
//优先取补位区数量最多的一只
let buWeiMaxLength = 0
let qiEData = { xPos: 0, yPos: 0, id: 1 }
for (var i = 0; i < this.curBuWeiContentQiEData.length; i++) {
if (this.curBuWeiContentQiEData[i].length > buWeiMaxLength) {
buWeiMaxLength = this.curBuWeiContentQiEData[i].length
qiEData = { xPos: i, yPos: buWeiMaxLength - 1, id: this.curBuWeiContentQiEData[i][buWeiMaxLength - 1] }
}
}
this.curBuWeiContentQiEData[qiEData.xPos].pop()
// console.log("等待区取鸟niaoId=xPos=yPos==",qiEData.id,qiEData.xPos,qiEData.yPos)
// console.log("取鸟后补位区数据",this.curBuWeiContentQiEData)
return { niaoId: qiEData.id, isDengDaiQu: true, xPos: qiEData.xPos, yPos: qiEData.yPos }
}
}
}
//检测补位区是否还有数据
public static checkBuWeiQuOver() {
let isBuWeiQuZero = true
for (var i = 0; i < this.curBuWeiContentQiEData.length; i++) {
if (this.curBuWeiContentQiEData[i].length > 0) {
isBuWeiQuZero = false
break
}
}
return isBuWeiQuZero
}
//是否全部消除完毕
public static isQiEAllOver() {
let isZhuQuZero = true
let isBuWeiQuZero = true
for (var i = 0; i < this.curContentQiEData.length; i++) {
if (this.curContentQiEData[i].length > 0) {
isZhuQuZero = false
break
}
}
for (var i = 0; i < this.curBuWeiContentQiEData.length; i++) {
if (this.curBuWeiContentQiEData[i].length > 0) {
isBuWeiQuZero = false
break
}
}
if (isZhuQuZero && isBuWeiQuZero) {
return true
} else {
return false
}
}
//全部企鹅数量
public static qiEShuLiangAll = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
//清除牌中0的数据
public static clearCardDataZeroNumber() {
let allData = this.curContentQiEData
let tempData = []
for (let i = 0; i < allData.length; i++) {
tempData[i] = []
let k = 0
for (let j = 0; j < allData[i].length; j++) {
if (allData[i][j] != 0) {
tempData[i][k++] = allData[i][j]
}
}
}
// console.log("tempData=",tempData)
this.curContentQiEData = tempData
}
//根据列数获取企鹅方向
public static getQiEDirection(line) {
if (line % 2 == 0) {
return QiEDirection.Left
} else {
return QiEDirection.Right
}
}
//重新排列企鹅数据
public static reSortAllContentData() {
//存放到一维数组中
let allData = this.curContentQiEData
let tempData = []
for (let i = 0; i < allData.length; i++) {
for (let j = 0; j < allData[i].length; j++) {
if (allData[i][j]) {
tempData.push(allData[i][j])
}
}
}
// console.log("主区排序前",allData)
// console.log("一维数组数据排序前",tempData)
//一维数组数据排序
tempData.sort((a, b) => {
return b - a
})
// console.log("一维数组数据排序后",tempData)
//将排序后的数据替换进主区
for (let i = 0; i < allData.length; i++) {
for (let j = 0; j < allData[i].length; j++) {
if (allData[i][j]) {
allData[i][j] = tempData.pop()
}
}
}
// console.log("主区排序后",allData)
}
}
/********* 第一关 **********/
export class GameFirstLevelManage {
public static initStartData() {
//浮冰数量
GameDataManage2.curFuBingNum = 5
GameDataManage2.maxFuBingNum = 5
GameDataManage2.unLockFuBingArr = [1,1,1,1,1]
//已消除数量
GameDataManage2.curXiaoChuAmount = 0
//当前可出的最大种类值
GameDataManage2.curMaxNumber = 3
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[], [-1, -1, -1],
[-1, -1, -1]
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[], [],
[]
]
//全部企鹅数量
GameDataManage2.qiEShuLiangAll = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
]
//随机三种鸟,共12只
let randomTypeTab = Common5.getNumberFromArray(1, 15, 3)
let tempData = []
for (var i = 0; i < 4; i++) {
for (var j = 0; j < randomTypeTab.length; j++) {
tempData.push(randomTypeTab[j])
}
}
// console.log("随机到的鸟数据",tempData)
//每列剩余数量计算
for (var i = 0; i < GameDataManage2.curFuBingNum; i++) {
//减主区数量
let lineContentData = GameDataManage2.curContentQiEData[i]
//初始化主区和补位区企鹅
for (var j = 0; j < 4; j++) {
if (lineContentData[j] == -1) {
lineContentData[j] = tempData.pop()
}
}
}
// console.log("主区企鹅数据",GameDataManage.curContentQiEData)
// console.log("补位区企鹅数据",GameDataManage.curBuWeiContentQiEData)
// console.log("全部企鹅数量",GameDataManage.qiEShuLiangAll)
// console.log("每列剩余数量",GameDataManage.perLineLeftNumTab)
}
}
/********* 第二关 **********/
export class GameSecondLevelManage {
public static initStartData(level) {
//浮冰数量
console.log("企鹅关卡:", level)
GameDataManage2.curFuBingNum = 12
GameDataManage2.maxFuBingNum = 14
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,0,0,0,0,0,0]
//已消除数量
GameDataManage2.curXiaoChuAmount = 0
//当前可出的最大种类值
GameDataManage2.curMaxNumber = 4
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
// if (level == 1) {
// GameDataManage2.curMaxNumber = 5
// GameDataManage2.qiEShuLiangAll = [
// 32, 32, 32, 32, 32, 24, 24, 24
// ]
// //每列剩余数量(初始值为总数/12)
// GameDataManage2.perLineLeftNumTab = [
// 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 16, 16, 0, 0
// ]
// }
if (level == 1) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
4,4,4,4,4,4
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 0, 0, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[], [],
[], [],
[], [],
[], [],
[], [],
[], []
]
}
else if (level == 2) {
GameDataManage2.curMaxNumber = 9
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
4,4,4,4,4,4,4,4,4
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[], [],
[], [],
[], [],
[], [],
[], [],
[], []
]
}
else if (level == 3) {
GameDataManage2.curMaxNumber = 5
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,0,0]
GameDataManage2.qiEShuLiangAll = [
28, 28, 24, 24, 24, 16, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 20, 20, 20, 20, 20, 20, 20, 20, 0, 0, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], [],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], [],
[], []
]
}
else if (level == 4) {
GameDataManage2.curMaxNumber = 5
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,0,0]
GameDataManage2.qiEShuLiangAll = [
32, 28, 28, 28, 28, 20, 12, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 26, 26, 26, 26, 24, 24, 24, 24, 0, 0, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], [],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], [],
[], []
]
}
else if (level == 5) {
GameDataManage2.curMaxNumber = 5
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,0,0]
GameDataManage2.qiEShuLiangAll = [
28, 28, 28, 28, 24, 20, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 24, 24, 24, 24, 24, 20, 20, 20, 0, 0, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], [],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], [],
[], []
]
}
else if (level == 6) {
GameDataManage2.curMaxNumber = 5
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,0,0]
GameDataManage2.qiEShuLiangAll = [
32, 32, 32, 28, 28, 20, 16, 8, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 28, 28, 28, 28, 28, 28, 26, 26, 0, 0, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [-1, -1, -1],
[], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], [],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], [],
[], []
]
}
else if (level == 7) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,0,0]
GameDataManage2.qiEShuLiangAll = [
32, 32, 32, 28, 28, 28, 16, 12, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 30, 30, 30, 30, 28, 28, 28, 28, 0, 0, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [-1, -1, -1],
[], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], [],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], [],
[], []
]
}
else if (level == 8) {
GameDataManage2.curMaxNumber = 7
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,0,0]
GameDataManage2.qiEShuLiangAll = [
32, 32, 28, 28, 28, 28, 28, 12, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], [],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], [],
[], []
]
}
else if (level == 9) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 32, 32, 32, 32, 12, 12, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 10) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 36, 32, 32, 16, 12, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 11) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 36, 36, 36, 16, 16, 8, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 12) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 36, 36, 36, 20, 20, 12, 8, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 13) {
GameDataManage2.curMaxNumber = 7
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 32, 32, 32, 32, 20, 12, 8, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 14) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
32, 32, 32, 32, 32, 32, 32, 32, 12, 8, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 15) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 36, 36, 36, 36, 36, 16, 16, 16, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 16) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 40, 36, 36, 36, 36, 20, 16, 16, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 17) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 40, 40, 36, 36, 36, 20, 20, 16, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
34, 34, 34, 34, 34, 34, 34, 34, 32, 32, 32, 32, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 18) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 40, 40, 40, 36, 36, 20, 20, 20, 12, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 19) {
GameDataManage2.curMaxNumber = 9
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 36, 36, 36, 36, 36, 36, 36, 20, 20, 12, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 20) {
GameDataManage2.curMaxNumber = 10
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 36, 36, 36, 36, 36, 32, 32, 20, 12, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 21) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 32, 32, 32, 32, 12, 12, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 22) {
GameDataManage2.curMaxNumber = 6
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 36, 32, 32, 16, 12, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 23) {
GameDataManage2.curMaxNumber = 7
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 32, 32, 32, 32, 20, 12, 8, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 24) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [0,0,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
32, 32, 32, 32, 32, 32, 32, 32, 12, 8, 8, 8, 8
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
0, 0, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[], [],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[], [],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 25) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 36, 36, 36, 36, 36, 16, 16, 16, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 26) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 40, 36, 36, 36, 36, 20, 16, 16, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 30, 30, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 27) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 40, 40, 36, 36, 36, 20, 20, 16, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
34, 34, 34, 34, 34, 34, 34, 34, 32, 32, 32, 32, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 28) {
GameDataManage2.curMaxNumber = 8
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 40, 40, 40, 40, 36, 36, 20, 20, 20, 12, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 29) {
GameDataManage2.curMaxNumber = 9
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
40, 40, 36, 36, 36, 36, 36, 36, 36, 20, 20, 12, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
else if (level == 30) {
GameDataManage2.curMaxNumber = 10
GameDataManage2.unLockFuBingArr = [1,1,1,1,1,1,1,1,1,1,1,1]
GameDataManage2.qiEShuLiangAll = [
36, 36, 36, 36, 36, 36, 36, 36, 32, 32, 20, 12, 12, 12, 12
]
//每列剩余数量(初始值为总数/12)
GameDataManage2.perLineLeftNumTab = [
36, 36, 36, 36, 36, 36, 34, 34, 34, 34, 34, 34, 0, 0
]
//当前主区出现的企鹅数据
GameDataManage2.curContentQiEData = [
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[-1, -1, -1], [-1, -1, -1],
[], []
]
//当前补位区出现的企鹅数据
GameDataManage2.curBuWeiContentQiEData = [
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[-1, -1, -1, -1], [-1, -1, -1, -1],
[], []
]
}
GameDataManage2.allAmount = 0;
for (let i = 0; i < GameDataManage2.qiEShuLiangAll.length; i++) {
GameDataManage2.allAmount += GameDataManage2.qiEShuLiangAll[i];
}
//计算消除n只企鹅增加一种类
let num = GameDataManage2.qiEShuLiangAll.length - GameDataManage2.curMaxNumber + 4
GameDataManage2.xiaoChuAddRate = Math.floor(GameDataManage2.allAmount/num)
//只出前n种
let zhongLeiNum = GameDataManage2.curMaxNumber
//每列剩余数量计算
for (let i = 0; i < GameDataManage2.curFuBingNum; i++) {
//减主区数量
let lineContentData = GameDataManage2.curContentQiEData[i]
GameDataManage2.perLineLeftNumTab[i] -= lineContentData.length
//减补位区数量
let lineBuWeiContentData = GameDataManage2.curBuWeiContentQiEData[i]
GameDataManage2.perLineLeftNumTab[i] -= lineBuWeiContentData.length
//初始化主区和补位区企鹅
for (let j = 0; j < 4; j++) {
// let id = 0
// if (lineContentData[j] == -1) {
// id = Math.floor(Math.random() * zhongLeiNum) + 1
// // id = i%4+1
// lineContentData[j] = id
// GameDataManage2.qiEShuLiangAll[id - 1] -= 1
// }
// if (lineBuWeiContentData[j] == -1) {
// id = Math.floor(Math.random() * zhongLeiNum) + 1
// // id = i%4+1
// lineBuWeiContentData[j] = id
// GameDataManage2.qiEShuLiangAll[id - 1] -= 1
// }
let id = 0
if (lineContentData[j] == -1) {
id = Math.floor(Math.random() * zhongLeiNum) + 1
// id = i%4+1
while (GameDataManage2.qiEShuLiangAll[id - 1] <= 0) {
id = Math.floor(Math.random() * zhongLeiNum) + 1
}
lineContentData[j] = id
GameDataManage2.qiEShuLiangAll[id - 1] -= 1
}
if (lineBuWeiContentData[j] == -1) {
id = Math.floor(Math.random() * zhongLeiNum) + 1
// id = i%4+1
while (GameDataManage2.qiEShuLiangAll[id - 1] <= 0) {
id = Math.floor(Math.random() * zhongLeiNum) + 1
}
lineBuWeiContentData[j] = id
GameDataManage2.qiEShuLiangAll[id - 1] -= 1
}
}
}
GameDataManage2.oldMaxNumber = GameDataManage2.curMaxNumber;
console.log("主区企鹅数据", GameDataManage2.curContentQiEData)
console.log("补位区企鹅数据", GameDataManage2.curBuWeiContentQiEData)
console.log("全部企鹅数量", GameDataManage2.qiEShuLiangAll)
console.log("每列剩余数量", GameDataManage2.perLineLeftNumTab)
}
}
/********* 游戏道具管理 **********/
export enum DaoJuType {
NiaoWo,//解锁鸟窝
FuBing,//浮冰道具
XiaoChu,//消除道具
ChongXinPaiXu,//重新排序
}
let DaoJuConfig = [
{ typeId: DaoJuType.NiaoWo, daoJuName: "解锁冰屋", maxUseNum: 999, desc: "合理运用冰屋有意想不到的效果!" },
{ typeId: DaoJuType.FuBing, daoJuName: "浮冰道具", maxUseNum: 2, desc: "再增加一块浮冰,作用巨大噢!" },
{ typeId: DaoJuType.XiaoChu, daoJuName: "消除道具", maxUseNum: 2, desc: "可消除任何一个你看不惯的企鹅!" },
{ typeId: DaoJuType.ChongXinPaiXu, daoJuName: "重排道具", maxUseNum: 2, desc: "浮冰上的企鹅重新排列一遍!" }
]
export class GamePropManage {
// public static daoJuJieSuoTab = []//道具是否解锁
// public static daoJuAdLeftTimes = []//道具剩余看广告次数
public static daoJuLeftUseTimes = []//道具剩余使用次数
public static initDaoJuJieSuoStatus() {
for (var i = 0; i < DaoJuConfig.length; i++) {
// this.daoJuJieSuoTab[i] = false
// this.daoJuAdLeftTimes[i] = DaoJuConfig[i].maxAdNum
// if(GMManager.getToggleStatus_DaoJu()){
// this.daoJuAdLeftTimes[i] = DaoJuConfig[i].GMmaxAdNum
// }
this.daoJuLeftUseTimes[i] = DaoJuConfig[i].maxUseNum
}
}
// //道具广告解锁状态
// public static setDaoJuJieSuoStatus(jieSuoId,bJieSuo){
// this.daoJuJieSuoTab[jieSuoId] = bJieSuo
// if(bJieSuo){
// this.daoJuAdLeftTimes[jieSuoId] -= 1
// this.daoJuLeftUseTimes[jieSuoId] = DaoJuConfig[jieSuoId].stepNum
// }
// }
// public static getDaoJuJieSuoStatusById(id){
// return this.daoJuJieSuoTab[id]
// }
// public static getDaoJuAdLeftTimes(id){
// return this.daoJuAdLeftTimes[id]
// }
//使用道具剩余使用次数
public static useDaoJuLeftUseTimes(id) {
this.daoJuLeftUseTimes[id] -= 1
// if(this.daoJuLeftUseTimes[id] <= 0){
// this.daoJuJieSuoTab[id] = false
// }
}
public static getDaoJuLeftUseTimes(id) {
return this.daoJuLeftUseTimes[id]
}
public static getDaoJuConfigById(type) {
for (var i = 0; i < DaoJuConfig.length; i++) {
if (type == DaoJuConfig[i].typeId) {
return DaoJuConfig[i]
}
}
}
}