增加纠错系统,修改两个错误关卡配置

This commit is contained in:
COMPUTER\EDY 2026-01-05 10:22:37 +08:00
parent a5a933f609
commit 51a36e7151
17 changed files with 479 additions and 483 deletions

View File

@ -256,7 +256,7 @@ export default class Block extends cc.Component {
else if (this.type == BlockType.) { else if (this.type == BlockType.) {
} }
}, 100); }, 200);
@ -508,15 +508,6 @@ export default class Block extends cc.Component {
} }
} }
} }
if (this.block_Info.moveFloor && this.block_Info.moveFloorTime) {
{
if (this.adhesiveNode.length > 0) {
for (let i = 0; i < this.adhesiveNode.length; i++) {
this.adhesiveNode[i].opacity = 0;
}
}
}
}
// let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[this.type]); // let adhesive = cc.instantiate(MapConroler._instance.Block_Prop[this.type]);
} }
@ -876,6 +867,7 @@ export default class Block extends cc.Component {
this.block_Info.node.getComponent("Block").moveStack = true; this.block_Info.node.getComponent("Block").moveStack = true;
} }
let touchPoint = event.getLocation(); let touchPoint = event.getLocation();
let local = this.node.parent.convertToNodeSpaceAR(touchPoint); let local = this.node.parent.convertToNodeSpaceAR(touchPoint);
this.touchPointX = local.x; this.touchPointX = local.x;
@ -890,6 +882,11 @@ export default class Block extends cc.Component {
} }
this.setVibrate("light", 1) this.setVibrate("light", 1)
if (this.hit) this.hit.active = true; if (this.hit) this.hit.active = true;
if (this.block_Info.floor) {
if (this.block_Info.floorMove == true) {
this.hit.active = false;
}
}
return true; return true;
} }
else { else {
@ -1026,7 +1023,7 @@ export default class Block extends cc.Component {
return; return;
} }
for (let i = 0; i < this.node.children.length; i++) { for (let i = 0; i < this.node.children.length; i++) {
if (this.node.children[i].name == "floor") { if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") {
this.node.children[i].getComponent("Floor").reduce(1); this.node.children[i].getComponent("Floor").reduce(1);
} }
} }
@ -1182,7 +1179,7 @@ export default class Block extends cc.Component {
setTimeout(() => { setTimeout(() => {
this.node.getChildByName("lock").getComponent("Lock").reduce(); this.node.getChildByName("lock").getComponent("Lock").reduce();
for (let i = 0; i < this.node.children.length; i++) { for (let i = 0; i < this.node.children.length; i++) {
if (this.node.children[i].name == "floor") { if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") {
this.node.children[i].getComponent("Floor").reduce(); this.node.children[i].getComponent("Floor").reduce();
} }
} }
@ -1190,7 +1187,7 @@ export default class Block extends cc.Component {
return; return;
} }
for (let i = 0; i < this.node.children.length; i++) { for (let i = 0; i < this.node.children.length; i++) {
if (this.node.children[i].name == "floor") { if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") {
this.node.children[i].getComponent("Floor").reduce(1); this.node.children[i].getComponent("Floor").reduce(1);
} }
} }
@ -1403,7 +1400,7 @@ export default class Block extends cc.Component {
this.block_Info.floorTime = null; this.block_Info.floorTime = null;
for (let i = 0; i < this.node.children.length; i++) { for (let i = 0; i < this.node.children.length; i++) {
if (this.node.children[i].name == "floor") { if (this.node.children[i].name == "floor" || this.node.children[i].name == "moveFloor") {
this.node.children[i].active = false; this.node.children[i].active = false;
} }
} }
@ -2029,7 +2026,7 @@ export default class Block extends cc.Component {
} }
} }
floor.parent = this.node; floor.parent = this.node;
floor.zIndex = 999; floor.zIndex = 999 - i;
let floorX = - 65 + 120 * this.allBlocks[i].x; let floorY = 60 + 120 * this.allBlocks[i].y; let floorX = - 65 + 120 * this.allBlocks[i].x; let floorY = 60 + 120 * this.allBlocks[i].y;
floor.setPosition(floorX, floorY); floor.setPosition(floorX, floorY);
floor.getComponent("Floor").init(this.block_Info.floorTime); floor.getComponent("Floor").init(this.block_Info.floorTime);
@ -2041,7 +2038,7 @@ export default class Block extends cc.Component {
} }
if (this.type == BlockType.) { if (this.type == BlockType.) {
for (let j = 0; j < this.node.children.length; j++) { for (let j = 0; j < this.node.children.length; j++) {
if (this.node.children[j].name == "floor") { if (this.node.children[j].name == "floor" || this.node.children[j].name == "moveFloor") {
this.node.children[j].active = false; this.node.children[j].active = false;
} }
} }
@ -2065,7 +2062,7 @@ export default class Block extends cc.Component {
} }
if (this.type == BlockType.) { if (this.type == BlockType.) {
for (let j = 0; j < this.node.children.length; j++) { for (let j = 0; j < this.node.children.length; j++) {
if (this.node.children[j].name == "floor") { if (this.node.children[j].name == "floor" || this.node.children[j].name == "moveFloor") {
this.node.children[j].active = false; this.node.children[j].active = false;
} }
} }

View File

@ -54,6 +54,7 @@ export default class GameManager extends cc.Component {
// LIFE-CYCLE CALLBACKS: // LIFE-CYCLE CALLBACKS:
/** 游戏入口初始化 */ /** 游戏入口初始化 */
onLoad() { onLoad() {
window.initMgr(); window.initMgr();
this.timeNumber = 2; this.timeNumber = 2;
// cc.director.preloadScene("HomeScene", (err, asset) => { // cc.director.preloadScene("HomeScene", (err, asset) => {
@ -61,6 +62,9 @@ export default class GameManager extends cc.Component {
this.startTimeCutDown(); this.startTimeCutDown();
cc.fx.GameConfig.init(true); cc.fx.GameConfig.init(true);
cc.fx.GameConfig.GM_INFO.gameState = false; cc.fx.GameConfig.GM_INFO.gameState = false;
setTimeout(() => {
cc.fx.GameTool.initWechatErrorTracking();
}, 500);
this.readMusicConfig(); this.readMusicConfig();
this.load1 = this.load2 = this.load3 = this.load4 = this.load5 = this.load6 = false; this.load1 = this.load2 = this.load3 = this.load4 = this.load5 = this.load6 = false;

View File

@ -78,6 +78,7 @@ export default class JiaZai extends cc.Component {
@property(cc.Node) @property(cc.Node)
Stamina: cc.Node = null; Stamina: cc.Node = null;
scheduleCallback: any; scheduleCallback: any;
isShow: boolean = true;
private heath: any; // 用于存储heath预制体 private heath: any; // 用于存储heath预制体
private lastPauseClickTime: number = 0; // 用于记录上次点击的时间戳 private lastPauseClickTime: number = 0; // 用于记录上次点击的时间戳
// 弹窗倒计时调度器 // 弹窗倒计时调度器
@ -119,6 +120,8 @@ export default class JiaZai extends cc.Component {
this.getShareInfo(); this.getShareInfo();
} }
initProvinceLocator(); initProvinceLocator();
// this.RankNode = null;
this.isShow = true;
this.node.getChildByName("Snow").active = false; this.node.getChildByName("Snow").active = false;
this.node.getChildByName("Snow").zIndex = 999; this.node.getChildByName("Snow").zIndex = 999;
console.log("最新版本___________"); console.log("最新版本___________");
@ -129,7 +132,7 @@ export default class JiaZai extends cc.Component {
this.closeAvatar(); this.closeAvatar();
this.setShareInfo(); this.setShareInfo();
this.checkTasks(); this.checkTasks();
this.getSRank();
this.checkAndSetPlayerPassLevel(); this.checkAndSetPlayerPassLevel();
// this.checkDailyQuests(); // this.checkDailyQuests();
console.log("进入首页获取的share", cc.fx.GameConfig.GM_INFO.otherUid, cc.fx.GameConfig.GM_INFO.otherLevel); console.log("进入首页获取的share", cc.fx.GameConfig.GM_INFO.otherUid, cc.fx.GameConfig.GM_INFO.otherLevel);
@ -265,6 +268,7 @@ export default class JiaZai extends cc.Component {
if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) { if (cc.fx.GameConfig.GM_INFO.otherLevel > 0) {
this.getSRank(false);
if (cc.fx.GameConfig.GM_INFO.first) { if (cc.fx.GameConfig.GM_INFO.first) {
this.setFirstMusic(); this.setFirstMusic();
cc.fx.GameConfig.GM_INFO.first = false; cc.fx.GameConfig.GM_INFO.first = false;
@ -279,11 +283,14 @@ export default class JiaZai extends cc.Component {
} }
else { else {
// this.closeLoad(); // this.closeLoad();
this.isShow = false;
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, true); cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, true);
} }
} }
else { else {
if (cc.fx.GameConfig.GM_INFO.first) { if (cc.fx.GameConfig.GM_INFO.first) {
this.isShow = false;
this.getSRank(false);
//console.log("————————准备注册事件", cc.fx.GameConfig.GM_INFO.openid); //console.log("————————准备注册事件", cc.fx.GameConfig.GM_INFO.openid);
this.setFirstMusic(); this.setFirstMusic();
cc.fx.AudioManager._instance.playEffect("zhuan1", null); cc.fx.AudioManager._instance.playEffect("zhuan1", null);
@ -294,6 +301,9 @@ export default class JiaZai extends cc.Component {
cc.director.loadScene("GameScene"); cc.director.loadScene("GameScene");
}, 1000); }, 1000);
} }
else {
this.getSRank(true);
}
} }
//console.log("音乐开关", cc.fx.GameConfig.GM_INFO.musicOpen); //console.log("音乐开关", cc.fx.GameConfig.GM_INFO.musicOpen);
@ -912,6 +922,7 @@ export default class JiaZai extends cc.Component {
cc.fx.GameTool.requestSubscribe(); cc.fx.GameTool.requestSubscribe();
return; return;
} }
this.isShow = false;
cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false);
} }
else { else {
@ -923,6 +934,7 @@ export default class JiaZai extends cc.Component {
cc.fx.GameTool.requestSubscribe(); cc.fx.GameTool.requestSubscribe();
return; return;
} }
this.isShow = false;
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false); cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false);
} }
} }
@ -935,7 +947,7 @@ export default class JiaZai extends cc.Component {
cc.fx.AudioManager._instance.playEffect("zhuan1", null); cc.fx.AudioManager._instance.playEffect("zhuan1", null);
this.node.getChildByName("zhuanchang").active = true; this.node.getChildByName("zhuanchang").active = true;
this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false); this.node.getChildByName("zhuanchang").getComponent(sp.Skeleton).setAnimation(1, "up", false);
this.isShow = false;
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false); cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false);
} }
else { else {
@ -947,6 +959,7 @@ export default class JiaZai extends cc.Component {
cc.fx.GameTool.requestSubscribe(); cc.fx.GameTool.requestSubscribe();
return; return;
} }
this.isShow = false;
cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false); cc.fx.GameConfig.LEVEL_INFO_init(true, 0, false);
} }
else { else {
@ -958,6 +971,7 @@ export default class JiaZai extends cc.Component {
cc.fx.GameTool.requestSubscribe(); cc.fx.GameTool.requestSubscribe();
return; return;
} }
this.isShow = false;
cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false); cc.fx.GameConfig.LEVEL_INFO_init(true, 1000, false);
} }
} }
@ -2475,12 +2489,12 @@ export default class JiaZai extends cc.Component {
} }
//获取入职排行榜 //获取入职排行榜
getSRank() { getSRank(isShow: boolean = true) {
console.log("_________________________重新获取排行"); console.log("_________________________重新获取排行");
if (this.RankNode == null && this.RankNode == undefined) { if (this.RankNode == null && this.RankNode == undefined) {
this.LoadCareer(() => { this.LoadCareer(() => {
Utils.getSRank(res => { Utils.getSRank(res => {
debugger;
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
let role = data.role; let role = data.role;
let sortedArray = []; let sortedArray = [];
@ -2572,11 +2586,11 @@ export default class JiaZai extends cc.Component {
this.node.getChildByName("Snow").active = true; this.node.getChildByName("Snow").active = true;
}) })
.start() .start()
}) }, true)
} }
// console.log("rankingData_________", rankData); // console.log("rankingData_________", rankData);
}); });
}); }, isShow);
} }
} }
@ -2664,13 +2678,13 @@ export default class JiaZai extends cc.Component {
this.node.getChildByName("Snow").active = true; this.node.getChildByName("Snow").active = true;
}) })
.start() .start()
}) }, true)
} }
// console.log("rankData更新!!!!!!!!", this.careerRank.rankData); // console.log("rankData更新!!!!!!!!", this.careerRank.rankData);
} }
LoadCareer(callback: () => void) { LoadCareer(callback: () => void, isShow: boolean = true) {
cc.assetManager.loadBundle('career', (err: Error, bundle: cc.AssetManager.Bundle) => { cc.assetManager.loadBundle('career', (err: Error, bundle: cc.AssetManager.Bundle) => {
if (err) { if (err) {
cc.error(err.message || err); cc.error(err.message || err);
@ -2683,8 +2697,11 @@ export default class JiaZai extends cc.Component {
return; return;
} }
this.RankNode = cc.instantiate(prefab); this.RankNode = cc.instantiate(prefab);
if (callback) if (isShow = true && this.isShow == true) {
callback(); if (callback)
callback();
}
}); });
}); });
} }

