Commit de939ebd authored by haiyoucuv's avatar haiyoucuv

1

parents a55f58f5 45a79e11
This diff is collapsed.
...@@ -708,7 +708,7 @@ ...@@ -708,7 +708,7 @@
] ]
}, },
{ {
"name": "NoStepBtn", "name": "NoStepPanel",
"x": 0, "x": 0,
"y": 0, "y": 0,
"type": "container", "type": "container",
......
...@@ -12,6 +12,7 @@ import { MapScene } from "./scene/map/MapScene"; ...@@ -12,6 +12,7 @@ import { MapScene } from "./scene/map/MapScene";
import { PlayScene } from "./scene/PlayScene"; import { PlayScene } from "./scene/PlayScene";
import { LoadingScene } from "./scene/LoadingScene"; import { LoadingScene } from "./scene/LoadingScene";
import { JoinPanel } from "./panels/JoinPanel"; import { JoinPanel } from "./panels/JoinPanel";
import { NoStepPanel } from "./panels/NoStepPanel";
/** /**
* 全局事件,为了和小程序交互 * 全局事件,为了和小程序交互
...@@ -86,7 +87,7 @@ export class Main { ...@@ -86,7 +87,7 @@ export class Main {
// changeScene(StoryScene); // changeScene(StoryScene);
// changeScene(AdoptScene); // changeScene(AdoptScene);
// console.log("恶趣味去") // console.log("恶趣味去")
// showPanel(JoinPanel) // showPanel(NoStepPanel)
//测试 //测试
// sendTbNet(TbNetName.aaa, {}, (s, res) => { // sendTbNet(TbNetName.aaa, {}, (s, res) => {
// console.log(res) // console.log(res)
......
This diff is collapsed.
...@@ -10,6 +10,7 @@ import { showPanel } from "../module/ctrls"; ...@@ -10,6 +10,7 @@ import { showPanel } from "../module/ctrls";
import { FailedPanel } from "./panels/FailedPanel"; import { FailedPanel } from "./panels/FailedPanel";
import { SuccessPrizePanel } from "./panels/SuccessPrizePanel"; import { SuccessPrizePanel } from "./panels/SuccessPrizePanel";
import { SuccessNoPrizePanel } from "./panels/SuccessNoPrizePanel"; import { SuccessNoPrizePanel } from "./panels/SuccessNoPrizePanel";
import { CreditsOutPanel } from "./panels/CreditsOutPanel";
/** /**
* 定制,记录一些全局量和方法 * 定制,记录一些全局量和方法
...@@ -145,13 +146,19 @@ export class Tools { ...@@ -145,13 +146,19 @@ export class Tools {
if (creditsData && !creditsData.success && !creditsData.data.isvip) { if (creditsData && !creditsData.success && !creditsData.data.isvip) {
return creditsData.data.url return creditsData.data.url
} }
const res = await sendTbNet(TbNetName.exchange, {type, credits: creditsData.data.credits}) const res = await sendTbNet(TbNetName.exchange, { type, credits: creditsData.data.credits }, null, true)
if (res.success) { if (res.success) {
//修改道具数量和体力 //修改道具数量和体力
this.gameData.power = res.data.power; this.gameData.power = res.data.power;
this.gameData.tools = res.data.tools; this.gameData.tools = res.data.tools;
return true;//可根据gameData修改视图 return true;//可根据gameData修改视图
} else { } else {
//如果code积分不足,弹出赚积分弹窗 待写code TODO
if (res.code == "") {
showPanel(CreditsOutPanel)
} else {
showToast(res.message || "网络开小差了,请重试")
}
return false; return false;
} }
} }
......
import { Panel } from "../../module/views/Panel"; import { Panel } from "../../module/views/Panel";
import { sendTbNet, TbNetName } from "../TaoBaoNet";
import { Tools } from "../Tools";
export class CreditsOutPanel extends Panel { export class CreditsOutPanel extends Panel {
get groupNames() { return ["CreditsOutPanel"] } get groupNames() { return ["CreditsOutPanel"] }
get skinName() { return "CreditsOutPanel" } get skinName() { return "CreditsOutPanel" }
earnBtn:FYGE.Button; earnBtn: FYGE.Button;
closeBtn:FYGE.Button; closeBtn: FYGE.Button;
initUi() { initUi() {
} }
start(data) { start(data) {
super.start(); super.start();
} }
initEvents() { initEvents() {
super.initEvents(); super.initEvents();
this.earnBtn.addEventListener(FYGE.MouseEvent.CLICK, () => {
Tools.btnDelay(this);
sendTbNet(TbNetName.navigateToOutside, { url: "" })//TODO 路径待写
}, this)
} }
removeEvents() { removeEvents() {
super.removeEvents(); super.removeEvents();
} }
} }
...@@ -5,16 +5,7 @@ export class ExchangeSucPanel extends Panel { ...@@ -5,16 +5,7 @@ export class ExchangeSucPanel extends Panel {
knowBtn:FYGE.Button; knowBtn:FYGE.Button;
closeBtn:FYGE.Button; closeBtn:FYGE.Button;
initUi() { get closeBtns(){
return [this.knowBtn,this.closeBtn]
}
start(data) {
super.start();
}
initEvents() {
super.initEvents();
}
removeEvents() {
super.removeEvents();
} }
} }
import { Panel } from "../../module/views/Panel";
import { Tools } from "../Tools";
import { getCurrentScene, showPanel } from "../../module/ctrls";
import { ToolsOutPanel } from "./ToolsOutPanel";
import { PropType } from "../something/enum/PropType";
export class NoStepPanel extends Panel {
get groupNames() { return ["NoStepPanel"] }
get skinName() { return "NoStepPanel" }
overBtn: FYGE.Button;
liveBtn: FYGE.Button;
closeBtn: FYGE.Button;
tipsTex: FYGE.TextField;
data: {
reviveFun: () => void
}
initUi() {
Tools.changeTextAlign(this.tipsTex, FYGE.TEXT_ALIGN.CENTER, 500)
this.tipsTex.text = "是否使用步数道具\n增加5次步数"
}
initEvents() {
//结束
[this.closeBtn, this.overBtn].forEach((e) => {
e.addEventListener(FYGE.MouseEvent.CLICK, () => {
getCurrentScene().submit(false);
this.hidePanel();
}, this)
})
//复活
this.liveBtn.addEventListener(FYGE.MouseEvent.CLICK, () => {
//无步数道具,弹出积分兑换
if (!Tools.gameData.tools.STEPS) {
showPanel(ToolsOutPanel, { type: PropType.STEPS, showSucPanel: false })
} else {
this.data.reviveFun();
this.hidePanel();
}
}, this)
}
removeEvents() {
}
}
...@@ -4,6 +4,7 @@ import { getTbData, TbNetName } from "../TaoBaoNet"; ...@@ -4,6 +4,7 @@ import { getTbData, TbNetName } from "../TaoBaoNet";
import { Tools } from "../Tools"; import { Tools } from "../Tools";
import { showWaiting, hideWaiting, getCurrentScene, showPanel, showToast } from "../../module/ctrls"; import { showWaiting, hideWaiting, getCurrentScene, showPanel, showToast } from "../../module/ctrls";
import { JoinPanel } from "./JoinPanel"; import { JoinPanel } from "./JoinPanel";
import { ExchangeSucPanel } from "./ExchangeSucPanel";
export class ToolsOutPanel extends Panel { export class ToolsOutPanel extends Panel {
get groupNames() { get groupNames() {
...@@ -22,7 +23,7 @@ export class ToolsOutPanel extends Panel { ...@@ -22,7 +23,7 @@ export class ToolsOutPanel extends Panel {
closeBtn: FYGE.Button; closeBtn: FYGE.Button;
msgTxt: FYGE.TextField; msgTxt: FYGE.TextField;
data: { type: PropType } data: { type: PropType, showSucPanel: boolean }
initUi() { initUi() {
// 文案居中 // 文案居中
...@@ -51,7 +52,8 @@ export class ToolsOutPanel extends Panel { ...@@ -51,7 +52,8 @@ export class ToolsOutPanel extends Panel {
} }
//成功了,关闭弹框,修改道具信息 //成功了,关闭弹框,修改道具信息
else if (res) { else if (res) {
showToast("兑换成功") // showToast("兑换成功")
if (this.data.showSucPanel) showPanel(ExchangeSucPanel)
this.hidePanel(); this.hidePanel();
getCurrentScene().updateScene() getCurrentScene().updateScene()
} }
......
This diff is collapsed.
...@@ -324,10 +324,14 @@ export class Element extends FYGE.Container { ...@@ -324,10 +324,14 @@ export class Element extends FYGE.Container {
} }
public fallAni() { public fallAni() {
// egret.Tween.get(this, null, null, true) // FYGE.Tween.get(this, null, null, true)
// .set({ scaleY: 1 }) // .set({ scaleY: 1 })
// .to({ scaleY: 0.7 }, 200) // .to({ scaleY: 0.7 }, 200)
// .to({ scaleY: 1 }, 100) // .to({ scaleY: 1 }, 100)
let oriY = this.y;
FYGE.Tween.get(this, null, null, true)
.to({ y: oriY+4 }, 100)
.to({y: oriY }, 100)
} }
/** /**
......
...@@ -66,6 +66,10 @@ export class GameGuide extends FYGE.Container { ...@@ -66,6 +66,10 @@ export class GameGuide extends FYGE.Container {
if (this.thisObj.chapter == 101 && step == 0) { if (this.thisObj.chapter == 101 && step == 0) {
this.msgBoard.y += 80; this.msgBoard.y += 80;
} }
//定制修改,9关组合特效修改
if (this.thisObj.chapter == 9) {
this.msgBoard.y -= 80;
}
this.stepCount--; this.stepCount--;
} }
...@@ -249,10 +253,8 @@ const chapterFuns = { ...@@ -249,10 +253,8 @@ const chapterFuns = {
handIndexs: [ handIndexs: [
[63, 72], [63, 72],
], ],
msg: [ msg: [//"将两个特效互相拖动即可直接触发组合特效,\n组合特效的效果视组合的两个特效类型而定"
"将两个特效互相拖动即可直接触发组合特效,\n组合特效的效果视组合的两个特效类型而定" "两个特效互相拖动即可触发组合特效,组合特效的效果视两个特效类型而定"//缩短了
// "五个相同动物形成一字型即可合成魔力花特效",
// "拖动魔力花特效即可直接触发"
] ]
}, },
//魔力鸟特效 //魔力鸟特效
......
import { RES } from "../../../module/RES";
export class GameToast extends FYGE.Sprite {
constructor(resName: string) {
super(RES.getRes(resName));
this.anchorTexture.set(0.5, 0.5);
}
/**
*
* @param a 为了和lottie封的方法一致
* @param callback
*/
play(a, callback: Function) {
FYGE.Tween.removeTweens(this)
this.scaleX = 0.1;
this.scaleY = 0.1;
FYGE.Tween.get(this)
.to({ scaleX: 1, scaleY: 1 }, 1/3*1000, FYGE.Ease.backOut)
.wait(1/3*1000)
.call(() => {
callback();
})
}
}
\ No newline at end of file
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