This commit is contained in:
guoqing.zhu 2022-06-05 16:29:25 +08:00
parent b11a4bcc8c
commit 0fc28fc37c
5 changed files with 828 additions and 1383 deletions

View File

@ -17286,7 +17286,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 403,
"width": 201,
"height": 200
},
"_anchorPoint": {
@ -17365,7 +17365,7 @@
},
"_position": {
"__type__": "cc.Vec3",
"x": -151.5,
"x": -50.5,
"y": -140,
"z": 0
},
@ -17417,7 +17417,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 111.23,
"width": 22.25,
"height": 40
},
"_anchorPoint": {
@ -17460,8 +17460,8 @@
},
"_enabled": true,
"_useOriginalSize": false,
"_string": "65535",
"_N$string": "65535",
"_string": "0",
"_N$string": "0",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
@ -17515,8 +17515,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 77,
"height": 77
"width": 41,
"height": 47
},
"_anchorPoint": {
"__type__": "cc.Vec2",
@ -17531,8 +17531,8 @@
},
"_scale": {
"__type__": "cc.Vec3",
"x": 1,
"y": 1,
"x": 1.64,
"y": 1.64,
"z": 1
},
"_rotationX": 0,
@ -17560,7 +17560,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dfa69aa7-6239-4832-8389-318c8717e348"
"__uuid__": "67b84c36-b7fd-4c7f-8466-7d2dd606d3c4"
},
"_type": 0,
"_sizeMode": 1,
@ -17629,7 +17629,7 @@
},
{
"__type__": "cc.Node",
"_name": "reward2",
"_name": "reward1 copy",
"_objFlags": 0,
"_parent": {
"__id__": 489
@ -17672,7 +17672,7 @@
},
"_position": {
"__type__": "cc.Vec3",
"x": -50.5,
"x": 50.5,
"y": -140,
"z": 0
},
@ -17724,7 +17724,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 111.23,
"width": 22.25,
"height": 40
},
"_anchorPoint": {
@ -17767,8 +17767,8 @@
},
"_enabled": true,
"_useOriginalSize": false,
"_string": "65535",
"_N$string": "65535",
"_string": "0",
"_N$string": "0",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
@ -17791,7 +17791,7 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "a6VG3gWRJFPIkqicW4/Ami",
"fileId": "65sbGQiohCrYb9MxFrd43F",
"sync": false
},
{
@ -17892,7 +17892,7 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "ee53hCv6NO2oUU13vtuska",
"fileId": "70BTDV0p9HhZx+uFXKD/gO",
"sync": false
},
{
@ -17931,12 +17931,12 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "16Pautou9IupBTKLGrIFoa",
"fileId": "0dGTLIyeFEo48WlJCEcZB2",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "reward3",
"_name": "reward1 copy",
"_objFlags": 0,
"_parent": {
"__id__": 489
@ -17949,7 +17949,7 @@
"__id__": 512
}
],
"_active": true,
"_active": false,
"_level": 3,
"_components": [
{
@ -18031,7 +18031,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 111.23,
"width": 22.25,
"height": 40
},
"_anchorPoint": {
@ -18074,8 +18074,8 @@
},
"_enabled": true,
"_useOriginalSize": false,
"_string": "65535",
"_N$string": "65535",
"_string": "0",
"_N$string": "0",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
@ -18098,7 +18098,7 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "a5Yf+ilSlF+4hsgotdwelv",
"fileId": "cexq5TjjBNeK8eaKHUaLV4",
"sync": false
},
{
@ -18173,9 +18173,7 @@
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dfa69aa7-6239-4832-8389-318c8717e348"
},
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
@ -18199,7 +18197,7 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "f7N8FJVnVHorLhoukoY/l3",
"fileId": "11f2nkGZ5M0YqpyNruLLkK",
"sync": false
},
{
@ -18238,12 +18236,12 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "85AcQc6ddJ+6xW+qONxDS1",
"fileId": "d9oKU2LexCyoUwkK/djI7K",
"sync": false
},
{
"__type__": "cc.Node",
"_name": "reward4",
"_name": "reward1 copy",
"_objFlags": 0,
"_parent": {
"__id__": 489
@ -18256,7 +18254,7 @@
"__id__": 521
}
],
"_active": true,
"_active": false,
"_level": 3,
"_components": [
{
@ -18338,7 +18336,7 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 111.23,
"width": 22.25,
"height": 40
},
"_anchorPoint": {
@ -18381,8 +18379,8 @@
},
"_enabled": true,
"_useOriginalSize": false,
"_string": "65535",
"_N$string": "65535",
"_string": "0",
"_N$string": "0",
"_fontSize": 40,
"_lineHeight": 40,
"_enableWrapText": true,
@ -18405,7 +18403,7 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "a4AqGXRjRFer7bjeA2l77d",
"fileId": "72XRF1MtJNTro/0ywwAwIC",
"sync": false
},
{
@ -18480,9 +18478,7 @@
"_enabled": true,
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "dfa69aa7-6239-4832-8389-318c8717e348"
},
"_spriteFrame": null,
"_type": 0,
"_sizeMode": 1,
"_fillType": 0,
@ -18506,7 +18502,7 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "a5B+PwzIhA8563VhBoC7A7",
"fileId": "d0reXgPb5PxKgh6Atexaof",
"sync": false
},
{
@ -18545,7 +18541,7 @@
"asset": {
"__uuid__": "50305022-201d-4628-a25f-9cfd5c8a6910"
},
"fileId": "d26U1kj1JPBolL7QpKIC/u",
"fileId": "18jD0m1L9EIqXO6ZJEU/Iy",
"sync": false
},
{
@ -18558,7 +18554,7 @@
"_enabled": true,
"_layoutSize": {
"__type__": "cc.Size",
"width": 403,
"width": 201,
"height": 200
},
"_resize": 1,
@ -23880,6 +23876,9 @@
"gunlistNode": {
"__id__": 181
},
"rewardIcons": {
"__id__": 489
},
"_id": ""
},
{

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +1,10 @@
const {
playerConfig,
itemConfig,
dropItemConfig,
dropConfig,
all_ItemConfig,
} = require('../../game/gameConfig');
const NetManage = require('../../manages/NetManage');
const { type } = require('../../netBattle/net/proto/bytebuffer');
var Utils = require("Utils")
cc.Class({
extends: cc.Component,
@ -40,6 +40,10 @@ cc.Class({
type:cc.Node
},
rewardIcons:{
default:null,
type:cc.Node
}
// needNode: {
// default: null,
@ -56,6 +60,9 @@ cc.Class({
this.allChooseHero.length = 10;
this.missionData = data;
this.setRewards(data.reward)
// this.currentBtn = 0;
// this.allChoose.length = 5;
@ -84,6 +91,25 @@ cc.Class({
// }
},
setRewards(string){
var config = dropConfig[string]
var rewards = config.itemdata
// console.log(`reward---${JSON.stringify(rewards)}`)
for(let i=0;i<rewards.length;i+=1){
let id = rewards[i].id
let num = rewards[i].num
var tmp = this.rewardIcons.children[i]
tmp.active = true
tmp.children[0].getComponent(cc.Label).string = `x${num}`
// console.log(JSON.stringify(all_ItemConfig[id]))
// Utils.setitem(this, id, tmp.children[1]);
}
},
// initNeedIcon(param, index) {
// var count = param.toString().length;

View File

@ -1,4 +1,6 @@
const { dropConfig, all_ItemConfig } = require('../../game/gameConfig');
const NetManage = require('../../manages/NetManage');
var Utils = require("Utils")
cc.Class({
extends: cc.Component,
@ -8,10 +10,10 @@ cc.Class({
default: null,
type: cc.Label,
},
// btn_label: {
// default: null,
// type: cc.Label,
// },
allRewardNode:{
default: null,
type: cc.Node,
},
missionPrefab: {
default: null,
type: cc.Prefab,
@ -36,7 +38,7 @@ cc.Class({
type: cc.Node,
},
},
onClickBtn() {
@ -62,6 +64,9 @@ cc.Class({
onCancelBtn(){
cc.uiHelper.showTips('Boost cancel!');
NetManage.cancelOfferRewardMission(this.missionId,()=>{
})
},
formatSeconds(value) {
@ -118,4 +123,26 @@ cc.Class({
this.node.destroy();
}
},
start(){
this.setRewards(this.wantedData.reward)
},
setRewards(string){
var config = dropConfig[string]
var rewards = config.itemdata
for(let i=0;i<rewards.length;i+=1){
let id = rewards[i].id
let num = rewards[i].num
var tmp = this.allRewardNode.children[i]
tmp.active = true
tmp.children[0].getComponent(cc.Label).string = `x${num}`
// Utils.setitem(this, id, tmp.children[1]);
}
},
});

View File

@ -617,6 +617,16 @@ module.exports = {
this.getResponce(cb, this.urlbd);
},
cancelOfferRewardMission(mission, cb) {
this.urlbd.clear();
this.urlbd
.addKV('c', 'Mission')
.addKV('a', 'cancelOfferRewardMission')
.addKV('account_id', this.account_id)
.addKV('session_id', this.session_id)
.addKV('mission_id', mission);
this.getResponce(cb, this.urlbd);
},
searchUserByAccountid(account, cb) {
this.urlbd.clear();