View File

@ -670,8 +670,11 @@ export default class MapConroler extends cc.Component {
position: blockInfo.position, position: blockInfo.position,
stacking: blockInfo.color stacking: blockInfo.color
}; };
if (blockInfo.floor) info["floor"] = blockInfo.floor; if (blockInfo.floor) {
if (blockInfo.floorTime) info["floorTime"] = blockInfo.floorTime; info["floor"] = blockInfo.floor;
if (blockInfo.floorTime) info["floorTime"] = blockInfo.floorTime;
}
// 缓存 Block_Array 访问 // 缓存 Block_Array 访问
const blockUpPrefab = this.Block_Array[info.block]; const blockUpPrefab = this.Block_Array[info.block];
@ -2038,7 +2041,7 @@ export default class MapConroler extends cc.Component {
for (let i = 0; i < floorBlock.length; i++) { for (let i = 0; i < floorBlock.length; i++) {
for (let j = 0; j < floorBlock[i].children.length; j++) { for (let j = 0; j < floorBlock[i].children.length; j++) {
if (floorBlock[i].children[j].name == "floor") { if (floorBlock[i].children[j].name == "floor" || floorBlock[i].children[j].name == "moveFloor") {
floorBlock[i].children[j].getComponent("Floor").reduce(1); floorBlock[i].children[j].getComponent("Floor").reduce(1);
} }
} }

View File

@ -298,12 +298,12 @@ export class LQCollide extends Component {
case LQCollideShape.Rect: case LQCollideShape.Rect:
// 矩形碰撞区域尺寸更新 // 矩形碰撞区域尺寸更新
// console.log(this.data_string); // console.log(this.data_string);
if (this._size.width !== 10 && this.data_string != "-1") { if (this._size.width !== 10 && this.data_string != "-1" && this.data_string != "-2") {
// if(this._size.width == 105 || this._size.height == 105){} // if(this._size.width == 105 || this._size.height == 105){}
this._size.width = this._size.width * scaleX; this._size.width = this._size.width * scaleX;
// console.log("放大倍数",scaleX); // console.log("放大倍数",scaleX);
} }
if (this._size.height !== 10 && this.data_string != "-1") { if (this._size.height !== 10 && this.data_string != "-1" && this.data_string != "-2") {
// if(this._size.width == 105 || this._size.height == 105){} // if(this._size.width == 105 || this._size.height == 105){}
this._size.height = this._size.height * scaleY; this._size.height = this._size.height * scaleY;
// console.log("放大倍数",scaleY); // console.log("放大倍数",scaleY);
@ -366,10 +366,10 @@ export class LQCollide extends Component {
if (collide.node.name == "rise" && block.type == 9) { if (collide.node.name == "rise" && block.type == 9) {
let otherColor = collide.node.parent.getChildByName("risefall").getChildByName("color").getComponent(cc.Label).string; let otherColor = collide.node.parent.getChildByName("risefall").getChildByName("color").getComponent(cc.Label).string;
if (block.color == otherColor && this.data_string != "-1") { if (block.color == otherColor && this.data_string != "-1" && this.data_string != "-2") {
return; return;
} }
if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string == "-1") { if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string != "-1" && this.data_string != "-2") {
return; return;
} }
// if (this.is_music == false) { // if (this.is_music == false) {
@ -432,10 +432,10 @@ export class LQCollide extends Component {
if (block.isTouch) { if (block.isTouch) {
if (collide.node.name == "rise" && block.type == 9) { if (collide.node.name == "rise" && block.type == 9) {
let otherColor = collide.node.parent.getChildByName("risefall").getChildByName("color").getComponent(cc.Label).string; let otherColor = collide.node.parent.getChildByName("risefall").getChildByName("color").getComponent(cc.Label).string;
if (block.color == otherColor && this.data_string != "-1") { if (block.color == otherColor && this.data_string != "-1" && this.data_string != "-2") {
return; return;
} }
if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string == "-1") { if (block.block_Info.node.getComponent("Block").color == otherColor && this.data_string != "-1" && this.data_string != "-2") {
return; return;
} }
} }

View File

@ -66,6 +66,7 @@ export class GameConfig {
static CITY: { 河北省: boolean; 山西省: boolean; 辽宁省: boolean; 吉林省: boolean; 黑龙江省: boolean; 江苏省: boolean; 浙江省: boolean; 安徽省: boolean; 福建省: boolean; 江西省: boolean; 山东省: boolean; 河南省: boolean; 湖北省: boolean; 湖南省: boolean; 广东省: boolean; 海南省: boolean; 四川省: boolean; 贵州省: boolean; 云南省: boolean; 陕西省: boolean; 甘肃省: boolean; 青海省: boolean; 港澳台: boolean; 北京: boolean; 天津: boolean; 上海: boolean; 重庆: boolean; 内蒙古: boolean; 广西: boolean; 西藏: boolean; 宁夏: boolean; 新疆: boolean; }; static CITY: { 河北省: boolean; 山西省: boolean; 辽宁省: boolean; 吉林省: boolean; 黑龙江省: boolean; 江苏省: boolean; 浙江省: boolean; 安徽省: boolean; 福建省: boolean; 江西省: boolean; 山东省: boolean; 河南省: boolean; 湖北省: boolean; 湖南省: boolean; 广东省: boolean; 海南省: boolean; 四川省: boolean; 贵州省: boolean; 云南省: boolean; 陕西省: boolean; 甘肃省: boolean; 青海省: boolean; 港澳台: boolean; 北京: boolean; 天津: boolean; 上海: boolean; 重庆: boolean; 内蒙古: boolean; 广西: boolean; 西藏: boolean; 宁夏: boolean; 新疆: boolean; };
static GM_INFO: { static GM_INFO: {
// isEnd: false, // isEnd: false,
error_message: any[]; // 错误信息
mean_Time: number; //平均放箭速度 mean_Time: number; //平均放箭速度
hp: number; //体力值 hp: number; //体力值
review: number; //复活次数 review: number; //复活次数
@ -155,6 +156,7 @@ export class GameConfig {
//游戏内信息 //游戏内信息
static get Instance() { static get Instance() {
@ -245,6 +247,7 @@ export class GameConfig {
static GM_INFO_init() { static GM_INFO_init() {
this.GM_INFO = { this.GM_INFO = {
// isEnd: false, // isEnd: false,
error_message: [], // 错误信息
mean_Time: 0, //平均放箭速度 mean_Time: 0, //平均放箭速度
hp: 5, //体力值 hp: 5, //体力值
review: 0, //复活次数 review: 0, //复活次数

View File

@ -2025,6 +2025,60 @@ var GameTool = {
const scaleAction = cc.scaleTo(duration, scale).easing(cc.easeBackOut()); const scaleAction = cc.scaleTo(duration, scale).easing(cc.easeBackOut());
const reverseAction = cc.scaleTo(duration, 1).easing(cc.easeBackIn()); const reverseAction = cc.scaleTo(duration, 1).easing(cc.easeBackIn());
node.runAction(cc.sequence(scaleAction, reverseAction)); node.runAction(cc.sequence(scaleAction, reverseAction));
},
// ==================== 错误跟踪功能 ====================
initWechatErrorTracking() {
if (cc.sys.platform === cc.sys.WECHAT_GAME) {
// 使用 wx.onError 捕获微信特定的错误
//@ts-ignore
wx.onError((error) => {
console.log("_____________________wx.onError 捕获到错误", error);
this.trackErrorToShushu(error)
});
console.log('微信 onError 错误监听已初始化');
}
},
// 获取错误堆栈信息
getErrorStack(error: any): string {
if (error.stack) {
return error.stack;
}
if (error.message) {
return error.message;
}
if (error.toString) {
return error.toString();
}
return JSON.stringify(error);
},
trackErrorToShushu(error: any) {
console.log("_____________________上报错误");
if (!cc.fx.GameConfig.GM_INFO.error_message.includes(error.message)) {
cc.fx.GameConfig.GM_INFO.error_message.push(error.message);
}
else {
console.log("_____________________上报结束关闭重复");
//@ts-ignore
wx.offError();
}
let errorData = {
error_type: "javascript",
error_message: error.message || String(error),
error_stack: error.stack || '',
game_version: cc.fx.GameConfig.GM_INFO?.version || 'unknown',
user_id: cc.fx.GameConfig.GM_INFO?.userId || 'unknown',
level: cc.fx.GameConfig.GM_INFO?.level || 0,
timestamp: Date.now(),
coin: cc.fx.GameConfig.GM_INFO?.coin || 0
};
MiniGameSdk.API.shushu_Track('error', errorData);
} }
}; };
export { GameTool }; export { GameTool };

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.5 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

View File

@ -25,9 +25,9 @@
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 120, "width": 120,
"height": 120, "height": 132,
"rawWidth": 120, "rawWidth": 120,
"rawHeight": 120, "rawHeight": 132,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,

View File

@ -60,15 +60,21 @@ export default class CareerItem extends cc.Component {
this.node.getChildByName("ranking").getChildByName("nomal").active = true; this.node.getChildByName("ranking").getChildByName("nomal").active = true;
NumberToImage.numberToImageNodes4(this.data.rank, 43, 15, "company_", this.node.getChildByName("ranking").getChildByName("nomal").getChildByName("rank"), true); NumberToImage.numberToImageNodes4(this.data.rank, 43, 15, "company_", this.node.getChildByName("ranking").getChildByName("nomal").getChildByName("rank"), true);
let rank = this.node.getChildByName("ranking").getChildByName("nomal").getChildByName("rank"); let rank = this.node.getChildByName("ranking").getChildByName("nomal").getChildByName("rank");
for (let i = 0; i < rank.children.length; i++) { if (rank.children.length > 0) {
rank.children[i].color = cc.Color.WHITE; for (let i = 0; i < rank.children.length; i++) {
rank.children[i].color = cc.Color.WHITE;
}
} }
} }
this.node.zIndex = this.data.rank; this.node.zIndex = this.data.rank;
if (this.randerChildren.length == 0) { if (this.randerChildren.length == 0) {
this.randerChildren = []; this.randerChildren = [];
let length = this.data.rankingData.length + 4; let lengthTemp = 0;
if (this.data.rankingData.length) {
lengthTemp = this.data.rankingData.length;
}
let length = lengthTemp + 4;
if (length > 12) length = 12; if (length > 12) length = 12;
for (let i = 4; i < length; i++) { for (let i = 4; i < length; i++) {
this.randerChildren.push(this.node.children[i]); this.randerChildren.push(this.node.children[i]);

View File

@ -291,12 +291,14 @@ export default class CareerList extends cc.Component {
if (viewPos) { if (viewPos) {
//item上滑时超出了scrollView上边界将item移动到下方复用item移动到下方的位置必须不超过content的下边界 //item上滑时超出了scrollView上边界将item移动到下方复用item移动到下方的位置必须不超过content的下边界
if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height - firstRenderOffsetY) { if (viewPos.y > bufferZone && item.y - offset - this.padding_buttom > -this.content.height - firstRenderOffsetY) {
let itemRender: CareerItem = item.getComponent(CareerItem); if (item.getComponent(CareerItem)) {
let itemIndex = itemRender.itemIndex + items.length; let itemRender: CareerItem = item.getComponent(CareerItem);
itemRender.itemIndex = itemIndex; let itemIndex = itemRender.itemIndex + items.length;
itemRender.data = this.itemDataList[itemIndex]; itemRender.itemIndex = itemIndex;
itemRender.dataChanged(); itemRender.data = this.itemDataList[itemIndex];
item.y = item.y - offset; itemRender.dataChanged();
item.y = item.y - offset;
}
} }
} }
@ -304,12 +306,14 @@ export default class CareerList extends cc.Component {
if (viewPos) { if (viewPos) {
//item下滑时超出了scrollView下边界将item移动到上方复用item移动到上方的位置必须不超过content的上边界 //item下滑时超出了scrollView下边界将item移动到上方复用item移动到上方的位置必须不超过content的上边界
if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < -firstRenderOffsetY) { if (viewPos.y < -bufferZone && item.y + offset + this.padding_top < -firstRenderOffsetY) {
let itemRender: CareerItem = item.getComponent(CareerItem); if (item.getComponent(CareerItem)) {
let itemIndex = itemRender.itemIndex - items.length; let itemRender: CareerItem = item.getComponent(CareerItem);
itemRender.itemIndex = itemIndex; let itemIndex = itemRender.itemIndex - items.length;
itemRender.data = this.itemDataList[itemIndex]; itemRender.itemIndex = itemIndex;
itemRender.dataChanged(); itemRender.data = this.itemDataList[itemIndex];
item.y = item.y + offset; itemRender.dataChanged();
item.y = item.y + offset;
}
} }
} }
} }
@ -434,39 +438,42 @@ export default class CareerList extends cc.Component {
public firstRenderInit() { public firstRenderInit() {
// let // let
this.firstRender.active = true; this.firstRender.active = true;
if (this.randerChildren.length == 0) { if (this.randerChildren) {
this.randerChildren = []; if (this.randerChildren.length == 0) {
let length = this.topData.length + 3; this.randerChildren = [];
if (length > this.firstRender.children.length) let length = this.topData.length + 3;
length = this.firstRender.children.length; if (length > this.firstRender.children.length)
for (let i = 3; i < length; i++) { length = this.firstRender.children.length;
this.randerChildren.push(this.firstRender.children[i]); for (let i = 3; i < length; i++) {
let username = cc.fx.GameTool.subName(this.topData[i - 3].username, 5); this.randerChildren.push(this.firstRender.children[i]);
if (username == "user") username = "匿名玩家"; let username = cc.fx.GameTool.subName(this.topData[i - 3].username, 5);
this.firstRender.children[i].getChildByName("name").getComponent(cc.Label).string = username + ""; if (username == "user") username = "匿名玩家";
this.firstRender.children[i].getChildByName("rank").getComponent(cc.Label).string = this.topData[i - 3].addLevel; this.firstRender.children[i].getChildByName("name").getComponent(cc.Label).string = username + "";
if (this.topData[i - 3].useravatar == "" || this.topData[i - 3].useravatar == null || this.topData[i - 3].useravatar == undefined this.firstRender.children[i].getChildByName("rank").getComponent(cc.Label).string = this.topData[i - 3].addLevel;
) { if (this.topData[i - 3].useravatar == "" || this.topData[i - 3].useravatar == null || this.topData[i - 3].useravatar == undefined
// this.firstRender.children[i].getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.defaultsprite; ) {
} // this.firstRender.children[i].getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.defaultsprite;
else if (this.topData[i - 3].useravatar == "0" || this.topData[i - 3].useravatar == "1" || this.topData[i - 3].useravatar == "2" }
|| this.topData[i - 3].useravatar == "3" || this.topData[i - 3].useravatar == "4" || this.topData[i - 3].useravatar == "5" || this.topData[i - 3].useravatar == "6" else if (this.topData[i - 3].useravatar == "0" || this.topData[i - 3].useravatar == "1" || this.topData[i - 3].useravatar == "2"
|| this.topData[i - 3].useravatar == "7" || this.topData[i - 3].useravatar == "8" || this.topData[i - 3].useravatar == "9" || || this.topData[i - 3].useravatar == "3" || this.topData[i - 3].useravatar == "4" || this.topData[i - 3].useravatar == "5" || this.topData[i - 3].useravatar == "6"
this.topData[i - 3].useravatar == "10" || this.topData[i - 3].useravatar == "11" || this.topData[i - 3].useravatar == "12" || this.topData[i - 3].useravatar == "13" || this.topData[i - 3].useravatar == "14" || this.topData[i - 3].useravatar == "7" || this.topData[i - 3].useravatar == "8" || this.topData[i - 3].useravatar == "9" ||
|| this.topData[i - 3].useravatar == "15" || this.topData[i - 3].useravatar == "16" || this.topData[i - 3].useravatar == "17" this.topData[i - 3].useravatar == "10" || this.topData[i - 3].useravatar == "11" || this.topData[i - 3].useravatar == "12" || this.topData[i - 3].useravatar == "13" || this.topData[i - 3].useravatar == "14"
) { || this.topData[i - 3].useravatar == "15" || this.topData[i - 3].useravatar == "16" || this.topData[i - 3].useravatar == "17"
) {
let useravatar = this.topData[i - 3].useravatar; let useravatar = this.topData[i - 3].useravatar;
let useravatarTemp = "icon_" + useravatar; let useravatarTemp = "icon_" + useravatar;
// console.log("222头像名称", useravatarTemp, "333用户名字:", username); // console.log("222头像名称", useravatarTemp, "333用户名字:", username);
this.firstRender.children[i].getChildByName("mask").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.UI.getSpriteFrame(useravatarTemp); this.firstRender.children[i].getChildByName("mask").getChildByName("icon").getComponent(cc.Sprite).spriteFrame = this.UI.getSpriteFrame(useravatarTemp);
this.firstRender.children[i].getChildByName("mask").getChildByName("icon").width = 150; this.firstRender.children[i].getChildByName("mask").getChildByName("icon").width = 150;
this.firstRender.children[i].getChildByName("mask").getChildByName("icon").height = 150; this.firstRender.children[i].getChildByName("mask").getChildByName("icon").height = 150;
}
else this.setPic(this.topData[i - 3].useravatar, this.firstRender.children[i].getChildByName("mask").getChildByName("icon"));
} }
else this.setPic(this.topData[i - 3].useravatar, this.firstRender.children[i].getChildByName("mask").getChildByName("icon"));
} }
} }
} }
public setPic(url, node) { public setPic(url, node) {

View File

@ -41,13 +41,13 @@ export default class CareerManager extends cc.Component {
} }
//实际设置排行数据 //实际设置排行数据
public getRankData(data) { // public getRankData(data) {
if (data) { // if (data) {
// console.log(data); // // console.log(data);
cc.fx.GameTool.getRankData(data, this, 6); // cc.fx.GameTool.getRankData(data, this, 6);
this.setPic(this.selfData.pic); // this.setPic(this.selfData.pic);
} // }
} // }
//返回按钮 //返回按钮
public backClick() { public backClick() {
cc.director.loadScene("LoadScene"); cc.director.loadScene("LoadScene");
@ -55,40 +55,43 @@ export default class CareerManager extends cc.Component {
//最上方用户动画 //最上方用户动画
//设置头像 处理的逻辑比较多,不用公共类的了 //设置头像 处理的逻辑比较多,不用公共类的了
public setPic(pic) { // public setPic(pic) {
this.phone.node.parent.getChildByName("icon").active = false; // this.phone.node.parent.getChildByName("icon").active = false;
this.phone.node.active = false; // this.phone.node.active = false;
fetch(pic) // fetch(pic)
.then(response => { // .then(response => {
return response.headers.get('Content-Length'); // return response.headers.get('Content-Length');
}) // })
.then(errNo => { // .then(errNo => {
if (errNo == "5093") { // if (errNo == "5093") {
this.phone.node.parent.getChildByName("icon").active = true; // this.phone.node.parent.getChildByName("icon").active = true;
} // }
}) // })
.catch(error => { // .catch(error => {
// console.error('Error fetching X-Info:', error); // // console.error('Error fetching X-Info:', error);
}); // });
var self = this; // var self = this;
cc.assetManager.loadRemote(pic, { ext: '.png' }, (err, texture: cc.Texture2D) => { // cc.assetManager.loadRemote(pic, { ext: '.png' }, (err, texture: cc.Texture2D) => {
if (texture) { // if (texture) {
self.phone.node.active = true; // self.phone.node.active = true;
self.phone.spriteFrame = new cc.SpriteFrame(texture); // self.phone.spriteFrame = new cc.SpriteFrame(texture);
} // }
else { // else {
} // }
}) // })
} // }
public setData(data, topData) { public setData(data, topData) {
this.selfData = data; this.selfData = data;
this.rankList.setData(this.listData, topData); this.rankList.setData(this.listData, topData);
if (data.length > 0) { if (data) {
this.rankNumber = data[0].rank; if (data.length > 0) {
this.rankTotal = data.length; this.rankNumber = data[0].rank;
this.rankTotal = data.length;
}
} }
} }
} }

View File

@ -377,9 +377,7 @@
"color": 6, "color": 6,
"special": 3, "special": 3,
"length": 1, "length": 1,
"freeze": 11, "freeze": 11
"longAndShort": 12,
"order": true
} }
] ]
] ]

View File

@ -305,13 +305,12 @@
{ {
"block": 2, "block": 2,
"color": 8, "color": 8,
"type": 17, "type": 0,
"position": { "position": {
"x": 240, "x": 240,
"y": -60, "y": -60,
"z": 0 "z": 0
}, },
"boomTime": 1,
"floor": 2, "floor": 2,
"floorTime": 9, "floorTime": 9,
"floorMove": false, "floorMove": false,
@ -320,13 +319,12 @@
{ {
"block": 1, "block": 1,
"color": 7, "color": 7,
"type": 17, "type": 0,
"position": { "position": {
"x": 240, "x": 240,
"y": -180, "y": -180,
"z": 0 "z": 0
}, },
"boomTime": 1,
"floor": 2, "floor": 2,
"floorTime": 9, "floorTime": 9,
"floorMove": false, "floorMove": false,

View File

@ -2,532 +2,438 @@
"LEVEL_INFO": [ "LEVEL_INFO": [
{ {
"risefall": [], "risefall": [],
"id": "886", "id": "466",
"map": [ "map": [
10, 9,
12 10
], ],
"time": 140, "time": 150,
"gap": [ "gap": []
{
"x": 8,
"y": 10,
"z": 0
},
{
"x": 7,
"y": 10,
"z": 0
},
{
"x": 6,
"y": 10,
"z": 0
},
{
"x": 6,
"y": 9,
"z": 0
},
{
"x": 7,
"y": 9,
"z": 0
},
{
"x": 8,
"y": 9,
"z": 0
},
{
"x": 8,
"y": 8,
"z": 0
},
{
"x": 7,
"y": 8,
"z": 0
},
{
"x": 6,
"y": 8,
"z": 0
},
{
"x": 1,
"y": 8,
"z": 0
},
{
"x": 2,
"y": 8,
"z": 0
},
{
"x": 2,
"y": 7,
"z": 0
},
{
"x": 1,
"y": 7,
"z": 0
},
{
"x": 1,
"y": 6,
"z": 0
},
{
"x": 1,
"y": 5,
"z": 0
},
{
"x": 1,
"y": 4,
"z": 0
},
{
"x": 1,
"y": 3,
"z": 0
},
{
"x": 2,
"y": 3,
"z": 0
},
{
"x": 2,
"y": 4,
"z": 0
},
{
"x": 2,
"y": 5,
"z": 0
},
{
"x": 2,
"y": 6,
"z": 0
},
{
"x": 6,
"y": 1,
"z": 0
},
{
"x": 5,
"y": 1,
"z": 0
},
{
"x": 5,
"y": 2,
"z": 0
},
{
"x": 6,
"y": 2,
"z": 0
},
{
"x": 6,
"y": 3,
"z": 0
},
{
"x": 5,
"y": 3,
"z": 0
}
]
} }
], ],
"BLOCK_INFO": [ "BLOCK_INFO": [
[ [
{ {
"block": 5, "block": 2,
"color": 9, "color": 5,
"type": 0, "type": 8,
"position": { "position": {
"x": 0, "x": -180,
"y": -600,
"z": 0
},
"id": 210
},
{
"block": 4,
"color": 9,
"type": 0,
"position": {
"x": 120,
"y": 240, "y": 240,
"z": 0 "z": 0
}, },
"floor": 1,
"floorTime": 5,
"id": 210
},
{
"block": 2,
"color": 6,
"type": 4,
"position": {
"x": -300,
"y": 240,
"z": 0
},
"freezeTime": 12,
"floor": 1,
"floorTime": 5,
"id": 220 "id": 220
}, },
{ {
"block": 6, "block": 3,
"color": 2, "color": 1,
"type": 0, "type": 0,
"position": { "position": {
"x": -120, "x": 180,
"y": 120, "y": 120,
"z": 0 "z": 0
}, },
"floor": 2,
"floorTime": 10,
"floorMove": true,
"id": 230 "id": 230
}, },
{ {
"block": 2, "block": 1,
"color": 2, "color": 2,
"type": 0, "type": 0,
"position": { "position": {
"x": 0, "x": 60,
"y": 0, "y": 0,
"z": 0 "z": 0
}, },
"floor": 2,
"floorTime": 10,
"floorMove": true,
"id": 240 "id": 240
}, },
{ {
"block": 1, "block": 0,
"color": 7, "color": 3,
"type": 0, "type": 0,
"position": { "position": {
"x": 480, "x": 180,
"y": -360, "y": 0,
"z": 0 "z": 0
}, },
"floor": 2,
"floorTime": 10,
"floorMove": true,
"id": 250 "id": 250
}, },
{ {
"block": 2, "block": 5,
"color": 7, "color": 8,
"type": 0, "type": 8,
"position": { "position": {
"x": -360, "x": 420,
"y": -600, "y": -240,
"z": 0 "z": 0
}, },
"floor": 3,
"floorTime": 15,
"id": 260 "id": 260
}, },
{ {
"block": 0, "block": 0,
"color": 7, "color": 5,
"type": 0, "type": 0,
"position": { "position": {
"x": 120, "x": -60,
"y": -120, "y": 360,
"z": 0 "z": 0
}, },
"id": 270 "id": 270
}, },
{ {
"block": 2, "block": 0,
"color": 10, "color": 5,
"type": 0, "type": 0,
"position": { "position": {
"x": 360, "x": 420,
"y": -240, "y": 0,
"z": 0 "z": 0
}, },
"id": 280 "id": 280
}, },
{ {
"block": 2, "block": 1,
"color": 10, "color": 5,
"type": 0, "type": 0,
"position": { "position": {
"x": 0, "x": -180,
"y": -360, "y": 120,
"z": 0 "z": 0
}, },
"id": 290 "id": 290
}, },
{ {
"block": 1, "block": 3,
"color": 4, "color": 3,
"type": 0, "type": 0,
"position": { "position": {
"x": 240, "x": 300,
"y": 0, "y": 360,
"z": 0 "z": 0
}, },
"id": 300 "id": 300
}, },
{ {
"block": 2, "block": 0,
"color": 5, "color": 2,
"type": 0, "type": 0,
"position": { "position": {
"x": 0, "x": -60,
"y": 360, "y": 240,
"z": 0 "z": 0
}, },
"id": 310 "id": 310
}, },
{ {
"block": 0, "block": 2,
"color": 6, "color": 10,
"type": 0, "type": 0,
"position": { "position": {
"x": -240, "x": -300,
"y": 480, "y": -480,
"z": 0 "z": 0
}, },
"id": 320 "id": 320
}, },
{ {
"block": 2, "block": 2,
"color": 3, "color": 10,
"type": 0, "type": 0,
"position": { "position": {
"x": -120, "x": -60,
"y": -240, "y": -360,
"z": 0 "z": 0
}, },
"id": 330 "id": 330
}, },
{ {
"block": 0, "block": 2,
"color": 1, "color": 2,
"type": 0, "type": 0,
"position": { "position": {
"x": -240, "x": 60,
"y": -480, "y": -480,
"z": 0 "z": 0
}, },
"id": 340 "id": 340
}, },
{ {
"block": 1, "block": 0,
"color": 8, "color": 9,
"type": 0, "type": 0,
"position": { "position": {
"x": 480, "x": 180,
"y": -600, "y": -480,
"z": 0 "z": 0
}, },
"id": 350 "id": 350
}, },
{ {
"block": 2, "block": 2,
"color": 5, "color": 2,
"type": 0, "type": 9,
"position": { "position": {
"x": 480, "x": -300,
"y": -240, "y": -240,
"z": 0 "z": 0
}, },
"adhesiveTime": 2,
"id": 360 "id": 360
}, },
{ {
"block": 1, "block": 0,
"color": 10, "color": 6,
"type": 0, "type": 9,
"position": { "position": {
"x": 240, "x": -180,
"y": -240, "y": -120,
"z": 0 "z": 0
}, },
"floor": 1, "adhesiveTime": 1,
"floorTime": 11,
"floorMove": true,
"id": 370 "id": 370
}, },
{ {
"block": 2, "block": 1,
"color": 5, "color": 6,
"type": 16, "type": 9,
"position": { "position": {
"x": 480, "x": 180,
"y": 0, "y": -120,
"z": 0 "z": 0
}, },
"questionTime": 6, "adhesiveTime": 2,
"floor": 2,
"floorTime": 7,
"floorMove": true,
"id": 380 "id": 380
}, },
{ {
"block": 3, "block": 0,
"color": 8,
"type": 9,
"position": {
"x": 180,
"y": -240,
"z": 0
},
"adhesiveTime": 1,
"id": 390
},
{
"block": 1,
"color": 9,
"type": 9,
"position": {
"x": 420,
"y": -360,
"z": 0
},
"adhesiveTime": 2,
"id": 400
},
{
"block": 0,
"color": 7,
"type": 9,
"position": {
"x": 420,
"y": -480,
"z": 0
},
"adhesiveTime": 1,
"id": 410
},
{
"block": 2,
"color": 8, "color": 8,
"type": 0, "type": 0,
"position": { "position": {
"x": 360, "x": 300,
"y": 120, "y": 0,
"z": 0 "z": 0
}, },
"freezeTime": 8, "id": 420
"floor": 2, },
"floorTime": 7, {
"floorMove": true, "block": 2,
"id": 390 "color": 6,
"type": 0,
"position": {
"x": 420,
"y": 240,
"z": 0
},
"id": 430
},
{
"block": 1,
"color": 9,
"type": 4,
"position": {
"x": -60,
"y": -480,
"z": 0
},
"freezeTime": 9,
"id": 440
} }
] ]
], ],
"WALL_INFO": [ "WALL_INFO": [
[ [
{ {
"id": 887, "id": 467,
"num": 0, "num": 2,
"color": 5, "color": 7,
"special": 0, "special": 0,
"length": 2 "length": 2
}, },
{ {
"id": 888, "id": 468,
"num": 1, "num": 3,
"color": 5, "color": 7,
"special": 0, "special": 0,
"length": 0 "length": 0
}, },
{ {
"id": 889, "id": 469,
"num": 2, "num": 5,
"color": 10, "color": 9,
"special": 0, "special": 0,
"length": 2, "length": 1
"longAndShort": 12,
"order": false
}, },
{ {
"id": 890, "id": 470,
"num": 3, "num": 13,
"color": 10, "color": 1,
"special": 0,
"length": 0,
"longAndShort": 12,
"order": false
},
{
"id": 891,
"num": 33,
"color": 7,
"special": 0,
"length": 2,
"longAndShort": 12,
"order": true
},
{
"id": 892,
"num": 34,
"color": 7,
"special": 0,
"length": 0,
"longAndShort": 12,
"order": true
},
{
"id": 893,
"num": 42,
"color": 2,
"special": 0,
"length": 3,
"longAndShort": 13,
"order": true
},
{
"id": 894,
"num": 43,
"color": 2,
"special": 0,
"length": 0,
"longAndShort": 13,
"order": true
},
{
"id": 895,
"num": 44,
"color": 2,
"special": 0,
"length": 0,
"longAndShort": 13,
"order": true
},
{
"id": 896,
"num": 39,
"color": 3,
"special": 0,
"length": 2,
"longAndShort": 12,
"order": true
},
{
"id": 897,
"num": 40,
"color": 3,
"special": 0,
"length": 0,
"longAndShort": 12,
"order": true
},
{
"id": 898,
"num": 7,
"color": 8,
"special": 0, "special": 0,
"length": 3 "length": 3
}, },
{ {
"id": 899, "id": 471,
"num": 17, "num": 15,
"color": 8,
"special": 0,
"length": 0
},
{
"id": 900,
"num": 19,
"color": 8,
"special": 0,
"length": 0
},
{
"id": 901,
"num": 26,
"color": 1, "color": 1,
"special": 0, "special": 0,
"length": 1 "length": 0
}, },
{ {
"id": 902, "id": 472,
"num": 41, "num": 17,
"color": 6, "color": 1,
"special": 0,
"length": 1
},
{
"id": 903,
"num": 35,
"color": 9,
"special": 0,
"length": 2
},
{
"id": 904,
"num": 37,
"color": 9,
"special": 0, "special": 0,
"length": 0 "length": 0
}, },
{ {
"id": 905, "id": 473,
"num": 18, "num": 28,
"color": 4, "color": 10,
"special": 0, "special": 0,
"length": 2 "length": 2
}, },
{ {
"id": 906, "id": 474,
"num": 29,
"color": 10,
"special": 0,
"length": 0
},
{
"id": 475,
"num": 25,
"color": 2,
"special": 0,
"length": 2
},
{
"id": 476,
"num": 26,
"color": 2,
"special": 0,
"length": 0
},
{
"id": 477,
"num": 22,
"color": 6,
"special": 0,
"length": 2
},
{
"id": 478,
"num": 23,
"color": 6,
"special": 0,
"length": 0
},
{
"id": 479,
"num": 18,
"color": 8,
"special": 0,
"length": 2
},
{
"id": 480,
"num": 20, "num": 20,
"color": 4, "color": 8,
"special": 0,
"length": 0
},
{
"id": 481,
"num": 12,
"color": 3,
"special": 0,
"length": 3
},
{
"id": 482,
"num": 14,
"color": 3,
"special": 0,
"length": 0
},
{
"id": 483,
"num": 16,
"color": 3,
"special": 0,
"length": 0
},
{
"id": 484,
"num": 8,
"color": 5,
"special": 0,
"length": 2
},
{
"id": 485,
"num": 10,
"color": 5,
"special": 0, "special": 0,
"length": 0 "length": 0
} }

View File

@ -50,7 +50,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 120, "width": 120,
"height": 120 "height": 132
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",

View File

@ -13,7 +13,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "floor", "_name": "moveFloor",
"_objFlags": 0, "_objFlags": 0,
"_parent": null, "_parent": null,
"_children": [ "_children": [
@ -50,7 +50,7 @@
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 120, "width": 120,
"height": 120 "height": 132
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",