Commit d47f89a4 authored by 唐鑫's avatar 唐鑫

处理动画效果自动播放

parent 42778d65
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 477, "width": 479,
"height": 470 "height": 474
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
238, 239,
62, -5,
0, 0,
0, 0,
0, 0,
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
"asset": { "asset": {
"__uuid__": "2449b534-ab4a-43ad-a680-ad4dcc1d3435" "__uuid__": "2449b534-ab4a-43ad-a680-ad4dcc1d3435"
}, },
"fileId": "00gTZ/DiVK2IQNRGxcMfDt", "fileId": "",
"sync": false "sync": false
} }
] ]
\ No newline at end of file
...@@ -36,8 +36,8 @@ ...@@ -36,8 +36,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 477, "width": 479,
"height": 470 "height": 474
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -48,8 +48,8 @@ ...@@ -48,8 +48,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-238, -239,
62, -5,
0, 0,
0, 0,
0, 0,
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
"asset": { "asset": {
"__uuid__": "320caeb2-9a8a-41b4-a87f-62d541b235fd" "__uuid__": "320caeb2-9a8a-41b4-a87f-62d541b235fd"
}, },
"fileId": "00gTZ/DiVK2IQNRGxcMfDt", "fileId": "",
"sync": false "sync": false
} }
] ]
\ No newline at end of file
...@@ -828,8 +828,8 @@ ...@@ -828,8 +828,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 1000, "width": 998,
"height": 690 "height": 930
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -841,7 +841,7 @@ ...@@ -841,7 +841,7 @@
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
0, 0,
146.027, 200.328,
0, 0,
0, 0,
0, 0,
...@@ -2766,8 +2766,8 @@ ...@@ -2766,8 +2766,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 477, "width": 479,
"height": 470 "height": 474
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -2778,8 +2778,8 @@ ...@@ -2778,8 +2778,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
-238, -239,
62, -7,
0, 0,
0, 0,
0, 0,
...@@ -2860,8 +2860,8 @@ ...@@ -2860,8 +2860,8 @@
}, },
"_contentSize": { "_contentSize": {
"__type__": "cc.Size", "__type__": "cc.Size",
"width": 477, "width": 479,
"height": 470 "height": 474
}, },
"_anchorPoint": { "_anchorPoint": {
"__type__": "cc.Vec2", "__type__": "cc.Vec2",
...@@ -2872,8 +2872,8 @@ ...@@ -2872,8 +2872,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
238, 239,
62, -7,
0, 0,
0, 0,
0, 0,
......
const saveKey = "DataKey_Cocos_FT14"; const saveKey = "DataKey_Cocos_FT14";
const BaseUI = require('BaseUI'); const BaseUI = require('BaseUI');
import { DefaultData } from './DefaultData'; import { DefaultData } from '../script/DefaultData';
import EventMgr from './EventMgr'; import EventMgr from '../script/EventMgr';
import VerletRender from "./verlet-render"; import VerletRender from "../script/verlet-render";
import BezierRender from "./bezier-render"; import BezierRender from "../script/bezier-render";
const POS = { const POS = {
LeftPage: { x: -238, y: 62 }, LeftPage: { x: -239, y: -5 },
RightPage: { x: 238, y: 62 }, RightPage: { x: 239, y: -5 },
} }
cc.Class({ cc.Class({
...@@ -162,7 +162,7 @@ cc.Class({ ...@@ -162,7 +162,7 @@ cc.Class({
let page = this.pageList[GameData.pageIndex + 1]; let page = this.pageList[GameData.pageIndex + 1];
if (!page) { if (!page) {
return; return resolve('');
} }
GameData.isPlaying = true; GameData.isPlaying = true;
let itemPage = page.getComponent('ItemPage'); let itemPage = page.getComponent('ItemPage');
...@@ -305,9 +305,15 @@ cc.Class({ ...@@ -305,9 +305,15 @@ cc.Class({
}, },
onTouchPanelLeft() { onTouchPanelLeft() {
this.onTurnLast(); this.onTurnLast();
setTimeout(() => {
this.autoPlay();
}, 1500);
}, },
onTouchPanelRight() { onTouchPanelRight() {
this.onTurnNext(); this.onTurnNext();
setTimeout(() => {
this.autoPlay();
}, 1500);
}, },
......
export const DefaultData = {"haveCover":true,"coverType":"Spine","coverImage":"","coverAudio":"","coverText":"","coverDragonBone":{"skeJsonData":{"url":""},"texJsonData":{"url":""},"texPngData":{"url":""}},"titleAudio":"","titleText":"","titleTextColor":"A","pageList":[{"pageType":"Spine","pageAudio":"http://staging-teach.cdn.ireadabc.com/784cd4188bf126d6c3c9395d9a807619.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/fc5185ff366f95b362f0d73538d2e553.json","name":"OP_SB1_459612_U1L4_20(1)_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/2b2b56ee758ff7cbeb75d7a912262b51.json","name":"OP_SB1_459612_U1L4_20(1)_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/f57f002e14275cf7e5010ed8cd562ad8.png","name":"OP_SB1_459612_U1L4_20(1)_tex.png"}}},{"pageType":"Image","pageAudio":"http://staging-teach.cdn.ireadabc.com/7934cdcec68eabe639020bad5420d7f8.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/fc5185ff366f95b362f0d73538d2e553.json","name":"OP_SB1_459612_U1L4_20(1)_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/2b2b56ee758ff7cbeb75d7a912262b51.json","name":"OP_SB1_459612_U1L4_20(1)_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/f57f002e14275cf7e5010ed8cd562ad8.png","name":"OP_SB1_459612_U1L4_20(1)_tex.png"}}},{"pageType":"Image","pageAudio":"http://staging-teach.cdn.ireadabc.com/0b42398a12e1b2f075e9965e4d608765.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/fc5185ff366f95b362f0d73538d2e553.json","name":"OP_SB1_459612_U1L4_20(1)_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/2b2b56ee758ff7cbeb75d7a912262b51.json","name":"OP_SB1_459612_U1L4_20(1)_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/f57f002e14275cf7e5010ed8cd562ad8.png","name":"OP_SB1_459612_U1L4_20(1)_tex.png"}}}]} export const DefaultData = {"haveCover":true,"coverType":"Spine","coverImage":"","coverAudio":"","coverText":"","coverDragonBone":{"skeJsonData":{"url":""},"texJsonData":{"url":""},"texPngData":{"url":""}},"titleAudio":"","titleText":"","titleTextColor":"A","pageList":[{"pageType":"Spine","pageAudio":"http://staging-teach.cdn.ireadabc.com/784cd4188bf126d6c3c9395d9a807619.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/7f2602a24e309e510c73c53a96fe6b6e.json","name":"1_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/71800e266bff929bbc06c156baa1d9b6.json","name":"1_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/123ba3640cc3501f65a2e439b9238d43.png","name":"1_tex.png"}}},{"pageType":"Image","pageAudio":"http://staging-teach.cdn.ireadabc.com/7934cdcec68eabe639020bad5420d7f8.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/91f721bcab47d4f7fc88841313e7591f.json","name":"2_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/f303572b255f15aae1a7851c0c4cb074.json","name":"2_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/e7dc29de6c8ca1f66615b66ca24693fc.png","name":"2_tex.png"}}},{"pageType":"Image","pageAudio":"http://staging-teach.cdn.ireadabc.com/0b42398a12e1b2f075e9965e4d608765.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/cf3dac07b0b20faf1c5fab87258d4f38.json","name":"4_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/b68c639ed3b5eaebbc0413a12d234ae7.json","name":"4_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/f021d176ce4c395ec0f61ca6f166923d.png","name":"4_tex.png"}}}]}
\ No newline at end of file \ No newline at end of file
...@@ -118,8 +118,8 @@ cc.Class({ ...@@ -118,8 +118,8 @@ cc.Class({
if (!size) { if (!size) {
return; return;
} }
let bgWidth = 477; let bgWidth = 482;
let bgHeight = 470; let bgHeight = 489;
if (size.width != bgWidth || size.height != bgHeight) { if (size.width != bgWidth || size.height != bgHeight) {
let designScale = bgWidth / bgHeight; let designScale = bgWidth / bgHeight;
let scale = size.width / size.height; let scale = size.width / size.height;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
"genMipmaps": false, "genMipmaps": false,
"packable": true, "packable": true,
"width": 1220, "width": 1220,
"height": 852, "height": 888,
"platformSettings": {}, "platformSettings": {},
"subMetas": { "subMetas": {
"bg_book": { "bg_book": {
...@@ -19,13 +19,13 @@ ...@@ -19,13 +19,13 @@
"trimThreshold": 1, "trimThreshold": 1,
"rotated": false, "rotated": false,
"offsetX": 0, "offsetX": 0,
"offsetY": 6.5, "offsetY": 0,
"trimX": 0, "trimX": 0,
"trimY": 0, "trimY": 0,
"width": 1220, "width": 1220,
"height": 839, "height": 1143,
"rawWidth": 1220, "rawWidth": 1220,
"rawHeight": 852, "rawHeight": 1143,
"borderTop": 0, "borderTop": 0,
"borderBottom": 0, "borderBottom": 0,
"borderLeft": 0, "borderLeft": 0,
......
This source diff could not be displayed because it is too large. You can view the blob instead.
{ {
"compilerOptions": { "compilerOptions": {
"target": "es6", "target": "es6",
"module": "commonjs", "module": "commonjs",
"experimentalDecorators": true "experimentalDecorators": true
}, },
"exclude": [ "exclude": [
"node_modules", "node_modules",
".vscode", ".vscode",
"library", "library",
"local", "local",
"settings", "settings",
"temp" "temp"
] ]
} }
\ 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