// Learn TypeScript: // - https://docs.cocos.com/creator/manual/en/scripting/typescript.html // Learn Attribute: // - https://docs.cocos.com/creator/manual/en/scripting/reference/attributes.html // Learn life-cycle callbacks: // - https://docs.cocos.com/creator/manual/en/scripting/life-cycle-callbacks.html import GuideMng from "../manager/GuideMng"; import { PlayerPrefs } from "../tools/MyExtends"; const { ccclass, property } = cc._decorator; @ccclass export default class PanelAnim extends cc.Component { @property(cc.Integer) panelType: Number = 0; //1 五福界面 2 探索 3 钱庄 4 日常任务 5 登录豪礼 6 转盘 onEnable() { this.node.scale = 0; //1 cc.tween(this.node).to(0.3, { scale: 1 }, { easing: "backOut" }) .call(() => { if (this.panelType == 1) { //五福引导 if (GuideMng.Ins.CurGuideId == 1 && PlayerPrefs.GetInt("GGuide1", 0) != 1) { GuideMng.Ins.ResumeGuide(); } else { if (GuideMng.Ins.CurGuideId == 12 && PlayerPrefs.GetInt("GGuide12", 0) != 1) { //五福合成引导 GuideMng.Ins.ResumeGuide(); } } } else if (this.panelType == 2) { // if (PlayerPrefs.GetInt("GGuide5", 0) != 1) { // //探索 投资引导 // GuideMng.Ins.ResumeGuide(); // } } else if (this.panelType == 3) { if (GuideMng.Ins.CurGuideId == 7 && PlayerPrefs.GetInt("GGuide7", 0) != 1) { //钱庄引导 GuideMng.Ins.ResumeGuide(); } } else if (this.panelType == 4) { // if (PlayerPrefs.GetInt("GGuide8", 0) != 1) { // //日常任务引导 // GuideMng.Ins.ResumeGuide(); // } } else if (this.panelType == 5) { if (GuideMng.Ins.CurGuideId == 16 && PlayerPrefs.GetInt("GGuide16", 0) != 1) { //登录豪礼引导 GuideMng.Ins.ResumeGuide(); } }else{ } if (GuideMng.Ins.CurGuideId == 15) { if (PlayerPrefs.GetInt("GGuide15", 0) != 1) { //转盘引导 GuideMng.Ins.ResumeGuide(); } } }) .start(); //2 //this.node.runAction(cc.scaleTo(0.3, 1).easing(cc.easeBackOut())); } }