updat
This commit is contained in:
parent
e0ef810593
commit
2da0dbbb7b
@ -10246,8 +10246,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
|
@ -4622,8 +4622,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
|
@ -4391,8 +4391,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
@ -9012,8 +9012,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
@ -13633,8 +13633,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
@ -18254,8 +18254,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
|
@ -3066,8 +3066,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
@ -6439,8 +6439,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
@ -9812,8 +9812,8 @@
|
|||||||
},
|
},
|
||||||
"_enabled": true,
|
"_enabled": true,
|
||||||
"_useOriginalSize": false,
|
"_useOriginalSize": false,
|
||||||
"_string": "99:99:99",
|
"_string": "",
|
||||||
"_N$string": "99:99:99",
|
"_N$string": "",
|
||||||
"_fontSize": 40,
|
"_fontSize": 40,
|
||||||
"_lineHeight": 40,
|
"_lineHeight": 40,
|
||||||
"_enableWrapText": true,
|
"_enableWrapText": true,
|
||||||
|
@ -257,13 +257,19 @@ cc.Class({
|
|||||||
herolist = data.hero_list;
|
herolist = data.hero_list;
|
||||||
for (var i = 0; i < herolist.length; i++) {
|
for (var i = 0; i < herolist.length; i++) {
|
||||||
var element = herolist[i];
|
var element = herolist[i];
|
||||||
|
if(element.lock_type!=3){
|
||||||
this.allHeroUUID.push(element.hero_uniid);
|
this.allHeroUUID.push(element.hero_uniid);
|
||||||
|
this.allHeroID.push(element.hero_id)
|
||||||
this.heroDetails.push(herolist[i])
|
this.heroDetails.push(herolist[i])
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
|
||||||
for (var i = 0; i < openherolist.length; i++) {
|
console.log(this.allHeroID)
|
||||||
var hid = openherolist[i];
|
|
||||||
|
|
||||||
|
|
||||||
|
for (var i = 0; i < this.allHeroID.length; i++) {
|
||||||
|
var hid = this.allHeroID[i];
|
||||||
var heroType = gameConfig.playerConfig[hid].herotype;
|
var heroType = gameConfig.playerConfig[hid].herotype;
|
||||||
if (type == 0 || type == heroType) {
|
if (type == 0 || type == heroType) {
|
||||||
if (cc.playerData.checkhasgethero(hid)) {
|
if (cc.playerData.checkhasgethero(hid)) {
|
||||||
@ -273,13 +279,36 @@ cc.Class({
|
|||||||
}
|
}
|
||||||
|
|
||||||
var newlist = Utils.arrtoarr(cherolist, 2);
|
var newlist = Utils.arrtoarr(cherolist, 2);
|
||||||
this.allHeroID = cherolist;
|
// this.allHeroID = cherolist;
|
||||||
this.tableView_chose
|
this.tableView_chose
|
||||||
.getComponent("tableView")
|
.getComponent("tableView")
|
||||||
.initTableView(newlist.length, {
|
.initTableView(newlist.length, {
|
||||||
array: newlist,
|
array: newlist,
|
||||||
target: this,
|
target: this,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
// for (var i = 0; i < openherolist.length; i++) {
|
||||||
|
// var hid = openherolist[i];
|
||||||
|
// var heroType = gameConfig.playerConfig[hid].herotype;
|
||||||
|
// if (type == 0 || type == heroType) {
|
||||||
|
// if (cc.playerData.checkhasgethero(hid)) {
|
||||||
|
// cherolist.push(hid);
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
// var newlist = Utils.arrtoarr(cherolist, 2);
|
||||||
|
// this.allHeroID = cherolist;
|
||||||
|
// this.tableView_chose
|
||||||
|
// .getComponent("tableView")
|
||||||
|
// .initTableView(newlist.length, {
|
||||||
|
// array: newlist,
|
||||||
|
// target: this,
|
||||||
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
getHeroUUidByid(id) {
|
getHeroUUidByid(id) {
|
||||||
|
@ -98,7 +98,9 @@ cc.Class({
|
|||||||
// gun.getComponent(cc.Button).
|
// gun.getComponent(cc.Button).
|
||||||
gun.getComponent("guns_single").removeClickEvent();
|
gun.getComponent("guns_single").removeClickEvent();
|
||||||
gun.off("click", this.chooseEvent, this);
|
gun.off("click", this.chooseEvent, this);
|
||||||
|
if( gun.getComponent("guns_single").wantedNode.active != true){
|
||||||
gun.on("click", this.chooseEvent, this);
|
gun.on("click", this.chooseEvent, this);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
@ -65,10 +65,18 @@ export default class guns_info extends UIBase {
|
|||||||
["35", this.lab_successrate],
|
["35", this.lab_successrate],
|
||||||
["37", this.lab_naijiu],
|
["37", this.lab_naijiu],
|
||||||
]);
|
]);
|
||||||
console.log(JSON.stringify(data.lock_type))
|
|
||||||
|
|
||||||
|
var lefttime = data.unlock_lefttime
|
||||||
|
|
||||||
if(data.lock_type==3){
|
if(data.lock_type==3){
|
||||||
this.showWanted()
|
this.showWanted()
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
this.schedule(function () {
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
lefttime-=1
|
||||||
|
}, 1);
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
this.wantedNode.active = false
|
this.wantedNode.active = false
|
||||||
|
|
||||||
@ -119,4 +127,25 @@ export default class guns_info extends UIBase {
|
|||||||
imgNode.getComponent(cc.Sprite).spriteFrame = res;
|
imgNode.getComponent(cc.Sprite).spriteFrame = res;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
formatSeconds(value) {
|
||||||
|
let result = parseInt(value);
|
||||||
|
let h =
|
||||||
|
Math.floor(result / 3600) < 10
|
||||||
|
? '0' + Math.floor(result / 3600)
|
||||||
|
: Math.floor(result / 3600);
|
||||||
|
let m =
|
||||||
|
Math.floor((result / 60) % 60) < 10
|
||||||
|
? '0' + Math.floor((result / 60) % 60)
|
||||||
|
: Math.floor((result / 60) % 60);
|
||||||
|
let s =
|
||||||
|
Math.floor(result % 60) < 10
|
||||||
|
? '0' + Math.floor(result % 60)
|
||||||
|
: Math.floor(result % 60);
|
||||||
|
|
||||||
|
let res = '';
|
||||||
|
res += `${h}:`;
|
||||||
|
res += `${m}:`;
|
||||||
|
res += `${s}`;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,10 +31,16 @@ export class guns_single extends cc.Component {
|
|||||||
}
|
}
|
||||||
var limit = data.ceg_uplimit
|
var limit = data.ceg_uplimit
|
||||||
var get = data.today_get_gold
|
var get = data.today_get_gold
|
||||||
console.log(JSON.stringify(data.lock_type))
|
|
||||||
|
var lefttime = data.unlock_lefttime
|
||||||
|
|
||||||
if(data.lock_type==3){
|
if(data.lock_type==3){
|
||||||
this.showWanted()
|
this.showWanted()
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
this.schedule(function () {
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
lefttime-=1
|
||||||
|
}, 1);
|
||||||
}else{
|
}else{
|
||||||
this.wantedNode.active = false
|
this.wantedNode.active = false
|
||||||
}
|
}
|
||||||
@ -78,4 +84,26 @@ export class guns_single extends cc.Component {
|
|||||||
removeClickEvent() {
|
removeClickEvent() {
|
||||||
this.getComponent(cc.Button).clickEvents.length = 0;
|
this.getComponent(cc.Button).clickEvents.length = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
formatSeconds(value) {
|
||||||
|
let result = parseInt(value);
|
||||||
|
let h =
|
||||||
|
Math.floor(result / 3600) < 10
|
||||||
|
? '0' + Math.floor(result / 3600)
|
||||||
|
: Math.floor(result / 3600);
|
||||||
|
let m =
|
||||||
|
Math.floor((result / 60) % 60) < 10
|
||||||
|
? '0' + Math.floor((result / 60) % 60)
|
||||||
|
: Math.floor((result / 60) % 60);
|
||||||
|
let s =
|
||||||
|
Math.floor(result % 60) < 10
|
||||||
|
? '0' + Math.floor(result % 60)
|
||||||
|
: Math.floor(result % 60);
|
||||||
|
|
||||||
|
let res = '';
|
||||||
|
res += `${h}:`;
|
||||||
|
res += `${m}:`;
|
||||||
|
res += `${s}`;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -108,9 +108,14 @@ export class UIHeroinfo extends UIBase {
|
|||||||
|
|
||||||
init(data: any) {
|
init(data: any) {
|
||||||
|
|
||||||
console.log(JSON.stringify(data.lock_type))
|
var lefttime = data.unlock_lefttime
|
||||||
if(data.lock_type==3){
|
if(data.lock_type==3){
|
||||||
this.showWanted()
|
this.showWanted()
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
this.schedule(function () {
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
lefttime-=1
|
||||||
|
}, 1);
|
||||||
}else{
|
}else{
|
||||||
this.wantedNode.active = false
|
this.wantedNode.active = false
|
||||||
}
|
}
|
||||||
@ -317,4 +322,26 @@ export class UIHeroinfo extends UIBase {
|
|||||||
onClickUpgrade() {
|
onClickUpgrade() {
|
||||||
uimanger.showUI(UIUpdateHero.prefabPath, {});
|
uimanger.showUI(UIUpdateHero.prefabPath, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
formatSeconds(value) {
|
||||||
|
let result = parseInt(value);
|
||||||
|
let h =
|
||||||
|
Math.floor(result / 3600) < 10
|
||||||
|
? '0' + Math.floor(result / 3600)
|
||||||
|
: Math.floor(result / 3600);
|
||||||
|
let m =
|
||||||
|
Math.floor((result / 60) % 60) < 10
|
||||||
|
? '0' + Math.floor((result / 60) % 60)
|
||||||
|
: Math.floor((result / 60) % 60);
|
||||||
|
let s =
|
||||||
|
Math.floor(result % 60) < 10
|
||||||
|
? '0' + Math.floor(result % 60)
|
||||||
|
: Math.floor(result % 60);
|
||||||
|
|
||||||
|
let res = '';
|
||||||
|
res += `${h}:`;
|
||||||
|
res += `${m}:`;
|
||||||
|
res += `${s}`;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -54,9 +54,16 @@ cc.Class({
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(JSON.stringify(v.lock_type))
|
|
||||||
|
var lefttime= v.unlock_lefttime
|
||||||
|
|
||||||
if(v.lock_type==3){
|
if(v.lock_type==3){
|
||||||
this.showWanted()
|
this.showWanted()
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
this.schedule(function () {
|
||||||
|
this.wantedNode.getComponentInChildren(cc.Label).string = this.formatSeconds(lefttime)
|
||||||
|
lefttime-=1
|
||||||
|
}, 1);
|
||||||
}else{
|
}else{
|
||||||
this.wantedNode.active = false
|
this.wantedNode.active = false
|
||||||
}
|
}
|
||||||
@ -106,4 +113,26 @@ cc.Class({
|
|||||||
onclick() {
|
onclick() {
|
||||||
uimanger.showUI(this.infoPage, this._data);
|
uimanger.showUI(this.infoPage, this._data);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
formatSeconds(value) {
|
||||||
|
let result = parseInt(value);
|
||||||
|
let h =
|
||||||
|
Math.floor(result / 3600) < 10
|
||||||
|
? '0' + Math.floor(result / 3600)
|
||||||
|
: Math.floor(result / 3600);
|
||||||
|
let m =
|
||||||
|
Math.floor((result / 60) % 60) < 10
|
||||||
|
? '0' + Math.floor((result / 60) % 60)
|
||||||
|
: Math.floor((result / 60) % 60);
|
||||||
|
let s =
|
||||||
|
Math.floor(result % 60) < 10
|
||||||
|
? '0' + Math.floor(result % 60)
|
||||||
|
: Math.floor(result % 60);
|
||||||
|
|
||||||
|
let res = '';
|
||||||
|
res += `${h}:`;
|
||||||
|
res += `${m}:`;
|
||||||
|
res += `${s}`;
|
||||||
|
return res;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
@ -88,8 +88,8 @@ cc.Class({
|
|||||||
: Math.floor(result % 60);
|
: Math.floor(result % 60);
|
||||||
|
|
||||||
let res = '';
|
let res = '';
|
||||||
if (h !== '00') res += `${h}:`;
|
res += `${h}:`;
|
||||||
if (m !== '00') res += `${m}:`;
|
res += `${m}:`;
|
||||||
res += `${s}`;
|
res += `${s}`;
|
||||||
return res;
|
return res;
|
||||||
},
|
},
|
||||||
|
Loading…
x
Reference in New Issue
Block a user