Commit 6e7ab706 authored by liujiaxin's avatar liujiaxin

test: 123

parent a8dc2e13
......@@ -7628,7 +7628,7 @@
"_preCacheMode": 0,
"_cacheMode": 0,
"playTimes": -1,
"premultipliedAlpha": false,
"premultipliedAlpha": true,
"_armatureKey": "7a783421-6db0-47e9-a39a-c825dd0e27a4#e9ae3350-11dc-4713-b44a-339c5b1a133f",
"_accTime": 0,
"_playCount": 0,
......@@ -7748,6 +7748,9 @@
"__id__": 163
},
"_enabled": true,
"defaultCover": {
"__uuid__": "97b97a55-719c-48ff-81e0-269363ee147c"
},
"_id": "bbaF/xfq1D4ZUceYJYzAlJ"
},
{
......
......@@ -310,7 +310,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
updateMyHouseItem(item, data: HouseItem) {
item.active = true;
let icon = pg.view.find(item, "icon");
let current = pg.view.find(item, "current");
pg.view.setNetImg(icon, data.cover, true);
......
......@@ -12,6 +12,8 @@ import pg from "./pg";
@ccclass
export default class PengPeng extends cc.Component {
// LIFE-CYCLE CALLBACKS:
@property({ type: cc.SpriteFrame })
defaultCover: cc.SpriteFrame | null = null
// onLoad () {}
......@@ -39,8 +41,8 @@ export default class PengPeng extends cc.Component {
const eatArmatureName = eatDragonDisplay.armatureName;
console.log('this.defaultCover.getTexture()', this.defaultCover.getTexture())
dress.defaultSkin.cover = this.defaultCover.getTexture();
dress.defaultSkin.meta_value.walk.tex_png = null;
dress.defaultSkin.meta_value.walk.ske_json = walkAsset
dress.defaultSkin.meta_value.walk.tex_json = walkAtlasAsset
......
......@@ -139,8 +139,9 @@ let pg = {
node.active = false;
return pg.logger.w("图片更换失败,传入了错误的res");
}
if (!node) return pg.logger.w("图片更换失败,传入了错误的item");
if (cache && node.net_url == res) return;
if (cache && typeof res == 'string' &&node.net_url == res) return;
let w = node.width;
let h = node.height;
node.active = false;//
......@@ -322,7 +323,8 @@ let pg = {
// if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture));
// resolve(texture);
// });
if (url && typeof url == 'string' && url.startsWith('http')) {
if (url && typeof url == 'string') {
if (url.startsWith('http')) {
cc.assetManager.loadRemote(url, (err, texture) => {
if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture));
resolve(texture);
......@@ -335,6 +337,9 @@ let pg = {
resolve(texture);
});
}
} else {
resolve(url);
}
})
},
loadAsset: async function (url, option) {
......
{
"ver": "2.3.5",
"uuid": "5512a68c-2fab-403b-b0ff-2a9c4694d147",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 160,
"height": 183,
"platformSettings": {},
"subMetas": {
"cover": {
"ver": "1.0.4",
"uuid": "97b97a55-719c-48ff-81e0-269363ee147c",
"rawTextureUuid": "5512a68c-2fab-403b-b0ff-2a9c4694d147",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": -7,
"trimX": 13,
"trimY": 26,
"width": 133,
"height": 145,
"rawWidth": 160,
"rawHeight": 183,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 512,
......
......@@ -4,7 +4,7 @@
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"premultiplyAlpha": true,
"genMipmaps": false,
"packable": true,
"width": 256,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment