Commit c2159e42 authored by 范雪寒's avatar 范雪寒

feat: 界面拼好

parent fa703d42
{ {
"ver": "1.2.7", "ver": "1.2.7",
"uuid": "57ea7c61-9b8b-498a-b024-c98ee9124beb", "uuid": "bee51449-3347-4675-a3f4-e8a80ca3ecab",
"asyncLoadAssets": false, "asyncLoadAssets": false,
"autoReleaseAssets": true, "autoReleaseAssets": true,
"subMetas": {} "subMetas": {}
......
const defaultData = require('../script/defaultData');
import {
asyncTweenTo,
asyncShowNode,
asyncHideNode,
asyncDelay,
asyncPlayDragonBoneAnimation,
exchangeNodePos,
addButtonListener,
playEffect,
stopEffect,
loadImgByUrl,
asyncLoadImgByUrl,
asyncPlayEffectByUrl,
asyncLoadDragonBoneAnime,
} from '../script/utils';
cc.Class({
extends: cc.Component,
properties: {
},
ctor() {
this._imageResList = [];
this._audioResList = [];
this._onLoadFinishFunc = null;
},
start() {
cc.debug.setDisplayStats(false);
this.data = defaultData;
this.getData((data) => {
if (data) {
this.data = data;
}
this.preloadItem();
});
},
getData(func) {
if (window && window.courseware) {
window.courseware.getData(func, 'Z_05_nxuan1');
} else {
func(defaultData);
}
},
_imageResList: null,
_audioResList: null,
preloadItem() {
this.addPreloadImage();
this.addPreloadAudio();
this.preload();
this.onLoadFinish();
},
addPreloadImage() {
// this._audioResList.push(this.data.tittleImg);
},
addPreloadAudio() { },
preload() {
const preloadArr = this._imageResList.concat(this._audioResList);
cc.assetManager.loadAny(preloadArr, null, null, (err, data) => {
this.hideAirClassLoading();
});
if (preloadArr.length == 0) {
this.hideAirClassLoading();
}
},
hideAirClassLoading() {
if (window && window["air"]) {
window["air"].hideAirClassLoading();
console.log('hideAirClassLoading');
}
},
onLoadFinish() {
this.initStatus();
this.initNodes();
this.initListeners();
this.updateBgSize();
if (this._onLoadFinishFunc && typeof (this._onLoadFinishFunc) == 'function') {
this._onLoadFinishFunc();
}
},
});
{
"ver": "1.0.8",
"uuid": "e1d8b758-7a49-4c65-b371-ffe9210b79db",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -196,4 +196,38 @@ async function rabbonFall(node) { ...@@ -196,4 +196,38 @@ async function rabbonFall(node) {
const offsetX = RandomInt(-200, 200) * time; const offsetX = RandomInt(-200, 200) * time;
await asyncTweenBy(node, time, { x: offsetX, angle: offsetX * 60 / 200 }); await asyncTweenBy(node, time, { x: offsetX, angle: offsetX * 60 / 200 });
rabbonFall(node); rabbonFall(node);
} }
\ No newline at end of file
export async function playEffect(name, loop, volume) {
const musicNode = cc.find('Canvas/MusicNode');
if (!musicNode) {
return;
}
await musicNode.getComponent('MusicNode').playEffect(name, loop, volume);
}
export async function stopEffect(name) {
const musicNode = cc.find('Canvas/MusicNode');
if (!musicNode) {
return;
}
await musicNode.getComponent('MusicNode').stopEffect(name);
}
export function loadImgByUrl(node, url, onComplete) {
if (!url || url == '') {
return;
}
cc.assetManager.loadRemote(url, cc.SpriteFrame, (err, texture) => {
node.getComponent(cc.Sprite).spriteFrame = new cc.SpriteFrame(texture);
if (onComplete && typeof (onComplete) == 'function') {
onComplete();
}
});
}
export async function asyncLoadImgByUrl(node, url) {
return new Promise((resolve, reject) => {
loadImgByUrl(node, url, resolve);
});
}
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "9a79969a-0506-48d4-bc98-3c05d109b027", "uuid": "fa4423a9-23b0-4882-8ff6-3845096e0d75",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 61, "width": 97,
"height": 67, "height": 76,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"btn_left": { "Btn_flower": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "ce19457d-e8f3-4c38-ae3e-d4b99208ddb5", "uuid": "ecac7b15-4fed-451d-9e71-a49ce5e94ab1",
"rawTextureUuid": "9a79969a-0506-48d4-bc98-3c05d109b027", "rawTextureUuid": "fa4423a9-23b0-4882-8ff6-3845096e0d75",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
...@@ -22,10 +22,10 @@ ...@@ -22,10 +22,10 @@
"offsetY": 0, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 61, "width": 97,
"height": 67, "height": 76,
"rawWidth": 61, "rawWidth": 97,
"rawHeight": 67, "rawHeight": 76,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f", "uuid": "b43099ec-0dbf-4c20-9f53-040fa8996f8d",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 366, "width": 97,
"height": 336, "height": 76,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"1orange": { "Btn_flower_P": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "43d1e79d-6de8-4dcb-b8ce-d767df7913aa", "uuid": "3c6dfb3e-4865-4f1a-bea1-dd33d35b56f5",
"rawTextureUuid": "efa5fa09-a4dd-4bfc-ab7e-17c19f85408f", "rawTextureUuid": "b43099ec-0dbf-4c20-9f53-040fa8996f8d",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": -0.5, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 1, "trimY": 0,
"width": 366, "width": 97,
"height": 335, "height": 76,
"rawWidth": 366, "rawWidth": 97,
"rawHeight": 336, "rawHeight": 76,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
play/assets/tmpGame/textures/bg.jpg

25.8 KB | W: | H:

play/assets/tmpGame/textures/bg.jpg

475 KB | W: | H:

play/assets/tmpGame/textures/bg.jpg
play/assets/tmpGame/textures/bg.jpg
play/assets/tmpGame/textures/bg.jpg
play/assets/tmpGame/textures/bg.jpg
  • 2-up
  • Swipe
  • Onion skin
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "e1b4d971-9876-4832-803a-5a321964a78b", "uuid": "cdf1a6fe-0663-42f1-b041-c33431545c02",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
"subMetas": { "subMetas": {
"bg": { "bg": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "8288e3d4-4c75-4b27-8f01-f7014417f4dd", "uuid": "023e2dc7-e0a6-4c83-b351-341956f77dda",
"rawTextureUuid": "e1b4d971-9876-4832-803a-5a321964a78b", "rawTextureUuid": "cdf1a6fe-0663-42f1-b041-c33431545c02",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "d582359e-924e-4ee9-9964-1fc4bb417e71", "uuid": "2eb6ba07-eee5-48cb-9f17-7c0445a4b846",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 61, "width": 409,
"height": 67, "height": 156,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"btn_right": { "flowers": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "e5a2dbaa-a677-4a32-90d7-a1b057d7fb59", "uuid": "9fdc2596-8af2-47bf-8660-274a3a4887fb",
"rawTextureUuid": "d582359e-924e-4ee9-9964-1fc4bb417e71", "rawTextureUuid": "2eb6ba07-eee5-48cb-9f17-7c0445a4b846",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": -0.5, "offsetX": 0,
"offsetY": 0.5, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 60, "width": 409,
"height": 66, "height": 156,
"rawWidth": 61, "rawWidth": 409,
"rawHeight": 67, "rawHeight": 156,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{ {
"ver": "2.3.5", "ver": "2.3.5",
"uuid": "18d07592-51a9-421e-8972-0f67b68d29e1", "uuid": "6d19577b-22c0-4cf2-9287-c44c0371f8c2",
"type": "sprite", "type": "sprite",
"wrapMode": "clamp", "wrapMode": "clamp",
"filterMode": "bilinear", "filterMode": "bilinear",
"premultiplyAlpha": false, "premultiplyAlpha": false,
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 144, "width": 188,
"height": 144, "height": 224,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"icon": { "frame": {
"ver": "1.0.4", "ver": "1.0.4",
"uuid": "6fbc30a8-3c49-44ae-8ba4-7f56f385b78a", "uuid": "843bfa7b-0c3c-4e0a-a4e3-f39457b7f8e7",
"rawTextureUuid": "18d07592-51a9-421e-8972-0f67b68d29e1", "rawTextureUuid": "6d19577b-22c0-4cf2-9287-c44c0371f8c2",
"trimType": "auto", "trimType": "auto",
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": -0.5, "offsetY": 0,
"trimX": 3, "trimX": 0,
"trimY": 2, "trimY": 0,
"width": 138, "width": 188,
"height": 141, "height": 224,
"rawWidth": 144, "rawWidth": 188,
"rawHeight": 144, "rawHeight": 224,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
{
"ver": "2.3.5",
"uuid": "e7942a27-fd1d-46e1-aa94-503b27928b4f",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 47,
"height": 57,
"platformSettings": {},
"subMetas": {
"invalid-name_2": {
"ver": "1.0.4",
"uuid": "01feed43-923a-4791-ae1f-9e4066aa3f25",
"rawTextureUuid": "e7942a27-fd1d-46e1-aa94-503b27928b4f",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 47,
"height": 57,
"rawWidth": 47,
"rawHeight": 57,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "42dc77ed-5ed6-425c-a4f9-4ab6082fdf17",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 45,
"height": 46,
"platformSettings": {},
"subMetas": {
"invalid-name_3": {
"ver": "1.0.4",
"uuid": "922fee6b-64e5-4ba4-ae99-1ea3c0b2157d",
"rawTextureUuid": "42dc77ed-5ed6-425c-a4f9-4ab6082fdf17",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 45,
"height": 46,
"rawWidth": 45,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "c4c9694b-1043-4912-8d72-8ea1324ea3a3",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 44,
"height": 46,
"platformSettings": {},
"subMetas": {
"invalid-name_4": {
"ver": "1.0.4",
"uuid": "16e86334-3345-46fd-aa00-629822491002",
"rawTextureUuid": "c4c9694b-1043-4912-8d72-8ea1324ea3a3",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 44,
"height": 46,
"rawWidth": 44,
"rawHeight": 46,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "55849c78-57da-451f-ab34-01e7eb636fa8",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 429,
"height": 146,
"platformSettings": {},
"subMetas": {
"leef": {
"ver": "1.0.4",
"uuid": "90cbaea8-98f7-4d82-9df0-d57f4a5332b1",
"rawTextureUuid": "55849c78-57da-451f-ab34-01e7eb636fa8",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 429,
"height": 146,
"rawWidth": 429,
"rawHeight": 146,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "aa0aebee-1011-479b-bf12-62c2c40076aa",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 304,
"height": 138,
"platformSettings": {},
"subMetas": {
"leevies": {
"ver": "1.0.4",
"uuid": "54bafbc1-ecb5-40af-94e2-22da7eda835f",
"rawTextureUuid": "aa0aebee-1011-479b-bf12-62c2c40076aa",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 304,
"height": 138,
"rawWidth": 304,
"rawHeight": 138,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "5809dcfe-cdec-4cbf-86a9-446e39139984",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 408,
"platformSettings": {},
"subMetas": {
"light": {
"ver": "1.0.4",
"uuid": "8fb33622-f77b-4948-80ca-21fb40ece081",
"rawTextureUuid": "5809dcfe-cdec-4cbf-86a9-446e39139984",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 3,
"offsetY": 0,
"trimX": 6,
"trimY": 0,
"width": 1274,
"height": 408,
"rawWidth": 1280,
"rawHeight": 408,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "e9bcc801-4c45-45ef-9761-a569328686c9",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 467,
"height": 154,
"platformSettings": {},
"subMetas": {
"option": {
"ver": "1.0.4",
"uuid": "08a24fc8-782c-40d4-be3e-5123f1695dfb",
"rawTextureUuid": "e9bcc801-4c45-45ef-9761-a569328686c9",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": -18.5,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 430,
"height": 154,
"rawWidth": 467,
"rawHeight": 154,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "efb885da-79e3-4c5c-b076-8fefa34aac70",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 599,
"height": 194,
"platformSettings": {},
"subMetas": {
"question": {
"ver": "1.0.4",
"uuid": "c446953a-dbad-4fc4-a568-5ccb49713931",
"rawTextureUuid": "efb885da-79e3-4c5c-b076-8fefa34aac70",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 599,
"height": 194,
"rawWidth": 599,
"rawHeight": 194,
"borderTop": 0,
"borderBottom": 0,
"borderLeft": 0,
"borderRight": 0,
"subMetas": {}
}
}
}
\ No newline at end of file
{
"ver": "2.3.5",
"uuid": "b53c14cd-5899-47ad-9be5-b8ef27277b84",
"type": "sprite",
"wrapMode": "clamp",
"filterMode": "bilinear",
"premultiplyAlpha": false,
"genMipmaps": false,
"packable": true,
"width": 1280,
"height": 568,
"platformSettings": {},
"subMetas": {
"water": {
"ver": "1.0.4",
"uuid": "a9ddda92-d204-4521-8239-ba51bc5148ac",
"rawTextureUuid": "b53c14cd-5899-47ad-9be5-b8ef27277b84",
"trimType": "auto",
"trimThreshold": 1,
"rotated": false,
"offsetX": 0,
"offsetY": 0,
"trimX": 0,
"trimY": 0,
"width": 1280,
"height": 568,
"rawWidth": 1280,
"rawHeight": 568,
"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