Commit 97f694ef authored by 李维's avatar 李维

dev commot

parent 3f6c5725
This diff is collapsed.
{
"ver": "1.0.1",
"uuid": "e3d39ead-9ae5-45df-a908-d9fee96d1c97",
"subMetas": {}
}
\ No newline at end of file
{"width":128,"imagePath":"狮子_tex.png","height":256,"name":"狮子","SubTexture":[{"width":28,"y":91,"height":28,"name":"狮子素材/形状_676","x":1},{"width":35,"y":107,"height":15,"name":"狮子素材/形状_674","x":77},{"width":12,"y":79,"height":23,"name":"狮子素材/形状_726_拷贝","x":103},{"width":16,"y":111,"height":28,"name":"狮子素材/形状_726","x":31},{"width":24,"y":79,"height":26,"name":"狮子素材/图层_1","x":77},{"width":29,"y":79,"height":30,"name":"狮子素材/形状_686_拷贝","x":46},{"width":48,"y":1,"height":50,"name":"狮子素材/椭圆_725","x":76},{"width":73,"y":1,"height":58,"name":"狮子素材/形状_627","x":1},{"width":10,"y":68,"height":9,"name":"狮子素材/形状_644","x":46},{"width":11,"y":91,"height":9,"name":"狮子素材/形状_644_拷贝","x":31},{"width":10,"y":102,"height":7,"name":"狮子素材/椭圆_635","x":31},{"width":43,"y":61,"height":28,"name":"狮子素材/形状_687_拷贝_5","x":1},{"width":50,"y":53,"height":24,"name":"狮子素材/形状_631","x":76},{"width":24,"y":61,"height":5,"name":"狮子素材/睁眼","x":46},{"width":24,"y":121,"height":2,"name":"狮子素材/闭眼","x":1}]}
\ No newline at end of file
{
"ver": "1.0.1",
"uuid": "8b7f8e75-240d-4acb-9738-aa9bcc9e582e",
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "31e3a09b-75b0-4ed4-9962-6d74c5823986",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 128,
"height": 256,
"platformSettings": {},
"subMetas": {
"狮子_tex": {
"ver": "1.0.4",
"uuid": "699fb9ac-13b4-40dd-a557-77fc0f4686c4",
"rawTextureUuid": "31e3a09b-75b0-4ed4-9962-6d74c5823986",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -0.5,
"offsetY": 58,
"trimX": 1,
"trimY": 1,
"width": 125,
"height": 138,
"rawWidth": 128,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
This diff is collapsed.
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "aca5ddcb-63a5-4237-9c6f-ef3b202fc387",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
This diff is collapsed.
{
"ver": "1.0.8",
"uuid": "f8d13f5b-4497-4be3-8f1d-761f4b9be6db",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
// Learn life-cycle callbacks: // Learn life-cycle callbacks:
// - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html
import GameLogic from "./GameLogic"
cc.Class({ cc.Class({
...@@ -14,6 +14,8 @@ cc.Class({ ...@@ -14,6 +14,8 @@ cc.Class({
properties: { properties: {
}, },
gameLogic: null,
// 生命周期 onLoad // 生命周期 onLoad
onLoad() { onLoad() {
this.initSceneData(); this.initSceneData();
...@@ -70,7 +72,22 @@ cc.Class({ ...@@ -70,7 +72,22 @@ cc.Class({
console.log('data:', data); console.log('data:', data);
this.data = data || this.getDefaultData(); this.data = data || this.getDefaultData();
this.data = JSON.parse(JSON.stringify(this.data)) this.data = JSON.parse(JSON.stringify(this.data))
this.preloadItem() this.preloadItem(_=>{
this.gameLogic = new GameLogic(this.data, {
designSize: this._designSize,
frameSize: this._frameSize,
mapScaleMin: this._mapScaleMin,
mapScaleMax: this._mapScaleMax,
cocosScale: this._cocosScale,
imageResList: this._imageResList,
audioResList: this._audioResList,
animaResList: this._animaResList,
properties: {
option: this.option,
empty: this.empty
}
})
})
}) })
}, },
...@@ -85,11 +102,11 @@ cc.Class({ ...@@ -85,11 +102,11 @@ cc.Class({
return data; return data;
}, },
preloadItem() { preloadItem(callback) {
this.addPreloadImage(); this.addPreloadImage();
this.addPreloadAudio(); this.addPreloadAudio();
this.addPreloadAnima(); this.addPreloadAnima();
this.preload(); this.preload(()=>{if(callback) callback()});
}, },
...@@ -108,7 +125,7 @@ cc.Class({ ...@@ -108,7 +125,7 @@ cc.Class({
}, },
preload() { preload(callback) {
const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList); const preloadArr = this._imageResList.concat(this._audioResList).concat(this._animaResList);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => { cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
...@@ -117,7 +134,9 @@ cc.Class({ ...@@ -117,7 +134,9 @@ cc.Class({
if (window && window["air"]) { if (window && window["air"]) {
window["air"].hideAirClassLoading(); window["air"].hideAirClassLoading();
} }
if(callback) {
callback();
}
cc.debug.setDisplayStats(false); cc.debug.setDisplayStats(false);
}); });
}, },
...@@ -150,11 +169,10 @@ cc.Class({ ...@@ -150,11 +169,10 @@ cc.Class({
initView() { initView() {
// this.initBg();
this.initBg(); // this.initPic();
this.initPic(); // this.initBtn();
this.initBtn(); // this.initIcon();
this.initIcon();
}, },
initBg() { initBg() {
......
export default {
"version": "1.0",
"key": "DataKey_WW-BubbleMap",
"title_text": "Winter is coming",
"question": {
"type_left": "text",
"text_left": "Home",
"type_right": "text",
"text_right": "School",
"image_url_left": "",
"image_url_right": "",
},
"bg": {
"type": "default",
"image_url": ""
},
"options": [
{
"type": "text",
"image_url": "DEMO_Option_1",
"text": "DEMO_Option_1",
"side": "left"
},
{
"type": "image",
"image_url": "DEMO_Option_2",
"text": "",
"side": "left"
},
{
"type": "image",
"image_url": "DEMO_Option_3",
"text": "",
"side": "middle"
},
{
"type": "image",
"image_url": "DEMO_Option_4",
"text": "",
"side": "middle"
},
{
"type": "image",
"image_url": "DEMO_Option_5",
"text": "",
"side": "right"
},
{
"type": "image",
"image_url": "DEMO_Option_6",
"text": "",
"side": "right"
}
]
};
{
"ver": "1.0.8",
"uuid": "098a17f0-8d67-4467-905e-5a22cd99c9fd",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "2398e34f-9837-44e1-88da-e1d185d16654",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 720,
"platformSettings": {},
"subMetas": {
"background": {
"ver": "1.0.4",
"uuid": "4ada9e6e-a172-451e-b68c-d86fa6cf018e",
"rawTextureUuid": "2398e34f-9837-44e1-88da-e1d185d16654",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 720,
"rawWidth": 1280,
"rawHeight": 720,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c94c545c-fdf4-45c3-95bb-cdefd7c9c71c",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 73,
"height": 77,
"platformSettings": {},
"subMetas": {
"btn_back": {
"ver": "1.0.4",
"uuid": "eb12dc27-5940-4032-990f-25286dd0a8e0",
"rawTextureUuid": "c94c545c-fdf4-45c3-95bb-cdefd7c9c71c",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 73,
"height": 77,
"rawWidth": 73,
"rawHeight": 77,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "ca43fc24-49b6-4641-bcb1-3eb5142eaaf1",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 366,
"height": 256,
"platformSettings": {},
"subMetas": {
"btn_start": {
"ver": "1.0.4",
"uuid": "0ddfe260-a85c-425a-9cca-5e6e5c516d31",
"rawTextureUuid": "ca43fc24-49b6-4641-bcb1-3eb5142eaaf1",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 366,
"height": 256,
"rawWidth": 366,
"rawHeight": 256,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5db76180-bed5-45f9-9d2a-d25b87c3ff58",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 189,
"height": 186,
"platformSettings": {},
"subMetas": {
"bubble_test": {
"ver": "1.0.4",
"uuid": "09ab21ca-576e-4e62-8b62-b936e450892a",
"rawTextureUuid": "5db76180-bed5-45f9-9d2a-d25b87c3ff58",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 189,
"height": 186,
"rawWidth": 189,
"rawHeight": 186,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "a0fb37da-d793-4eb6-80e4-ccec20a63bbb",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 95,
"height": 101,
"platformSettings": {},
"subMetas": {
"speaker": {
"ver": "1.0.4",
"uuid": "570d2e53-3fbf-4959-9333-0d2a16b136db",
"rawTextureUuid": "a0fb37da-d793-4eb6-80e4-ccec20a63bbb",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 95,
"height": 101,
"rawWidth": 95,
"rawHeight": 101,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"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