|
@@ -3154,7 +3154,9 @@
|
|
|
xGame.common.d2World.d2Gan.ui.rotation = angle;
|
|
|
xGame.common.d2World.getHelpLine();
|
|
|
xGame.common.clickedBall = true;
|
|
|
+ console.log('zh:点击之后=判断引导');
|
|
|
this.checkGuide();
|
|
|
+ this.checkGuideForLianXi();
|
|
|
}
|
|
|
checkGuide() {
|
|
|
let guide = DataMgr.getSkillGuide();
|
|
@@ -3164,6 +3166,22 @@
|
|
|
xGame.common.gameUI.ui.guide2.visible = true;
|
|
|
}
|
|
|
}
|
|
|
+ checkGuideForLianXi() {
|
|
|
+ let guide_lianxi = DataMgr.getLianXiGuide();
|
|
|
+ if (guide_lianxi == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 0) {
|
|
|
+ xGame.common.guideStepForLianXi = 1;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd1.visible = true;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ if (guide_lianxi == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 1) {
|
|
|
+ xGame.common.guideStepForLianXi = 2;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd2.visible = true;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ console.log('zh: xGame.common.guideStepForLianXi=' + xGame.common.guideStepForLianXi);
|
|
|
+ }
|
|
|
+ }
|
|
|
checkDistance(disX, disY, angle) {
|
|
|
let diameter = this.gameObj.width - 1;
|
|
|
let dis = Math.pow(disX - this.gameObj.x, 2) + Math.pow(disY - this.gameObj.y, 2);
|
|
@@ -4471,6 +4489,9 @@
|
|
|
this.guide1 = (this.getChild("guide1"));
|
|
|
this.guide3 = (this.getChild("guide3"));
|
|
|
this.guideNode = (this.getChild("guideNode"));
|
|
|
+ this.n_lxms_yd1 = (this.getChild("n_lxms_yd1"));
|
|
|
+ this.n_lxms_yd2 = (this.getChild("n_lxms_yd2"));
|
|
|
+ this.n_lxms_yd3 = (this.getChild("n_lxms_yd3"));
|
|
|
}
|
|
|
}
|
|
|
ui_UIGame.URL = "ui://isxx5ak7kt443qg";
|
|
@@ -5180,7 +5201,6 @@
|
|
|
this.ui.myNode.n_yd_3.visible = false;
|
|
|
console.log('zh:无需引导33');
|
|
|
}
|
|
|
- DataMgr.setLianXiGuide(0);
|
|
|
}
|
|
|
showPreView() {
|
|
|
let item;
|
|
@@ -5263,7 +5283,14 @@
|
|
|
console.log('zh:eeeee');
|
|
|
}
|
|
|
else {
|
|
|
- console.log('zh:powerEnough 不足 =' + DataMgr.powerEnough());
|
|
|
+ let guide = DataMgr.getLianXiGuide();
|
|
|
+ if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
|
|
|
+ console.log('zh:自动添加2点体力,以便于完成练习引导模式');
|
|
|
+ DataMgr.setPower(2);
|
|
|
+ }
|
|
|
+ console.log('zh:guide = ' + guide);
|
|
|
+ console.log('zh:xGame.common.gameMode = ' + xGame.common.gameMode);
|
|
|
+ console.log('zh:powerEnough不足=' + DataMgr.powerEnough());
|
|
|
xGame.uiMgr.Show(UIPower);
|
|
|
}
|
|
|
}
|
|
@@ -9114,6 +9141,7 @@
|
|
|
}
|
|
|
xGame.common.gameUI.setTurnAlpha(this.selfTurn);
|
|
|
this.checkGuide();
|
|
|
+ this.checkGuideForPlaceBall();
|
|
|
if (xGame.common.uiRodMethod)
|
|
|
xGame.common.uiRodMethod.resetRod();
|
|
|
xGame.common.d2World.getHelpLine();
|
|
@@ -9199,6 +9227,7 @@
|
|
|
this.firstShoot = true;
|
|
|
}
|
|
|
checkGuide() {
|
|
|
+ console.log('zh: 检查引导123');
|
|
|
let guide = DataMgr.getSkillGuide();
|
|
|
let gameUI = xGame.common.gameUI.ui;
|
|
|
gameUI.guide1.visible = false;
|
|
@@ -9215,6 +9244,25 @@
|
|
|
gameUI.guide1.fingerNode.x = oneBall.gameObj.x;
|
|
|
gameUI.guide1.fingerNode.y = oneBall.gameObj.y;
|
|
|
}
|
|
|
+ checkGuideForPlaceBall() {
|
|
|
+ console.log('zh: 检查引导123 checkGuideForPlaceBall');
|
|
|
+ let gameUI = xGame.common.gameUI.ui;
|
|
|
+ let guide = DataMgr.getLianXiGuide();
|
|
|
+ console.log('zh:checkGuideForPlaceBall =', guide);
|
|
|
+ console.log('zh:xGame.common.gameMode=' + xGame.common.gameMode);
|
|
|
+ if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
|
|
|
+ this.selfTurn = true;
|
|
|
+ gameUI.n_lxms_yd1.visible = true;
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ gameUI.n_lxms_yd1.visible = false;
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let oneBall = this.getOneBallForPlaceBall();
|
|
|
+ gameUI.n_lxms_yd1.visible = true;
|
|
|
+ gameUI.n_lxms_yd1.fingerNode.x = oneBall.gameObj.x;
|
|
|
+ gameUI.n_lxms_yd1.fingerNode.y = oneBall.gameObj.y;
|
|
|
+ }
|
|
|
getOneBall() {
|
|
|
let arr = xGame.common.d2World.ballArr;
|
|
|
for (let index = 0; index < arr.length; index++) {
|
|
@@ -9223,6 +9271,10 @@
|
|
|
return arr[index];
|
|
|
}
|
|
|
}
|
|
|
+ getOneBallForPlaceBall() {
|
|
|
+ let arr = xGame.common.d2World.ballArr;
|
|
|
+ return arr[2];
|
|
|
+ }
|
|
|
updateSelfScore() {
|
|
|
let ui = xGame.common.gameUI.ui.topNode;
|
|
|
ui.selfScoreTxt.text = this.selfScore + "";
|
|
@@ -11396,8 +11448,27 @@
|
|
|
this.updateHead();
|
|
|
let curUse = DataMgr.getCurBallRod();
|
|
|
this.getGanZiImg();
|
|
|
+ this.yinDaoForLianxi();
|
|
|
this.setGlobalFont(this.ui);
|
|
|
}
|
|
|
+ yinDaoForLianxi() {
|
|
|
+ let g = DataMgr.getSkillGuide();
|
|
|
+ if (g === 0) {
|
|
|
+ console.log('zh:默认的引导还没有完毕');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let lianXiGuide = DataMgr.getLianXiGuide();
|
|
|
+ console.log('zh:lianXiGuide=', lianXiGuide);
|
|
|
+ if (lianXiGuide === 0) {
|
|
|
+ this.ui.n_lxms_yd1.visible = true;
|
|
|
+ console.log('zh:yinDaoForLianxi 111 set ok');
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.ui.n_lxms_yd1.visible = false;
|
|
|
+ console.log('zh:无需引导11');
|
|
|
+ }
|
|
|
+ DataMgr.setLianXiGuide(0);
|
|
|
+ }
|
|
|
updateSelf() {
|
|
|
if (xGame.common.gameMode == GameMode.classic) {
|
|
|
this.ui.c1.selectedIndex = 0;
|
|
@@ -11417,6 +11488,7 @@
|
|
|
xGame.common.bigMoveLevelIndex = rand;
|
|
|
}
|
|
|
else if (xGame.common.gameMode == GameMode.placeBall) {
|
|
|
+ console.log('zh:练习模式...');
|
|
|
let data = cfgTable.placeballData[xGame.common.placeBallCurLevel];
|
|
|
this.ui.c1.selectedIndex = 1 + data.type;
|
|
|
this.ui.alpha = 1;
|
|
@@ -11657,6 +11729,7 @@
|
|
|
xGame.common.d2World.d2Gan.rotateSelf(yy, true);
|
|
|
let h = ruler1.height;
|
|
|
this.checkGuide();
|
|
|
+ this.checkGuideForLxms();
|
|
|
this.isMoveRod = true;
|
|
|
if (ruler1.y >= h) {
|
|
|
ruler1.y = -h;
|
|
@@ -11711,6 +11784,7 @@
|
|
|
xGame.common.d2World.d2Gan.shoot();
|
|
|
xGame.common.d2World.d2HelpLine.shoot();
|
|
|
this.finishGuide();
|
|
|
+ this.finishGuideForLxms();
|
|
|
this.ui.powerEft.visible = false;
|
|
|
this.ui.colorNode.visible = false;
|
|
|
let ganStr = "";
|
|
@@ -11768,6 +11842,14 @@
|
|
|
xGame.common.gameUI.ui.guide3.visible = true;
|
|
|
}
|
|
|
}
|
|
|
+ checkGuideForLxms() {
|
|
|
+ let guide = DataMgr.getLianXiGuide();
|
|
|
+ if (guide == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 2) {
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd3.visible = true;
|
|
|
+ xGame.common.guideStepForLianXi = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
finishGuide() {
|
|
|
let guide = DataMgr.getSkillGuide();
|
|
|
if (guide == 0 && xGame.common.gameMode == GameMode.bigMove) {
|
|
@@ -11777,11 +11859,26 @@
|
|
|
JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
|
|
|
}
|
|
|
}
|
|
|
+ finishGuideForLxms() {
|
|
|
+ let guide = DataMgr.getLianXiGuide();
|
|
|
+ if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
|
|
|
+ xGame.common.guideStepForLianXi = 3;
|
|
|
+ DataMgr.setLianXiGuide(1);
|
|
|
+ this.closeAllGuideForLxms();
|
|
|
+ console.log('zh: lxms新手引导完毕');
|
|
|
+ JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
|
|
|
+ }
|
|
|
+ }
|
|
|
closeAllGuide() {
|
|
|
xGame.common.gameUI.ui.guide1.visible = false;
|
|
|
xGame.common.gameUI.ui.guide2.visible = false;
|
|
|
xGame.common.gameUI.ui.guide3.visible = false;
|
|
|
}
|
|
|
+ closeAllGuideForLxms() {
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd3.visible = false;
|
|
|
+ }
|
|
|
updateBarInfo() {
|
|
|
let star = this.ui.powerNode.y;
|
|
|
let rate = (this.barInfo.curY - star) / this.barInfo.height;
|
|
@@ -12557,6 +12654,7 @@
|
|
|
this.longHelpLine = false;
|
|
|
this.maxShareDiamondTimes = 3;
|
|
|
this.guideStep = 0;
|
|
|
+ this.guideStepForLianXi = 0;
|
|
|
this.temSelfLevel = 0;
|
|
|
this.extraMoveNum = 0;
|
|
|
this.curRankID = 0;
|
|
@@ -16063,6 +16161,52 @@
|
|
|
}
|
|
|
ui_Component119.URL = "ui://isxx5ak7u8eiv4i3";
|
|
|
|
|
|
+ class ui_Component_yd1 extends fgui.GComponent {
|
|
|
+ static createInstance() {
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component_yd1"));
|
|
|
+ }
|
|
|
+ onConstruct() {
|
|
|
+ this.n83 = (this.getChild("n83"));
|
|
|
+ this.fingerNode = (this.getChild("fingerNode"));
|
|
|
+ this.n84 = (this.getChild("n84"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ui_Component_yd1.URL = "ui://isxx5ak7uc2qv5b3";
|
|
|
+
|
|
|
+ class ui_Component_yd2 extends fgui.GComponent {
|
|
|
+ static createInstance() {
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component_yd2"));
|
|
|
+ }
|
|
|
+ onConstruct() {
|
|
|
+ this.n85 = (this.getChild("n85"));
|
|
|
+ this.n86 = (this.getChild("n86"));
|
|
|
+ this.n77 = (this.getChild("n77"));
|
|
|
+ this.n79 = (this.getChild("n79"));
|
|
|
+ this.n80 = (this.getChild("n80"));
|
|
|
+ this.n81 = (this.getChild("n81"));
|
|
|
+ this.n82 = (this.getChild("n82"));
|
|
|
+ this.n84 = (this.getChild("n84"));
|
|
|
+ this.n87 = (this.getChild("n87"));
|
|
|
+ this.t0 = this.getTransition("t0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ui_Component_yd2.URL = "ui://isxx5ak7uc2qv5b5";
|
|
|
+
|
|
|
+ class ui_Component_yd3 extends fgui.GComponent {
|
|
|
+ static createInstance() {
|
|
|
+ return (fgui.UIPackage.createObject("game", "Component_yd3"));
|
|
|
+ }
|
|
|
+ onConstruct() {
|
|
|
+ this.n87 = (this.getChild("n87"));
|
|
|
+ this.n88 = (this.getChild("n88"));
|
|
|
+ this.n84 = (this.getChild("n84"));
|
|
|
+ this.n85 = (this.getChild("n85"));
|
|
|
+ this.n86 = (this.getChild("n86"));
|
|
|
+ this.t0 = this.getTransition("t0");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ui_Component_yd3.URL = "ui://isxx5ak7uc2qv5b6";
|
|
|
+
|
|
|
class ui_daoJuDisplay extends fgui.GComponent {
|
|
|
static createInstance() {
|
|
|
return (fgui.UIPackage.createObject("game", "daoJuDisplay"));
|
|
@@ -17049,6 +17193,9 @@
|
|
|
fgui.UIObjectFactory.setExtension(ui_againBtn.URL, ui_againBtn);
|
|
|
fgui.UIObjectFactory.setExtension(ui_Component118.URL, ui_Component118);
|
|
|
fgui.UIObjectFactory.setExtension(ui_Component119.URL, ui_Component119);
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component_yd1.URL, ui_Component_yd1);
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component_yd2.URL, ui_Component_yd2);
|
|
|
+ fgui.UIObjectFactory.setExtension(ui_Component_yd3.URL, ui_Component_yd3);
|
|
|
fgui.UIObjectFactory.setExtension(ui_daoJuDisplay.URL, ui_daoJuDisplay);
|
|
|
fgui.UIObjectFactory.setExtension(ui_Component132_1.URL, ui_Component132_1);
|
|
|
fgui.UIObjectFactory.setExtension(ui_Component_lc_challenge1.URL, ui_Component_lc_challenge1);
|
|
@@ -20769,8 +20916,27 @@
|
|
|
this.updateHead();
|
|
|
let curUse = DataMgr.getCurBallRod();
|
|
|
this.getGanZiImg();
|
|
|
+ this.yinDaoForLianxi();
|
|
|
this.setGlobalFont(this.ui);
|
|
|
}
|
|
|
+ yinDaoForLianxi() {
|
|
|
+ let g = DataMgr.getSkillGuide();
|
|
|
+ if (g === 0) {
|
|
|
+ console.log('zh:默认的引导还没有完毕');
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ let lianXiGuide = DataMgr.getLianXiGuide();
|
|
|
+ console.log('zh:lianXiGuide=', lianXiGuide);
|
|
|
+ if (lianXiGuide === 0) {
|
|
|
+ this.ui.n_lxms_yd1.visible = true;
|
|
|
+ console.log('zh:yinDaoForLianxi 111 set ok');
|
|
|
+ }
|
|
|
+ else {
|
|
|
+ this.ui.n_lxms_yd1.visible = false;
|
|
|
+ console.log('zh:无需引导11');
|
|
|
+ }
|
|
|
+ DataMgr.setLianXiGuide(0);
|
|
|
+ }
|
|
|
updateSelf() {
|
|
|
if (xGame.common.gameMode == GameMode.classic) {
|
|
|
this.ui.c1.selectedIndex = 0;
|
|
@@ -20790,6 +20956,7 @@
|
|
|
xGame.common.bigMoveLevelIndex = rand;
|
|
|
}
|
|
|
else if (xGame.common.gameMode == GameMode.placeBall) {
|
|
|
+ console.log('zh:练习模式...');
|
|
|
let data = cfgTable.placeballData[xGame.common.placeBallCurLevel];
|
|
|
this.ui.c1.selectedIndex = 1 + data.type;
|
|
|
this.ui.alpha = 1;
|
|
@@ -21030,6 +21197,7 @@
|
|
|
xGame.common.d2World.d2Gan.rotateSelf(yy, true);
|
|
|
let h = ruler1.height;
|
|
|
this.checkGuide();
|
|
|
+ this.checkGuideForLxms();
|
|
|
this.isMoveRod = true;
|
|
|
if (ruler1.y >= h) {
|
|
|
ruler1.y = -h;
|
|
@@ -21084,6 +21252,7 @@
|
|
|
xGame.common.d2World.d2Gan.shoot();
|
|
|
xGame.common.d2World.d2HelpLine.shoot();
|
|
|
this.finishGuide();
|
|
|
+ this.finishGuideForLxms();
|
|
|
this.ui.powerEft.visible = false;
|
|
|
this.ui.colorNode.visible = false;
|
|
|
let ganStr = "";
|
|
@@ -21141,6 +21310,14 @@
|
|
|
xGame.common.gameUI.ui.guide3.visible = true;
|
|
|
}
|
|
|
}
|
|
|
+ checkGuideForLxms() {
|
|
|
+ let guide = DataMgr.getLianXiGuide();
|
|
|
+ if (guide == 0 && xGame.common.gameMode == GameMode.placeBall && xGame.common.guideStepForLianXi == 2) {
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd3.visible = true;
|
|
|
+ xGame.common.guideStepForLianXi = 3;
|
|
|
+ }
|
|
|
+ }
|
|
|
finishGuide() {
|
|
|
let guide = DataMgr.getSkillGuide();
|
|
|
if (guide == 0 && xGame.common.gameMode == GameMode.bigMove) {
|
|
@@ -21150,11 +21327,26 @@
|
|
|
JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
|
|
|
}
|
|
|
}
|
|
|
+ finishGuideForLxms() {
|
|
|
+ let guide = DataMgr.getLianXiGuide();
|
|
|
+ if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
|
|
|
+ xGame.common.guideStepForLianXi = 3;
|
|
|
+ DataMgr.setLianXiGuide(1);
|
|
|
+ this.closeAllGuideForLxms();
|
|
|
+ console.log('zh: lxms新手引导完毕');
|
|
|
+ JSBridgeUtils.instance.logEventForAdNoParams("tutorial_complete");
|
|
|
+ }
|
|
|
+ }
|
|
|
closeAllGuide() {
|
|
|
xGame.common.gameUI.ui.guide1.visible = false;
|
|
|
xGame.common.gameUI.ui.guide2.visible = false;
|
|
|
xGame.common.gameUI.ui.guide3.visible = false;
|
|
|
}
|
|
|
+ closeAllGuideForLxms() {
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd1.visible = false;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd2.visible = false;
|
|
|
+ xGame.common.gameUI.ui.n_lxms_yd3.visible = false;
|
|
|
+ }
|
|
|
updateBarInfo() {
|
|
|
let star = this.ui.powerNode.y;
|
|
|
let rate = (this.barInfo.curY - star) / this.barInfo.height;
|
|
@@ -22168,7 +22360,6 @@
|
|
|
this.ui.myNode.n_yd_3.visible = false;
|
|
|
console.log('zh:无需引导33');
|
|
|
}
|
|
|
- DataMgr.setLianXiGuide(0);
|
|
|
}
|
|
|
showPreView() {
|
|
|
let item;
|
|
@@ -22251,7 +22442,14 @@
|
|
|
console.log('zh:eeeee');
|
|
|
}
|
|
|
else {
|
|
|
- console.log('zh:powerEnough 不足 =' + DataMgr.powerEnough());
|
|
|
+ let guide = DataMgr.getLianXiGuide();
|
|
|
+ if (guide == 0 && xGame.common.gameMode == GameMode.placeBall) {
|
|
|
+ console.log('zh:自动添加2点体力,以便于完成练习引导模式');
|
|
|
+ DataMgr.setPower(2);
|
|
|
+ }
|
|
|
+ console.log('zh:guide = ' + guide);
|
|
|
+ console.log('zh:xGame.common.gameMode = ' + xGame.common.gameMode);
|
|
|
+ console.log('zh:powerEnough不足=' + DataMgr.powerEnough());
|
|
|
xGame.uiMgr.Show(UIPower$1);
|
|
|
}
|
|
|
}
|