咸鱼的反击
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
xianyudefanji/assets/Scripts/JuQingTips/JuQingTipNode.ts

73 lines
3.0 KiB

import User from "../../FrameWork/User/User";
import AppPlatform from "../../FrameWork/Util/AppPlatform";
import Common5 from "../../Platform/th/Common5";
import TaskManager from "../JuQingChat/TaskManager";
import PrefabManage, { GameType } from "../PrefabManager/PrefabManage";
import JuQingTipView from "./JuQingTipView";
const { ccclass, property } = cc._decorator;
let AllJuQingTipConfig = [
"",//1.引导剧情
"1.选择2\n2.选择2,然后拖动钱给龙哥\n3.选择2",//2.家中二次觉醒
"1.点击左边墙上的报纸\n2.点击床上的照片\n3.点击抽屉的古钱币\n4.擦拭墙上的牌匾",//3.去洛家接夕颜
"1.选择会的\n2.都不选---点击打开抽屉,点击项链",//4.协助守夜人
"1.鲜花或包包\n2.帮苏瑶按摩或带苏瑶去医院\n3.都不选---点击任意地方,点击抽屉,点击玩偶礼物",//5.男生换装
"1.选择2\n2.选择1\n3.选择3",//6.开门
"1.点击书架上层文件\n2.点击笔记本\n3.拉开抽屉---出现录音笔点击录音笔\n4.点击书柜里的档案--出现档案\n5.拖动抽屉的锤子到书架上的奖杯,出现账本,点击打开账本",//7.查看废弃基地
"1.选择不接受\n2.选择反击\n3.都不选,点击其他任意地方",//8.前往异能研究所
"1.拖钱到床\n2.拖钱到右边电视机柜\n3.拖钱到墙或地板\n4.拖钱到窗户\n5.拖钱到左边柜子\n6.拖钱到顶上的灯\n7.拖三次钱到苏瑶",//9.进异能所进行接受
"1.选择直接打脸",//10.融合五色石
"1.左右都可以\n2.左右都可以\n3.点击对话按钮",//11.引导剧情
]
@ccclass
export default class JuQingTipNode extends cc.Component {
@property(cc.Node)
tipBtn: cc.Node = null;
@property(cc.Node)
tipADBtn: cc.Node = null;
@property({
displayName: '提示索引'
})
tipIndex: number = 0;
// LIFE-CYCLE CALLBACKS:
// onLoad () {}
start() {
}
juQingTipBtnClick() {
this.showTipView()
}
juQingTipADBtnClick() {
let tab = {
onClose: (finish) => {
if (finish) {
User.setShowAdNum(User.getShowAdNum() + 1)
Common5.ReportDY("inLevel", `任务${TaskManager.getCurUnLockMainTaskId()}-AD-剧情关卡提示`)
// Common5.ReportDY("inLevel", '剧情关卡' + this.tipIndex + '-AD-提示');
this.tipADBtn.active = false
this.tipBtn.active = true
this.showTipView()
}
else {
Common5.showTips_custom("广告未观看完");
}
}, onFailed: () => {
}
}
AppPlatform.playVideo_custom(tab)
}
showTipView() {
PrefabManage.loadPrefabByType(GameType.JuQingTipView, null, (prefabNode) => {
prefabNode.zIndex = 2
prefabNode.getComponent(JuQingTipView).initView(AllJuQingTipConfig[this.tipIndex])
})
}
// update (dt) {}
}