Commit 03302d64 authored by liujiaxin's avatar liujiaxin

feat: remove resources folder & add internal cache defualt skin

parent e0d4c2c3
...@@ -5258,8 +5258,8 @@ ...@@ -5258,8 +5258,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 205.09342442776494, "width": 215.85135193443722,
"height": 266.74446621207915 "height": 263.94264333685396
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -5314,7 +5314,7 @@ ...@@ -5314,7 +5314,7 @@
"_cacheMode": 0, "_cacheMode": 0,
"playTimes": -1, "playTimes": -1,
"premultipliedAlpha": false, "premultipliedAlpha": false,
"_armatureKey": "c828615a-66e9-475e-826f-f33f33b03a5a#9371c0db-e023-4aa7-a7b5-b5380814dd70", "_armatureKey": "7a783421-6db0-47e9-a39a-c825dd0e27a4#e9ae3350-11dc-4713-b44a-339c5b1a133f",
"_accTime": 0, "_accTime": 0,
"_playCount": 0, "_playCount": 0,
"_frameCache": null, "_frameCache": null,
...@@ -5322,10 +5322,10 @@ ...@@ -5322,10 +5322,10 @@
"_playing": false, "_playing": false,
"_armatureCache": null, "_armatureCache": null,
"_N$dragonAsset": { "_N$dragonAsset": {
"__uuid__": "c828615a-66e9-475e-826f-f33f33b03a5a" "__uuid__": "7a783421-6db0-47e9-a39a-c825dd0e27a4"
}, },
"_N$dragonAtlasAsset": { "_N$dragonAtlasAsset": {
"__uuid__": "9371c0db-e023-4aa7-a7b5-b5380814dd70" "__uuid__": "e9ae3350-11dc-4713-b44a-339c5b1a133f"
}, },
"_N$_defaultArmatureIndex": 0, "_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0, "_N$_animationIndex": 0,
...@@ -6617,8 +6617,8 @@ ...@@ -6617,8 +6617,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 257, "width": 256.9999999999999,
"height": 279.22 "height": 279.2174053943725
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -6673,7 +6673,7 @@ ...@@ -6673,7 +6673,7 @@
"_cacheMode": 0, "_cacheMode": 0,
"playTimes": -1, "playTimes": -1,
"premultipliedAlpha": false, "premultipliedAlpha": false,
"_armatureKey": "8eda94aa-90d7-46e3-87d6-e212239eec32#583e299e-0f9e-4d27-b52c-2813ccf8dd2a", "_armatureKey": "9a5342eb-8478-44cc-b46b-ab2d3f3585a6#05742965-e900-4381-860f-85c03525f83c",
"_accTime": 0, "_accTime": 0,
"_playCount": 0, "_playCount": 0,
"_frameCache": null, "_frameCache": null,
...@@ -6681,10 +6681,10 @@ ...@@ -6681,10 +6681,10 @@
"_playing": false, "_playing": false,
"_armatureCache": null, "_armatureCache": null,
"_N$dragonAsset": { "_N$dragonAsset": {
"__uuid__": "8eda94aa-90d7-46e3-87d6-e212239eec32" "__uuid__": "9a5342eb-8478-44cc-b46b-ab2d3f3585a6"
}, },
"_N$dragonAtlasAsset": { "_N$dragonAtlasAsset": {
"__uuid__": "583e299e-0f9e-4d27-b52c-2813ccf8dd2a" "__uuid__": "05742965-e900-4381-860f-85c03525f83c"
}, },
"_N$_defaultArmatureIndex": 0, "_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0, "_N$_animationIndex": 0,
...@@ -7629,7 +7629,7 @@ ...@@ -7629,7 +7629,7 @@
"_cacheMode": 0, "_cacheMode": 0,
"playTimes": -1, "playTimes": -1,
"premultipliedAlpha": false, "premultipliedAlpha": false,
"_armatureKey": "d1e0fd95-3f00-476d-9ce6-2595fe1d03ee#7bb1fdec-6bf4-4d94-b596-5a98f4d68121", "_armatureKey": "7a783421-6db0-47e9-a39a-c825dd0e27a4#e9ae3350-11dc-4713-b44a-339c5b1a133f",
"_accTime": 0, "_accTime": 0,
"_playCount": 0, "_playCount": 0,
"_frameCache": null, "_frameCache": null,
...@@ -7637,10 +7637,10 @@ ...@@ -7637,10 +7637,10 @@
"_playing": false, "_playing": false,
"_armatureCache": null, "_armatureCache": null,
"_N$dragonAsset": { "_N$dragonAsset": {
"__uuid__": "d1e0fd95-3f00-476d-9ce6-2595fe1d03ee" "__uuid__": "7a783421-6db0-47e9-a39a-c825dd0e27a4"
}, },
"_N$dragonAtlasAsset": { "_N$dragonAtlasAsset": {
"__uuid__": "7bb1fdec-6bf4-4d94-b596-5a98f4d68121" "__uuid__": "e9ae3350-11dc-4713-b44a-339c5b1a133f"
}, },
"_N$_defaultArmatureIndex": 0, "_N$_defaultArmatureIndex": 0,
"_N$_animationIndex": 0, "_N$_animationIndex": 0,
......
...@@ -4,7 +4,7 @@ import shop from "./shop"; ...@@ -4,7 +4,7 @@ import shop from "./shop";
import pg from "../pg"; import pg from "../pg";
class Dress { class Dress {
public _list: Array<Item> public _list: Array<Item>
defaultSkin = { public defaultSkin = {
cover: "ani/cover.png", cover: "ani/cover.png",
type: 3, type: 3,
meta_value: { meta_value: {
...@@ -26,6 +26,7 @@ class Dress { ...@@ -26,6 +26,7 @@ class Dress {
}, },
}; };
constructor() { constructor() {
console.log('dress start')
this._list = []; this._list = [];
} }
parse(list: any) { parse(list: any) {
......
...@@ -19,14 +19,39 @@ export default class PengPeng extends cc.Component { ...@@ -19,14 +19,39 @@ export default class PengPeng extends cc.Component {
console.log('pengpeng start') console.log('pengpeng start')
user.setDataReadyCallback(this.dataReady); user.setDataReadyCallback(this.dataReady);
const walkNode = pg.view.find(this.node, "walk") const walkNode = pg.view.find(this.node, "walk")
const eatAni = pg.view.find(this.node, "eat"); const eatNode = pg.view.find(this.node, "eat");
window.walk = walkNode window.walk = walkNode
window.eat = eatAni window.eat = eatNode
window.pp = this; window.pp = this;
pg.view.touchOn(walkNode, this.onTouchElephent, this); pg.view.touchOn(walkNode, this.onTouchElephent, this);
const btnClose = pg.view.find(this.node, "panel_info/btn_close"); const btnClose = pg.view.find(this.node, "panel_info/btn_close");
pg.view.touchOn(btnClose, this.onTouchPanel, this); pg.view.touchOn(btnClose, this.onTouchPanel, this);
// cache
const walkDragonDisplay = walkNode.getComponent(dragonBones.ArmatureDisplay);
const eatDragonDisplay = eatNode.getComponent(dragonBones.ArmatureDisplay);
const walkAtlasAsset = walkDragonDisplay.dragonAtlasAsset;
const walkAsset = walkDragonDisplay.dragonAsset;
const walkArmatureName = walkDragonDisplay.armatureName;
const eatAtlasAsset = eatDragonDisplay.dragonAtlasAsset;
const eatAsset = eatDragonDisplay.dragonAsset;
const eatArmatureName = eatDragonDisplay.armatureName;
dress.defaultSkin.meta_value.walk.tex_png = null;
dress.defaultSkin.meta_value.walk.ske_json = walkAsset
dress.defaultSkin.meta_value.walk.tex_json = walkAtlasAsset
dress.defaultSkin.meta_value.eat.armature = walkArmatureName
dress.defaultSkin.meta_value.eat.tex_png = null;
dress.defaultSkin.meta_value.eat.ske_json = eatAsset
dress.defaultSkin.meta_value.eat.tex_json = eatAtlasAsset
dress.defaultSkin.meta_value.eat.armature = eatArmatureName
} }
dataReady = () => { dataReady = () => {
console.log('pengpeng dataReady'); console.log('pengpeng dataReady');
......
...@@ -343,6 +343,9 @@ let pg = { ...@@ -343,6 +343,9 @@ let pg = {
// if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture)); // if (err && !texture) return resolve(pg.logger.w('loading loadNetImg warn-> ' + texture));
// resolve(texture); // resolve(texture);
// }); // });
if (typeof url !== 'string') {
resolve(url);
}
if (!option || Object.keys(option).length == 0) option = {type: cc.Texture2D}; if (!option || Object.keys(option).length == 0) option = {type: cc.Texture2D};
if (url.startsWith('http')) { if (url.startsWith('http')) {
cc.assetManager.loadRemote(url,option, (err, texture) => { cc.assetManager.loadRemote(url,option, (err, texture) => {
......
{
"ver": "1.1.2",
"uuid": "72675adc-2e9b-411f-8775-d354528aec07",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "c828615a-66e9-475e-826f-f33f33b03a5a",
"subMetas": {}
}
\ No newline at end of file
{"name":"walkinghappyhungry","imagePath":"walkinghappyhungry_tex.png","SubTexture":[{"name":"走路/阴影","x":1,"height":37,"y":426,"width":143},{"name":"走路/右腿","x":170,"height":77,"y":257,"width":62},{"name":"走路/左腿","x":98,"height":68,"y":257,"width":62},{"name":"走路/右手","x":170,"height":70,"y":336,"width":60},{"name":"走路/衣服","x":1,"height":100,"y":257,"width":95},{"name":"走路/衣服2","x":1,"height":145,"y":1,"width":178},{"name":"走路/左手","x":181,"height":83,"y":1,"width":64},{"name":"走路/围巾","x":146,"height":60,"y":426,"width":80},{"name":"走路/围巾2","x":91,"height":65,"frameY":0,"y":359,"frameHeight":65,"frameX":0,"frameWidth":78,"width":77},{"name":"走路/右耳","x":1,"height":65,"y":359,"width":88},{"name":"走路/脸","x":1,"height":107,"y":148,"width":188},{"name":"走路/嘴巴","x":170,"height":10,"y":408,"width":23},{"name":"走路/眼珠","x":181,"height":21,"y":120,"width":50},{"name":"走路/眼皮","x":181,"height":32,"y":86,"width":59},{"name":"走路/饿","x":1,"height":35,"y":465,"width":38}],"height":512,"width":256}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "9371c0db-e023-4aa7-a7b5-b5380814dd70",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "086c9207-9d3e-48a6-aaa3-32035a263f0d",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 256,
"height": 512,
"platformSettings": {},
"subMetas": {
"walkinghappyhungry_tex": {
"ver": "1.0.4",
"uuid": "7066fe4b-0d69-4fb0-8b9a-f9137001e791",
"rawTextureUuid": "086c9207-9d3e-48a6-aaa3-32035a263f0d",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -5,
"offsetY": 5.5,
"trimX": 1,
"trimY": 1,
"width": 244,
"height": 499,
"rawWidth": 256,
"rawHeight": 512,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "68fdd5c0-48a6-4db5-b219-780457e9fe9b",
"isBundle": true,
"bundleName": "resources",
"priority": 8,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.1.2",
"uuid": "119f21e9-7ecf-4223-825a-31179b364f28",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
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