Commit 054ef3eb authored by Tt's avatar Tt

单题流程完成

parent d63c7707
......@@ -1941,7 +1941,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "01B50V6MlFwpm66MJrGabq"
"_id": "e8Oflf655LyJDaC6jWoQHl"
},
{
"__type__": "cc.Label",
......@@ -1974,7 +1974,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "86sS+04GpN5712QMjoqFOa"
"_id": "3cKzD8chlJF6BXy9VBb/sL"
},
{
"__type__": "cc.PrivateNode",
......@@ -2037,7 +2037,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "b8iKdSW/1D6YdbAdrra8ly"
"_id": "75vLHgx0JFq6GxbAPMvLlh"
},
{
"__type__": "cc.Label",
......@@ -2070,7 +2070,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "2aDfhzv/VERrMhxbaLTjCV"
"_id": "821B2OXItMkKHvk3F28Pfn"
},
{
"__type__": "cc.RichText",
......@@ -2579,7 +2579,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "07ghmy0wVFDre7Jz6EXPnG"
"_id": "40yaE3AHhLRpr0mihD+7vN"
},
{
"__type__": "cc.Label",
......@@ -2612,7 +2612,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "a6NPUHpChANb+hEgNFs4Yr"
"_id": "04j6e78ZZB4YUYsUumcks8"
},
{
"__type__": "cc.PrivateNode",
......@@ -2675,7 +2675,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "08KESWyHtJBq6DnltGafbG"
"_id": "3a23/YdllDjoAaQEwmhdKt"
},
{
"__type__": "cc.Label",
......@@ -2708,7 +2708,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "4dNJpFg55CNrN6ZYbYrUud"
"_id": "b139KqOCJPrqH5C8nk82Us"
},
{
"__type__": "cc.PrivateNode",
......@@ -2771,7 +2771,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "41/KsgMiJJDrIoGWuL2Gga"
"_id": "a2ukaDOexGvJ9duDv0KKBt"
},
{
"__type__": "cc.Label",
......@@ -2804,7 +2804,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "c9svdq8AhDhJQdDeT8NyYA"
"_id": "f1nVMg941P458Nlw5csRZX"
},
{
"__type__": "cc.PrivateNode",
......@@ -2867,7 +2867,7 @@
"_groupIndex": 0,
"groupIndex": 0,
"showInEditor": false,
"_id": "8eissyzgxOQ4Fl5i4s6iZT"
"_id": "9bfx2BTIRCUJwToI+YDQpm"
},
{
"__type__": "cc.Label",
......@@ -2900,7 +2900,7 @@
"_N$fontFamily": "Arial",
"_N$overflow": 0,
"_N$cacheMode": 0,
"_id": "42pLFn86BEYrJC9D00wQbn"
"_id": "8dQ6TsswhLAYO+GsiBgJjH"
},
{
"__type__": "cc.RichText",
......
......@@ -104,7 +104,7 @@ export default class SceneComponent extends MyCocosSceneComponent {
// 更新派
// this.initLayoutPie();
}
static successPosArray: Array<cc.Vec2> = [cc.v2(50, -30), cc.v2(0, 0)];
static successPosArray: Array<cc.Vec2> = [cc.v2(50, -30), cc.v2(50, 0)];
private successArr: Array<cc.Node>;
get successPos() {
return SceneComponent.successPosArray[this.successArr.length]
......@@ -185,6 +185,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onTouchMeetEnd(event) {
let node = event.target;
if (!node.data) node = node.parent;
if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return;
if (node != this.meetCurrentNode) return;
let x = node.x;
let y = node.y;
......@@ -295,6 +298,9 @@ export default class SceneComponent extends MyCocosSceneComponent {
}
onTouchVegetableEnd(event) {
let node = event.target;
if (!node.data) node = node.parent;
if (!node || !node.data) return;
if (node.data.id != this.currentQuestion.id) return;
if (node != this.vegetableCurrentNode) return;
let x = node.x;
let y = node.y;
......@@ -336,12 +342,17 @@ export default class SceneComponent extends MyCocosSceneComponent {
static pieDefaultPos: cc.Vec2 = cc.v2(48.822, 58.632);
static pieStartPos: cc.Vec2 = cc.v2(48.822, 693.308);
showPie() {
if (1) return;
this.scheduleOnce(() => {
let node = pg.view.clone(this.item_pie);
this.layout_pie.addChild(node)
node.x = SceneComponent.pieDefaultPos.x;
node.y = SceneComponent.pieDefaultPos.y;
node.x = SceneComponent.pieStartPos.x;
node.y = SceneComponent.pieStartPos.y;
this.updateItemPie(node, this.currentQuestion);
cc.tween(node)
.to(0.5, { x: SceneComponent.pieDefaultPos.x, y: SceneComponent.pieDefaultPos.y - 50 })
.to(0.06, { x: SceneComponent.pieDefaultPos.x, y: SceneComponent.pieDefaultPos.y })
.start();
}, 0.2)
}
//标题刷新 标题如果不配置,就不显示那个黄色标题小标签。 三种情况 题干无、题干有、题干图片+文字 文字默认颜色和高亮颜色都是不同的。超框体缩字。
updateItemPie(item, data) {
......@@ -363,10 +374,6 @@ export default class SceneComponent extends MyCocosSceneComponent {
} else {
text.active = false;
}
let bg_title = pg.view.find(item, 'bg_title');
bg_title.active = !!data.title
pg.view.setString(pg.view.find(bg_title, 'label'), data.title);
}
//-------------------------------中间区域---------------------------------
static mainDefaultPos: cc.Vec2 = cc.v2(48.822, -93.308);
......
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