Commit 7ccbfed0 authored by 李维's avatar 李维

添加关卡解锁

parent 08a6ce2a
{
"ver": "2.0.1",
"uuid": "ce499145-51f9-4adf-ae8b-aa5a522b3473",
"downloadMode": 0,
"duration": 4.231837,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "4c37ab39-47a2-45c4-80fb-e875bec2c3e1",
"downloadMode": 0,
"duration": 1.906939,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "2.0.1",
"uuid": "7a47ec4b-e510-4d61-871d-144ac6bf0e3f",
"downloadMode": 0,
"duration": 3.056327,
"subMetas": {}
}
\ No newline at end of file
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -169,23 +169,24 @@ export default class UnitPageClass extends PageComponentBaseClass {
const twoFlow = []; // 第二层需要获取完成状态
tree.forEach(item => {
item.children.forEach(one => {
oneFlow.push(one.id);
// oneFlow.push(one.id);
one.children.forEach(two => {
twoFlow.push(two.id);
});
});
});
const { rows } = await asyncCallNetworkApiGet(`/api/kyxq/v1/user/syllabus/status`, { syllabuses: [...oneFlow, ...twoFlow].join(`,`) });
const { rows } = await asyncCallNetworkApiGet(`/api/kyxq/v1/user/syllabus/status`, { syllabuses: [...twoFlow].join(`,`) });
if(!rows) {
return
}
for (let i = 0; i < rows.length; i++) {
const row = rows[i];
if (oneFlow.includes(row.id)) {
this.syllabusLockStatusStore[row.id] = row.unlock == 0 ? 'locked' : 'unlock';
}
if (twoFlow.includes(row.id)) {
this.syllabusFinishedStore[row.id] = row.end == 0 ? 'unfinish' : 'finished';
// if (twoFlow.includes(row.syllabus_id)) {
// this.syllabusLockStatusStore[row.syllabus_id] = row.unlock == 0 ? 'locked' : 'unlock';
// }
if (twoFlow.includes(row.syllabus_id)) {
this.syllabusFinishedStore[row.syllabus_id] = row.end == 0 ? 'unfinish' : 'finished';
}
}
}
......@@ -286,23 +287,26 @@ export default class UnitPageClass extends PageComponentBaseClass {
const pointBase = cc.find("point", subNode);
const pointLayer = cc.find("pint_layer", subNode);
const pointDisX = 57;
pointBase.opacity = 0;
for (let k = 0; k < 8; k++) {
for (let k = 0; k < subData.children.length; k++) {
const clsData = subData.children[k];
const pointNode = cc.instantiate(pointBase);
pointNode.opacity = 255;
if (clsData) {
const finished = this.syllabusLockStatusStore[clsData.id] === 'finished';
const finished = this.syllabusFinishedStore[clsData.id] === 'finished';
const finishIcon = cc.find("blue", pointNode);
if (!finished) {
const finishIcon = cc.find("blue", pointNode);
finishIcon.active = false;
} else {
}
} else {
const finishIcon = cc.find("blue", pointNode);
finishIcon.active = false;
}
pointLayer.addChild(pointNode);
pointNode.x = pointBase.x + k * pointDisX;
// pointNode.x = pointBase.x + k * pointDisX;
}
// 解锁
......
......@@ -287,7 +287,7 @@ export default class MiddleLayerClass extends middleLayerBase {
goldAnim.parent = finishLayer;
finishLayer.active = true;
appearAnim(finishLayer, 0.3);
playLocalAudio("finish1")
await asyncPlayDragonBoneAnimation(goldAnim, 'newAnimation', 1, null);
goldAnim.active = false;
......@@ -303,7 +303,7 @@ export default class MiddleLayerClass extends middleLayerBase {
const finishLayer = cc.find("middleLayer/finishLayer")
finishLayer.addChild(finishAnim, 2);
finishLayer.active = true;
playLocalAudio("finish2")
await asyncPlayDragonBoneAnimation(finishAnim, 'newAnimation', 1, null);
const replayBtn = cc.find('middleLayer/res/img/btn_replay');
......@@ -338,7 +338,7 @@ export default class MiddleLayerClass extends middleLayerBase {
const finishLayer = cc.find("middleLayer/finishLayer")
finishLayer.addChild(finishAnim, 2);
finishLayer.active = true;
playLocalAudio("allfinish")
await asyncPlayDragonBoneAnimation(finishAnim, 'newAnimation', 1, null);
const exitBtn = cc.find('middleLayer/res/img/btn_x');
......
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