Commit fe0ee2df authored by Tt's avatar Tt

引导完成

parent 054ef3eb
...@@ -1941,7 +1941,7 @@ ...@@ -1941,7 +1941,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "e8Oflf655LyJDaC6jWoQHl" "_id": "87c+HiX6lPyILFw6y2qm+0"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -1974,7 +1974,7 @@ ...@@ -1974,7 +1974,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "3cKzD8chlJF6BXy9VBb/sL" "_id": "faTfxzw4VGtp5Bv33XYvhI"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2037,7 +2037,7 @@ ...@@ -2037,7 +2037,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "75vLHgx0JFq6GxbAPMvLlh" "_id": "ebfz4fXjhFNIJCOPJUg+xe"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2070,7 +2070,7 @@ ...@@ -2070,7 +2070,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "821B2OXItMkKHvk3F28Pfn" "_id": "737cu084NBc4pRna5LhZAJ"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -2579,7 +2579,7 @@ ...@@ -2579,7 +2579,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "40yaE3AHhLRpr0mihD+7vN" "_id": "dfI18MzjxI4ox9793IWq6g"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2612,7 +2612,7 @@ ...@@ -2612,7 +2612,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "04j6e78ZZB4YUYsUumcks8" "_id": "66VxFP8RZG1obHBa2zX+dW"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2675,7 +2675,7 @@ ...@@ -2675,7 +2675,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "3a23/YdllDjoAaQEwmhdKt" "_id": "84Z1ZmR2JNbpfzxQpqS7rA"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2708,7 +2708,7 @@ ...@@ -2708,7 +2708,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "b139KqOCJPrqH5C8nk82Us" "_id": "3fNv2bNbRF4Yf2X5OW4gCS"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2771,7 +2771,7 @@ ...@@ -2771,7 +2771,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "a2ukaDOexGvJ9duDv0KKBt" "_id": "ee7/K8ZmpGJ4PsbHDNVJsj"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2804,7 +2804,7 @@ ...@@ -2804,7 +2804,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "f1nVMg941P458Nlw5csRZX" "_id": "d0R1NQ5s1EwLbGmm/b7qXq"
}, },
{ {
"__type__": "cc.PrivateNode", "__type__": "cc.PrivateNode",
...@@ -2867,7 +2867,7 @@ ...@@ -2867,7 +2867,7 @@
"_groupIndex": 0, "_groupIndex": 0,
"groupIndex": 0, "groupIndex": 0,
"showInEditor": false, "showInEditor": false,
"_id": "9bfx2BTIRCUJwToI+YDQpm" "_id": "6fQ+PYYMBObYSeyQErdCaE"
}, },
{ {
"__type__": "cc.Label", "__type__": "cc.Label",
...@@ -2900,7 +2900,7 @@ ...@@ -2900,7 +2900,7 @@
"_N$fontFamily": "Arial", "_N$fontFamily": "Arial",
"_N$overflow": 0, "_N$overflow": 0,
"_N$cacheMode": 0, "_N$cacheMode": 0,
"_id": "8dQ6TsswhLAYO+GsiBgJjH" "_id": "92cFPUhutEfJJ/7M9hPYL+"
}, },
{ {
"__type__": "cc.RichText", "__type__": "cc.RichText",
...@@ -4162,7 +4162,7 @@ ...@@ -4162,7 +4162,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "line_left", "_name": "line_right",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 83 "__id__": 83
...@@ -4263,8 +4263,8 @@ ...@@ -4263,8 +4263,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
148.831, -84.505,
-67.577, -238.509,
0, 0,
0, 0,
0, 0,
...@@ -4354,7 +4354,7 @@ ...@@ -4354,7 +4354,7 @@
}, },
{ {
"__type__": "cc.Node", "__type__": "cc.Node",
"_name": "line_right", "_name": "line_left",
"_objFlags": 0, "_objFlags": 0,
"_parent": { "_parent": {
"__id__": 83 "__id__": 83
...@@ -4455,8 +4455,8 @@ ...@@ -4455,8 +4455,8 @@
"__type__": "TypedArray", "__type__": "TypedArray",
"ctor": "Float64Array", "ctor": "Float64Array",
"array": [ "array": [
148.831, -45.43,
-67.577, -208.181,
0, 0,
0, 0,
0, 0,
......
...@@ -101,8 +101,8 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -101,8 +101,8 @@ export default class SceneComponent extends MyCocosSceneComponent {
this.initLayoutVegetable(); this.initLayoutVegetable();
// 开始第一题(中间初始化) // 开始第一题(中间初始化)
this.initLayoutMain(); this.initLayoutMain();
// 更新派 // 初始化引导
// this.initLayoutPie(); this.initGuide();
} }
static successPosArray: Array<cc.Vec2> = [cc.v2(50, -30), cc.v2(50, 0)]; static successPosArray: Array<cc.Vec2> = [cc.v2(50, -30), cc.v2(50, 0)];
private successArr: Array<cc.Node>; private successArr: Array<cc.Node>;
...@@ -189,6 +189,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -189,6 +189,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
if (node != this.meetCurrentNode) return; if (node != this.meetCurrentNode) return;
this.hideGuide();
let x = node.x; let x = node.x;
let y = node.y; let y = node.y;
// 碰撞 成功落地 // 碰撞 成功落地
...@@ -302,6 +303,7 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -302,6 +303,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
if (!node || !node.data) return; if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return; if (node.data.id != this.currentQuestion.id) return;
if (node != this.vegetableCurrentNode) return; if (node != this.vegetableCurrentNode) return;
this.hideGuide();
let x = node.x; let x = node.x;
let y = node.y; let y = node.y;
// 碰撞 成功落地 // 碰撞 成功落地
...@@ -458,9 +460,30 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -458,9 +460,30 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 先引导左边肉饼, 再引导菜叶子 引导动画虽然有顺序,但是用户第一题跟随引导完,自己做其他题时候拖拽顺序不被限制。 // 先引导左边肉饼, 再引导菜叶子 引导动画虽然有顺序,但是用户第一题跟随引导完,自己做其他题时候拖拽顺序不被限制。
// 停留时间8s以上,手指提示拖拽。 // 停留时间8s以上,手指提示拖拽。
private guide: number;
initGuide() {
this.guide = 0;
this.showGuide();
}
startGuide() { startGuide() {
//
} }
showGuide() {
if (this.guide == 0) {
this.showGuideLeft();
} else if (this.guide == 1) {
this.showGuideRight();
} else {
if (!this.successArr.length) {
this.showGuideLeft();
} else if (this.meetNodes.length >= this.vegetableNodes.length) {
this.showGuideLeft();
} else {
this.showGuideRight();
}
}
}
hideGuide() { hideGuide() {
let layout_tip = pg.view.find(this, 'layout_tip'); let layout_tip = pg.view.find(this, 'layout_tip');
let line_left = pg.view.find(layout_tip, 'line_left'); let line_left = pg.view.find(layout_tip, 'line_left');
...@@ -469,17 +492,35 @@ export default class SceneComponent extends MyCocosSceneComponent { ...@@ -469,17 +492,35 @@ export default class SceneComponent extends MyCocosSceneComponent {
line_right.active = false; line_right.active = false;
} }
showGuideLeft() { showGuideLeft() {
this.showGuideReal('left')
let layout_tip = pg.view.find(this, 'layout_tip');
let line_left = pg.view.find(layout_tip, 'line_left');
let finger = pg.view.find(line_left, 'finger');
cc.tween(finger).repeatForever(
cc.tween().call(() => {
finger.x = 310
finger.y = 55
}).to(0.8, { x: -45, y: -210 })
).start();
} }
showGuideRight() { showGuideRight() {
this.showGuideReal('right')
} let layout_tip = pg.view.find(this, 'layout_tip');
showGuide(type) { let line_right = pg.view.find(layout_tip, 'line_right');
let finger = pg.view.find(line_right, 'finger');
cc.tween(finger).repeatForever(
cc.tween().call(() => {
finger.x = 390
finger.y = 95
}).to(0.8, { x: -90, y: -240 })
).start();
}
showGuideReal(type) {
let layout_tip = pg.view.find(this, 'layout_tip'); let layout_tip = pg.view.find(this, 'layout_tip');
let line_left = pg.view.find(layout_tip, 'line_left'); let line_left = pg.view.find(layout_tip, 'line_left');
let line_right = pg.view.find(layout_tip, 'line_right'); let line_right = pg.view.find(layout_tip, 'line_right');
line_left.active = type == 'left'; line_left.active = type == 'left';
line_right.active = type == 'right'; line_right.active = type == 'right';
} }
......
...@@ -6,13 +6,23 @@ ...@@ -6,13 +6,23 @@
所有的文字部分需要区分高亮 所有的文字部分需要区分高亮
整体流程 整体流程
1.标题部分 、大标题
2.左侧图片/文字 文字有多色高亮 肉饼、面包片、菜叶子上面的文字默认颜色和高亮颜色都是不同的。
3.右侧文字高亮 右上角菜叶子我给了一个,但是你展示在右上角时,每一片都需要有5-10度的转动。
4.先引导左边肉饼, 再引导菜叶子 引导动画虽然有顺序,但是用户第一题跟随引导完,自己做其他题时候拖拽顺序不被限制。
5.上面掉下来一个面包片 炸星星 上面那个面包片掉下来之后,需要弹起一下再落下。
6.面包片有图片+文字 或 文字
7.用户点击下一页, 面包移出画面。
8.下一题刷新选项
9.最多配置5道题 不限制
10.小迪右跑左。 抛出画面
11.所有题做完,小迪入场结束 + 退出按钮
12.三种情况 题干无、题干有、题干图片+文字
13.当不做题的时候点击。面包向下移出,蔬菜和肉饼乡下移动回来。
14.往前翻,向下移动上面下来一个新的内容。 天上掉落内容。
15.停留时间8s以上,手指提示拖拽。
16.超框体缩字。
17.每一题就一片叶子一片肉饼
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