Commit 40baf6fd authored by Tt's avatar Tt

滑动改按钮

parent 8fdda601
......@@ -120,31 +120,31 @@
"__id__": 69
},
{
"__id__": 71
"__id__": 72
},
{
"__id__": 73
"__id__": 75
},
{
"__id__": 75
"__id__": 77
}
],
"_active": true,
"_components": [
{
"__id__": 77
"__id__": 79
},
{
"__id__": 78
"__id__": 80
},
{
"__id__": 79
"__id__": 81
},
{
"__id__": 80
"__id__": 82
},
{
"__id__": 81
"__id__": 83
}
],
"_prefab": null,
......@@ -2064,7 +2064,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
......@@ -2403,7 +2403,7 @@
1,
1,
1,
1
0
]
},
"_eulerAngles": {
......@@ -3328,7 +3328,7 @@
"__id__": 2
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 67
......@@ -3489,16 +3489,19 @@
},
{
"__type__": "cc.Node",
"_name": "tip_0",
"_name": "left_arrow",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 70
},
{
"__id__": 71
}
],
"_prefab": null,
......@@ -3512,8 +3515,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 497,
"height": 110
"width": 124,
"height": 128
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3524,8 +3527,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
39.456,
-558.458,
-150.663,
0,
0,
0,
......@@ -3547,7 +3550,7 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "ecjtRUfhNMG4tsaYWDxMWx"
"_id": "9bQyiqUS1KH7ZTApEPWyX6"
},
{
"__type__": "cc.Sprite",
......@@ -3565,7 +3568,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "de70b075-062d-4772-a930-dfdcc645e1d2"
"__uuid__": "4054aeea-5ce1-42d0-a5ab-906386cf9b1b"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3579,20 +3582,93 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "69xO56GlBAk6QXH0rXReO9"
"_id": "a1WZ4YglFKcp9JbH8zeeIQ"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 69
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 69
},
"_id": "d9xvch6rJOcZj7JdYyHh6R"
},
{
"__type__": "cc.Node",
"_name": "tip_1",
"_name": "right_arrow",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": false,
"_active": true,
"_components": [
{
"__id__": 72
"__id__": 73
},
{
"__id__": 74
}
],
"_prefab": null,
......@@ -3606,8 +3682,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 497,
"height": 110
"width": 122,
"height": 130
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3618,8 +3694,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
0,
39.456,
553.981,
5.187,
0,
0,
0,
......@@ -3641,14 +3717,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "b0vQ6t0DZDbYXyxwbwfnp1"
"_id": "47b50PvWpLG52+LrJDAW3P"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 71
"__id__": 72
},
"_enabled": true,
"_materials": [
......@@ -3659,7 +3735,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "1ae60f0a-c5c5-40fc-a2f1-1c7ed6d9aaa7"
"__uuid__": "2efdbe43-b4fd-4b2f-b281-290b0013cf19"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3673,20 +3749,90 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9bhXN0utBB7rbbxZ+pfdnE"
"_id": "e9f9/7SKJIt4KzWZNfdjAP"
},
{
"__type__": "cc.Button",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 72
},
"_enabled": true,
"_normalMaterial": null,
"_grayMaterial": null,
"duration": 0.1,
"zoomScale": 1.2,
"clickEvents": [],
"_N$interactable": true,
"_N$enableAutoGrayEffect": false,
"_N$transition": 0,
"transition": 0,
"_N$normalColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"pressedColor": {
"__type__": "cc.Color",
"r": 211,
"g": 211,
"b": 211,
"a": 255
},
"_N$hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"hoverColor": {
"__type__": "cc.Color",
"r": 255,
"g": 255,
"b": 255,
"a": 255
},
"_N$disabledColor": {
"__type__": "cc.Color",
"r": 124,
"g": 124,
"b": 124,
"a": 255
},
"_N$normalSprite": null,
"_N$pressedSprite": null,
"pressedSprite": null,
"_N$hoverSprite": null,
"hoverSprite": null,
"_N$disabledSprite": null,
"_N$target": {
"__id__": 72
},
"_id": "96olvnlAdGb4lss5DPZ18s"
},
{
"__type__": "cc.Node",
"_name": "left_arrow",
"_name": "tip_0",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 74
"__id__": 76
}
],
"_prefab": null,
......@@ -3700,8 +3846,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 124,
"height": 128
"width": 497,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3712,8 +3858,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
-573.506,
0,
39.456,
0,
0,
0,
......@@ -3735,14 +3881,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "cf9ky3xqVDGqllJioK4q4P"
"_id": "ecjtRUfhNMG4tsaYWDxMWx"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 73
"__id__": 75
},
"_enabled": true,
"_materials": [
......@@ -3753,7 +3899,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "4054aeea-5ce1-42d0-a5ab-906386cf9b1b"
"__uuid__": "de70b075-062d-4772-a930-dfdcc645e1d2"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3767,20 +3913,20 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "9eq6yiZi5PP4QvnNwFq2fM"
"_id": "69xO56GlBAk6QXH0rXReO9"
},
{
"__type__": "cc.Node",
"_name": "right_arrow",
"_name": "tip_1",
"_objFlags": 0,
"_parent": {
"__id__": 2
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 76
"__id__": 78
}
],
"_prefab": null,
......@@ -3794,8 +3940,8 @@
},
"_contentSize": {
"__type__": "cc.Size",
"width": 122,
"height": 130
"width": 497,
"height": 110
},
"_anchorPoint": {
"__type__": "cc.Vec2",
......@@ -3806,8 +3952,8 @@
"__type__": "TypedArray",
"ctor": "Float64Array",
"array": [
573.506,
0,
39.456,
0,
0,
0,
......@@ -3829,14 +3975,14 @@
"_is3DNode": false,
"_groupIndex": 0,
"groupIndex": 0,
"_id": "19XRFgN2dGJb2bHJQA/y4u"
"_id": "b0vQ6t0DZDbYXyxwbwfnp1"
},
{
"__type__": "cc.Sprite",
"_name": "",
"_objFlags": 0,
"node": {
"__id__": 75
"__id__": 77
},
"_enabled": true,
"_materials": [
......@@ -3847,7 +3993,7 @@
"_srcBlendFactor": 770,
"_dstBlendFactor": 771,
"_spriteFrame": {
"__uuid__": "2efdbe43-b4fd-4b2f-b281-290b0013cf19"
"__uuid__": "1ae60f0a-c5c5-40fc-a2f1-1c7ed6d9aaa7"
},
"_type": 0,
"_sizeMode": 1,
......@@ -3861,7 +4007,7 @@
"_fillRange": 0,
"_isTrimmedMode": true,
"_atlas": null,
"_id": "06n40lTnFFMIVZfYeCXMJv"
"_id": "9bhXN0utBB7rbbxZ+pfdnE"
},
{
"__type__": "cc.Canvas",
......@@ -3945,13 +4091,19 @@
"__uuid__": "320caeb2-9a8a-41b4-a87f-62d541b235fd"
},
"tipFirst": {
"__id__": 69
"__id__": 75
},
"tipLast": {
"__id__": 71
"__id__": 77
},
"btnLeft": {
"__id__": 69
},
"btnRight": {
"__id__": 72
},
"capture": {
"__id__": 81
"__id__": 83
},
"_id": "76pKAVQpBDVby2iIHB3LLz"
},
......
......@@ -19,6 +19,8 @@ cc.Class({
pfbItemTurnPage2: cc.Prefab,
tipFirst: cc.Node,
tipLast: cc.Node,
btnLeft: cc.Node,
btnRight: cc.Node,
// verletRender: VerletRender,
capture: require('capture_to_web'),
},
......@@ -87,7 +89,7 @@ cc.Class({
let data = DefaultData;
// return data;
return {"haveCover":false,"coverType":"Image","coverImage":"","coverAudio":"","coverText":"","coverDragonBone":{"skeJsonData":{"url":""},"texJsonData":{"url":""},"texPngData":{"url":""}},"titleAudio":"","titleText":"","titleTextColor":"A","pageList":[{"pageType":"Image","pageAudio":"http://staging-teach.cdn.ireadabc.com/cc5b1a8730bc275ecac85185d5ce2c5b.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/679fed26daa464819d553de6331b3552.json","name":"alien-pro.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/65d8214c6b5c5d0496e17adb0408276a.atlas","name":"alien-pro.atlas"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/a319b372899239325b90bb4ec07b4970.png","name":"alien-pro.png"},"animType":"spine"}},{"pageType":"Image","pageAudio":"http://staging-teach.cdn.ireadabc.com/fd877ad376fdffdb0dfc62122065a78f.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/d1f859d3fba84bd03565e543c986fb28.json","name":"6_4_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/70f96e1cc7f013e27ed1952c503fb750.json","name":"6_4_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/b06f9b90018a6eb0175a01e355b9ced6.png","name":"6_4_tex.png"},"animType":"dragonBone"}},{"pageType":"Image","pageAudio":"http://staging-teach.cdn.ireadabc.com/dff6748c93f6bf3de8cb7105fa9ba5de.mp3","pageText":"","pageImage":"","textColor":"A","pageDragonBone":{"skeJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/a278a56fe77dfade7366829e9c65c815.json","name":"6_3_ske.json"},"texJsonData":{"url":"http://staging-teach.cdn.ireadabc.com/96680527a570cec4d7c9818c91ec434a.json","name":"6_3_tex.json"},"texPngData":{"url":"http://staging-teach.cdn.ireadabc.com/5c441810b0a5bc73248c50d8c32b4899.png","name":"6_3_tex.png"},"animType":"dragonBone"}}]}
return { "haveCover": false, "coverType": "Image", "coverImage": "", "coverAudio": "", "coverText": "", "coverDragonBone": { "skeJsonData": { "url": "" }, "texJsonData": { "url": "" }, "texPngData": { "url": "" } }, "titleAudio": "", "titleText": "", "titleTextColor": "A", "pageList": [{ "pageType": "Image", "pageAudio": "http://staging-teach.cdn.ireadabc.com/cc5b1a8730bc275ecac85185d5ce2c5b.mp3", "pageText": "", "pageImage": "", "textColor": "A", "pageDragonBone": { "skeJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/679fed26daa464819d553de6331b3552.json", "name": "alien-pro.json" }, "texJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/65d8214c6b5c5d0496e17adb0408276a.atlas", "name": "alien-pro.atlas" }, "texPngData": { "url": "http://staging-teach.cdn.ireadabc.com/a319b372899239325b90bb4ec07b4970.png", "name": "alien-pro.png" }, "animType": "spine" } }, { "pageType": "Image", "pageAudio": "http://staging-teach.cdn.ireadabc.com/fd877ad376fdffdb0dfc62122065a78f.mp3", "pageText": "", "pageImage": "", "textColor": "A", "pageDragonBone": { "skeJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/d1f859d3fba84bd03565e543c986fb28.json", "name": "6_4_ske.json" }, "texJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/70f96e1cc7f013e27ed1952c503fb750.json", "name": "6_4_tex.json" }, "texPngData": { "url": "http://staging-teach.cdn.ireadabc.com/b06f9b90018a6eb0175a01e355b9ced6.png", "name": "6_4_tex.png" }, "animType": "dragonBone" } }, { "pageType": "Image", "pageAudio": "http://staging-teach.cdn.ireadabc.com/dff6748c93f6bf3de8cb7105fa9ba5de.mp3", "pageText": "", "pageImage": "", "textColor": "A", "pageDragonBone": { "skeJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/a278a56fe77dfade7366829e9c65c815.json", "name": "6_3_ske.json" }, "texJsonData": { "url": "http://staging-teach.cdn.ireadabc.com/96680527a570cec4d7c9818c91ec434a.json", "name": "6_3_tex.json" }, "texPngData": { "url": "http://staging-teach.cdn.ireadabc.com/5c441810b0a5bc73248c50d8c32b4899.png", "name": "6_3_tex.png" }, "animType": "dragonBone" } }] }
},
preloadItem() {
......@@ -178,7 +180,7 @@ cc.Class({
let itemPage = page.getComponent('ItemPage');
itemPage.playAudio();
itemPage.playSpine().then(() => {
if (this.pageList.length - GameData.pageIndex <=2) {
if (this.pageList.length - GameData.pageIndex <= 2) {
onHomeworkFinish();
}
resolve('');
......@@ -194,6 +196,7 @@ cc.Class({
initEvent() {
// this.touchPanel._touchListener && this.touchPanel._touchListener.setSwallowTouches(false);
// this.touchPanel._touchListener.swallowTouches = false;
this.touchPanel.active = false;
this.touchPanel.on(cc.Node.EventType.TOUCH_END, this.onTouchPanel, this)
},
cons(data) {
......@@ -215,22 +218,15 @@ cc.Class({
const lastBtn = this.lastBtn = cc.find("Canvas/left_arrow");
const nextBtn = this.nextBtn = cc.find("Canvas/right_arrow");
lastBtn.on("touchstart", () => {
const isSuccess = this.onTouchPanelLeft();
isSuccess && jelly(lastBtn);
})
lastBtn.on(cc.Node.EventType.TOUCH_END, this.onTouchPanelLeft, this)
nextBtn.on("touchstart", () => {
const isSuccess = this.onTouchPanelRight();
isSuccess && jelly(nextBtn);
})
nextBtn.on(cc.Node.EventType.TOUCH_END, this.onTouchPanelRight, this)
},
checkShowArrowBtn() {
setTimeout(() => {
this.lastBtn.active = !this.nodeDict.btnLast.children[1].active;
this.nextBtn.active = !this.nodeDict.btnNext.children[1].active;
}, 220);
},
autoPlay() {
//自动开始播放动画,及触发动画效果
......
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