Commit 5c8d15ba by 张树文

清理gamemodelmanager不用的方法逻辑

1 parent fbb4427c
Showing with 36 additions and 194 deletions
...@@ -155,7 +155,6 @@ export class DatingEventSubpresenter extends Subpresenter<DatingEventSubview> { ...@@ -155,7 +155,6 @@ export class DatingEventSubpresenter extends Subpresenter<DatingEventSubview> {
onLeftButtonClickCallback: this.onLeftButtonClickCallback, onLeftButtonClickCallback: this.onLeftButtonClickCallback,
onRightButtonClickCallback: this.onRightButtonClickCallback, onRightButtonClickCallback: this.onRightButtonClickCallback,
onNameButtonClickCallback: this.onNameButtonClickCallback, onNameButtonClickCallback: this.onNameButtonClickCallback,
onExtraPlotButtonClickCallback: this.onExtraPlotButtonClickCallback,
onCloseSectionViewCallBack: this.onCloseSectionViewCallBack onCloseSectionViewCallBack: this.onCloseSectionViewCallBack
}); });
} }
...@@ -337,11 +336,7 @@ export class DatingEventSubpresenter extends Subpresenter<DatingEventSubview> { ...@@ -337,11 +336,7 @@ export class DatingEventSubpresenter extends Subpresenter<DatingEventSubview> {
this._disposable.add(GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus)); this._disposable.add(GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus));
this._disposable.add(GameModelManager.CloseDatingSceneView.on(this.onCloseDatingSceneView)); this._disposable.add(GameModelManager.CloseDatingSceneView.on(this.onCloseDatingSceneView));
this._disposable.add(GameModelManager.CloseExtraSceneView.on(this.onCloseExtraSceneView)); this._disposable.add(GameModelManager.CloseExtraSceneView.on(this.onCloseExtraSceneView));
this._disposable.add(GameModelManager.OpenExtraPlotView.on(this.onExtraPlotButtonClickCallback));
// let isNeedEnterCurChapter = GameModelManager.checkIsNeedEnterCurDateChapter();
// if (isNeedEnterCurChapter) {
// this.selectCurChapter();
// }
this.selectCurChapter(); this.selectCurChapter();
if (!this.view.isHidden) { if (!this.view.isHidden) {
this.refreshMaxChapterIndex(); this.refreshMaxChapterIndex();
...@@ -652,8 +647,4 @@ export class DatingEventSubpresenter extends Subpresenter<DatingEventSubview> { ...@@ -652,8 +647,4 @@ export class DatingEventSubpresenter extends Subpresenter<DatingEventSubview> {
}) })
.start(); .start();
} }
onExtraPlotButtonClickCallback = () => {
UIManager.pushPresenter(ExtraPlotViewPresenter, undefined);
}
} }
\ No newline at end of file
...@@ -118,7 +118,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin ...@@ -118,7 +118,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
if (bgPath) bgPath = "textures/background/dating_event/" + bgPath; if (bgPath) bgPath = "textures/background/dating_event/" + bgPath;
return this.view.setBackgroundEffect(bgPath); return this.view.setBackgroundEffect(bgPath);
})); }));
this._disposable.add(GameModelManager.RollBackToPlot.on(this.onClickRollBackBtn));
this._showScrollView = false; this._showScrollView = false;
this._disposable.add(GameModelManager.DeadEvent.on(this.onDeadEvent)); this._disposable.add(GameModelManager.DeadEvent.on(this.onDeadEvent));
this._disposable.add(GameModelManager.SpecialToast.on(this.onSpecialToast)); this._disposable.add(GameModelManager.SpecialToast.on(this.onSpecialToast));
...@@ -339,40 +338,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin ...@@ -339,40 +338,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
return portrait; return portrait;
} }
onClickRollBackBtn = (pid: number) => {
CDKeyEventManager.getInstance().shiftCDKeyRemovePlotAD();
let removeAdCardNum: number = CDKeyEventManager.getInstance().checkCDKeyRemovePlotAD();
let temp: AlertDialogViewProps =
{
dataptr: {},
titlecontent: "此功能不可逆",
content: "使用传送门会清掉此章节到已解锁最新章节之间的剧情存档和剧情内产生的数值,<color=red>且不可逆</color>,确定使用传送门吗?",
ishasad: !(removeAdCardNum > 0),
istwobtn: true,
adconfig: "inject_fruit",
hasBanner: false,
callback: async (type, ret) => {
if (ret) {
let retainVar = this.getRetainVarKeyArr();
await PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
GameRecord.saveRecord();
this._showScrollView = !this._showScrollView;
this.view.closeView();
await GameModelManager.init((value: number) => {
});
GameModelManager.setIsChangePlotSceneType(true);
UIManager.showSceneToast("数据刷新完成");
let isSpecialScene: boolean = this._model.id === this._specialDealSceneId;
this._showBackBtn = !(isSpecialScene && this._model.status === DatingEventStatus.InProgress);
this.view.showBackBtn(this._showBackBtn);
GameModelManager.RefreshAllStatus.emit();
}
}
};
UIManager.pushPresenter(AlertDialogViewPresenter, temp);
}
getRetainVarKeyArr(): string[] { getRetainVarKeyArr(): string[] {
let keyArr: string[] = []; let keyArr: string[] = [];
let branches = GameModelManager.getAllStartedBranches(); let branches = GameModelManager.getAllStartedBranches();
......
...@@ -125,11 +125,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> { ...@@ -125,11 +125,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> {
} }
} }
onRefreshDiscoveryRedDot = () => {
this._viewProps.discoverRedDot = !GameModelManager.checkResumeFullEnergyMarked();
this.view.setProps(this._viewProps);
}
async start() { // 开始游戏 async start() { // 开始游戏
this._subPresenters[0] = await createPresenter(TabPresenterFactory[0]); this._subPresenters[0] = await createPresenter(TabPresenterFactory[0]);
MainViewPresenter.tabIndex = 0; MainViewPresenter.tabIndex = 0;
...@@ -138,7 +133,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> { ...@@ -138,7 +133,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> {
this.dealTabGuide(MainTabs.messageTab); this.dealTabGuide(MainTabs.messageTab);
this._viewProps.selectedTab = MainTabs.messageTab; this._viewProps.selectedTab = MainTabs.messageTab;
this._disposable.add(GameModelManager.RefreshDiscoverTabRed.on(this.onRefreshDiscoveryRedDot));
this._disposable.add(GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked)); this._disposable.add(GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked));
this._disposable.add(GameModelManager.AutoPopView.on(this.onAutoPopView)); this._disposable.add(GameModelManager.AutoPopView.on(this.onAutoPopView));
this._disposable.add(GameModelManager.UnlockItem.on(this.onUnlockItem)); this._disposable.add(GameModelManager.UnlockItem.on(this.onUnlockItem));
......
...@@ -57,8 +57,6 @@ export default class NewNoticeViewPresenter extends Presenter<SourceView, NewNot ...@@ -57,8 +57,6 @@ export default class NewNoticeViewPresenter extends Presenter<SourceView, NewNot
initView() { initView() {
//重置可关闭状态为false //重置可关闭状态为false
this._canClose = false; this._canClose = false;
//根据是否是第一次弹起紧急公告判断延迟时间
//this._delayTime = GameModelManager.getNoticeReaded() ? 0 : 3;
this._delayTime = 0; this._delayTime = 0;
//重置提示文本状态 //重置提示文本状态
this.view.getCloseTipsLabel().string = ""; this.view.getCloseTipsLabel().string = "";
...@@ -262,7 +260,6 @@ export default class NewNoticeViewPresenter extends Presenter<SourceView, NewNot ...@@ -262,7 +260,6 @@ export default class NewNoticeViewPresenter extends Presenter<SourceView, NewNot
onCloseButtonClickCalback = () => { onCloseButtonClickCalback = () => {
if (this._canClose) { if (this._canClose) {
this.checkTipsToggleState(); this.checkTipsToggleState();
GameModelManager.setNoticeReaded(true);
clearTimeout(this._closeTimeTicker); clearTimeout(this._closeTimeTicker);
this.view.close(); this.view.close();
} }
......
...@@ -32,7 +32,6 @@ export interface DatingEventSubviewProps extends ListViewProps<DatingEventItemPr ...@@ -32,7 +32,6 @@ export interface DatingEventSubviewProps extends ListViewProps<DatingEventItemPr
onLeftButtonClickCallback: () => void; onLeftButtonClickCallback: () => void;
onRightButtonClickCallback: () => void; onRightButtonClickCallback: () => void;
onNameButtonClickCallback: () => void; onNameButtonClickCallback: () => void;
onExtraPlotButtonClickCallback: () => void;
onCloseSectionViewCallBack: () => void; onCloseSectionViewCallBack: () => void;
} }
......
...@@ -22,7 +22,6 @@ const GameConstData_1 = require("../../../common/gameplay/gamedata/GameConstData ...@@ -22,7 +22,6 @@ const GameConstData_1 = require("../../../common/gameplay/gamedata/GameConstData
const UIManager_1 = require("../../../common/gameplay/managers/UIManager"); const UIManager_1 = require("../../../common/gameplay/managers/UIManager");
const DateSceneConfig_1 = require("../../../config/DateSceneConfig"); const DateSceneConfig_1 = require("../../../config/DateSceneConfig");
const Enums_1 = require("../../Enums"); const Enums_1 = require("../../Enums");
const CDKeyEventManager_1 = require("../../model/CDKeyEventManager");
const DatingEventSceneModel_1 = require("../../model/DatingEventSceneModel"); const DatingEventSceneModel_1 = require("../../model/DatingEventSceneModel");
const GameModelManager_1 = require("../../model/GameModelManager"); const GameModelManager_1 = require("../../model/GameModelManager");
const PresenterCCViewFactory_1 = require("../PresenterCCViewFactory"); const PresenterCCViewFactory_1 = require("../PresenterCCViewFactory");
...@@ -81,38 +80,6 @@ let DatingScenePresenter = /** @class */ (() => { ...@@ -81,38 +80,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._completingPlot = false; this._completingPlot = false;
this.execPlot(); this.execPlot();
}; };
this.onClickRollBackBtn = (pid) => {
CDKeyEventManager_1.default.getInstance().shiftCDKeyRemovePlotAD();
let removeAdCardNum = CDKeyEventManager_1.default.getInstance().checkCDKeyRemovePlotAD();
let temp = {
dataptr: {},
titlecontent: "此功能不可逆",
content: "使用传送门会清掉此章节到已解锁最新章节之间的剧情存档和剧情内产生的数值,<color=red>且不可逆</color>,确定使用传送门吗?",
ishasad: !(removeAdCardNum > 0),
istwobtn: true,
adconfig: "inject_fruit",
hasBanner: false,
callback: async (type, ret) => {
if (ret) {
let retainVar = this.getRetainVarKeyArr();
await AVG_1.PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
AVG_1.GameRecord.saveRecord();
this._showScrollView = !this._showScrollView;
this.view.closeView();
await GameModelManager_1.GameModelManager.init((value) => {
});
GameModelManager_1.GameModelManager.setIsChangePlotSceneType(true);
UIManager_1.UIManager.showSceneToast("数据刷新完成");
let isSpecialScene = this._model.id === this._specialDealSceneId;
this._showBackBtn = !(isSpecialScene && this._model.status === DatingEventSceneModel_1.DatingEventStatus.InProgress);
this.view.showBackBtn(this._showBackBtn);
GameModelManager_1.GameModelManager.RefreshAllStatus.emit();
}
}
};
UIManager_1.UIManager.pushPresenter(AlertDialogViewPresenter_1.default, temp);
};
this.onDeadEvent = (pid) => { this.onDeadEvent = (pid) => {
if (this._model.status == DatingEventSceneModel_1.DatingEventStatus.Completed) { if (this._model.status == DatingEventSceneModel_1.DatingEventStatus.Completed) {
let temp = { let temp = {
...@@ -257,7 +224,6 @@ let DatingScenePresenter = /** @class */ (() => { ...@@ -257,7 +224,6 @@ let DatingScenePresenter = /** @class */ (() => {
bgPath = "textures/background/dating_event/" + bgPath; bgPath = "textures/background/dating_event/" + bgPath;
return this.view.setBackgroundEffect(bgPath); return this.view.setBackgroundEffect(bgPath);
})); }));
this._disposable.add(GameModelManager_1.GameModelManager.RollBackToPlot.on(this.onClickRollBackBtn));
this._showScrollView = false; this._showScrollView = false;
this._disposable.add(GameModelManager_1.GameModelManager.DeadEvent.on(this.onDeadEvent)); this._disposable.add(GameModelManager_1.GameModelManager.DeadEvent.on(this.onDeadEvent));
this._disposable.add(GameModelManager_1.GameModelManager.SpecialToast.on(this.onSpecialToast)); this._disposable.add(GameModelManager_1.GameModelManager.SpecialToast.on(this.onSpecialToast));
......
...@@ -33,7 +33,6 @@ const DatingEventSubview_1 = require("../view/type/DatingEventSubview"); ...@@ -33,7 +33,6 @@ const DatingEventSubview_1 = require("../view/type/DatingEventSubview");
const DatingEventView_1 = require("../view/type/DatingEventView"); const DatingEventView_1 = require("../view/type/DatingEventView");
const AlertDialogViewPresenter_1 = require("./AlertDialogViewPresenter"); const AlertDialogViewPresenter_1 = require("./AlertDialogViewPresenter");
const DatingScenePresenter_1 = require("./DatingScenePresenter"); const DatingScenePresenter_1 = require("./DatingScenePresenter");
const ExtraPlotViewPresenter_1 = require("./ExtraPlotViewPresenter");
const GuideViewPresenter_1 = require("./GuideViewPresenter"); const GuideViewPresenter_1 = require("./GuideViewPresenter");
let DatingEventViewPresenter = /** @class */ (() => { let DatingEventViewPresenter = /** @class */ (() => {
let DatingEventViewPresenter = class DatingEventViewPresenter extends PresenterBase_1.Presenter { let DatingEventViewPresenter = class DatingEventViewPresenter extends PresenterBase_1.Presenter {
...@@ -296,9 +295,6 @@ let DatingEventSubpresenter = /** @class */ (() => { ...@@ -296,9 +295,6 @@ let DatingEventSubpresenter = /** @class */ (() => {
}) })
.start(); .start();
}; };
this.onExtraPlotButtonClickCallback = () => {
UIManager_1.UIManager.pushPresenter(ExtraPlotViewPresenter_1.default, undefined);
};
} }
sceneModelToViewModel(item, index) { sceneModelToViewModel(item, index) {
this._modelMap[item.id.toString()] = item; this._modelMap[item.id.toString()] = item;
...@@ -378,7 +374,6 @@ let DatingEventSubpresenter = /** @class */ (() => { ...@@ -378,7 +374,6 @@ let DatingEventSubpresenter = /** @class */ (() => {
onLeftButtonClickCallback: this.onLeftButtonClickCallback, onLeftButtonClickCallback: this.onLeftButtonClickCallback,
onRightButtonClickCallback: this.onRightButtonClickCallback, onRightButtonClickCallback: this.onRightButtonClickCallback,
onNameButtonClickCallback: this.onNameButtonClickCallback, onNameButtonClickCallback: this.onNameButtonClickCallback,
onExtraPlotButtonClickCallback: this.onExtraPlotButtonClickCallback,
onCloseSectionViewCallBack: this.onCloseSectionViewCallBack onCloseSectionViewCallBack: this.onCloseSectionViewCallBack
}); });
} }
...@@ -474,11 +469,6 @@ let DatingEventSubpresenter = /** @class */ (() => { ...@@ -474,11 +469,6 @@ let DatingEventSubpresenter = /** @class */ (() => {
this._disposable.add(GameModelManager_1.GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus)); this._disposable.add(GameModelManager_1.GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus));
this._disposable.add(GameModelManager_1.GameModelManager.CloseDatingSceneView.on(this.onCloseDatingSceneView)); this._disposable.add(GameModelManager_1.GameModelManager.CloseDatingSceneView.on(this.onCloseDatingSceneView));
this._disposable.add(GameModelManager_1.GameModelManager.CloseExtraSceneView.on(this.onCloseExtraSceneView)); this._disposable.add(GameModelManager_1.GameModelManager.CloseExtraSceneView.on(this.onCloseExtraSceneView));
this._disposable.add(GameModelManager_1.GameModelManager.OpenExtraPlotView.on(this.onExtraPlotButtonClickCallback));
// let isNeedEnterCurChapter = GameModelManager.checkIsNeedEnterCurDateChapter();
// if (isNeedEnterCurChapter) {
// this.selectCurChapter();
// }
this.selectCurChapter(); this.selectCurChapter();
if (!this.view.isHidden) { if (!this.view.isHidden) {
this.refreshMaxChapterIndex(); this.refreshMaxChapterIndex();
......
...@@ -120,10 +120,6 @@ let MainViewPresenter = /** @class */ (() => { ...@@ -120,10 +120,6 @@ let MainViewPresenter = /** @class */ (() => {
} }
} }
}; };
this.onRefreshDiscoveryRedDot = () => {
this._viewProps.discoverRedDot = !GameModelManager_1.GameModelManager.checkResumeFullEnergyMarked();
this.view.setProps(this._viewProps);
};
this.onMainTabForceClick = (param) => { this.onMainTabForceClick = (param) => {
UIManager_1.UIManager.popToPresenter(this); UIManager_1.UIManager.popToPresenter(this);
let index = param.index; let index = param.index;
...@@ -355,7 +351,6 @@ let MainViewPresenter = /** @class */ (() => { ...@@ -355,7 +351,6 @@ let MainViewPresenter = /** @class */ (() => {
this._subPresenters[0].open(viewContainer, undefined); this._subPresenters[0].open(viewContainer, undefined);
this.dealTabGuide(Enums_1.MainTabs.messageTab); this.dealTabGuide(Enums_1.MainTabs.messageTab);
this._viewProps.selectedTab = Enums_1.MainTabs.messageTab; this._viewProps.selectedTab = Enums_1.MainTabs.messageTab;
this._disposable.add(GameModelManager_1.GameModelManager.RefreshDiscoverTabRed.on(this.onRefreshDiscoveryRedDot));
this._disposable.add(GameModelManager_1.GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked)); this._disposable.add(GameModelManager_1.GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked));
this._disposable.add(GameModelManager_1.GameModelManager.AutoPopView.on(this.onAutoPopView)); this._disposable.add(GameModelManager_1.GameModelManager.AutoPopView.on(this.onAutoPopView));
this._disposable.add(GameModelManager_1.GameModelManager.UnlockItem.on(this.onUnlockItem)); this._disposable.add(GameModelManager_1.GameModelManager.UnlockItem.on(this.onUnlockItem));
......
{"version":3,"sources":["assets/script/game/ui/view/type/DatingEventSubview.ts"],"names":[],"mappings":";;;;;;;AAoDa,QAAA,sBAAsB,GAAG,oBAAoB,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { ListItemProps, ListView, ListViewProps } from \"../../baseview/ListView\";\nimport { PureSubview } from \"../../../../common/classbase/ViewBase\";\nimport { DatingEventStatus } from \"../../../model/DatingEventSceneModel\";\nimport { DatePrefabDirectType, StepType } from \"../../../Enums\";\n\nexport interface DatingEventItemProps extends ListItemProps {\n title: string;\n // date: string;\n // time: string;\n status: DatingEventStatus;\n // lockText?: string;\n coverImage: string;\n portraitImage?: string;\n // lineStyle: \"none\" | 0 | 1;\n // progress: number;\n // showItemClear: boolean;\n // showProgress: boolean;\n // reviewCostNum: number;\n itype: DatePrefabDirectType;\n}\ntype OptionChapter = (stepType: StepType) => void;\nexport interface DatingEventSubviewProps extends ListViewProps<DatingEventItemProps> {\n showContinue: boolean;\n chapterName: string;\n showLeft: boolean;\n showRight: boolean;\n showChapterClear: boolean;\n onOptionChapter: OptionChapter;\n chapterIndex: number;\n onScrollBegin: () => void;\n onScrollEnd: () => void;\n onLeftButtonClickCallback: () => void;\n onRightButtonClickCallback: () => void;\n onNameButtonClickCallback: () => void;\n onExtraPlotButtonClickCallback: () => void;\n onCloseSectionViewCallBack: () => void;\n}\n\nexport interface GetListItemNode {\n getItemNode: (k: string) => cc.Node | undefined;\n // setCurrEventId: (id: number) => void;\n getLeftButton: () => cc.Button;\n getNameButton: () => cc.Button;\n getRightButton: () => cc.Button;\n getScrollViewRoot: () => cc.Node;\n getScrollViewContent: () => cc.Node;\n getSectionBtn: () => cc.Prefab;\n getExtraPlotButton: () => cc.Node;\n}\n\nexport type DatingEventSubview = ListView & PureSubview<DatingEventSubviewProps> & GetListItemNode;\n\nexport const DatingEventSubviewType = \"DatingEventSubview\";"]} {"version":3,"sources":["assets/script/game/ui/view/type/DatingEventSubview.ts"],"names":[],"mappings":";;;;;;;AAmDa,QAAA,sBAAsB,GAAG,oBAAoB,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { ListItemProps, ListView, ListViewProps } from \"../../baseview/ListView\";\nimport { PureSubview } from \"../../../../common/classbase/ViewBase\";\nimport { DatingEventStatus } from \"../../../model/DatingEventSceneModel\";\nimport { DatePrefabDirectType, StepType } from \"../../../Enums\";\n\nexport interface DatingEventItemProps extends ListItemProps {\n title: string;\n // date: string;\n // time: string;\n status: DatingEventStatus;\n // lockText?: string;\n coverImage: string;\n portraitImage?: string;\n // lineStyle: \"none\" | 0 | 1;\n // progress: number;\n // showItemClear: boolean;\n // showProgress: boolean;\n // reviewCostNum: number;\n itype: DatePrefabDirectType;\n}\ntype OptionChapter = (stepType: StepType) => void;\nexport interface DatingEventSubviewProps extends ListViewProps<DatingEventItemProps> {\n showContinue: boolean;\n chapterName: string;\n showLeft: boolean;\n showRight: boolean;\n showChapterClear: boolean;\n onOptionChapter: OptionChapter;\n chapterIndex: number;\n onScrollBegin: () => void;\n onScrollEnd: () => void;\n onLeftButtonClickCallback: () => void;\n onRightButtonClickCallback: () => void;\n onNameButtonClickCallback: () => void;\n onCloseSectionViewCallBack: () => void;\n}\n\nexport interface GetListItemNode {\n getItemNode: (k: string) => cc.Node | undefined;\n // setCurrEventId: (id: number) => void;\n getLeftButton: () => cc.Button;\n getNameButton: () => cc.Button;\n getRightButton: () => cc.Button;\n getScrollViewRoot: () => cc.Node;\n getScrollViewContent: () => cc.Node;\n getSectionBtn: () => cc.Prefab;\n getExtraPlotButton: () => cc.Node;\n}\n\nexport type DatingEventSubview = ListView & PureSubview<DatingEventSubviewProps> & GetListItemNode;\n\nexport const DatingEventSubviewType = \"DatingEventSubview\";"]}
\ No newline at end of file \ No newline at end of file
...@@ -48,7 +48,6 @@ let NewNoticeViewPresenter = /** @class */ (() => { ...@@ -48,7 +48,6 @@ let NewNoticeViewPresenter = /** @class */ (() => {
this.onCloseButtonClickCalback = () => { this.onCloseButtonClickCalback = () => {
if (this._canClose) { if (this._canClose) {
this.checkTipsToggleState(); this.checkTipsToggleState();
GameModelManager_1.GameModelManager.setNoticeReaded(true);
clearTimeout(this._closeTimeTicker); clearTimeout(this._closeTimeTicker);
this.view.close(); this.view.close();
} }
...@@ -81,8 +80,6 @@ let NewNoticeViewPresenter = /** @class */ (() => { ...@@ -81,8 +80,6 @@ let NewNoticeViewPresenter = /** @class */ (() => {
initView() { initView() {
//重置可关闭状态为false //重置可关闭状态为false
this._canClose = false; this._canClose = false;
//根据是否是第一次弹起紧急公告判断延迟时间
//this._delayTime = GameModelManager.getNoticeReaded() ? 0 : 3;
this._delayTime = 0; this._delayTime = 0;
//重置提示文本状态 //重置提示文本状态
this.view.getCloseTipsLabel().string = ""; this.view.getCloseTipsLabel().string = "";
......
...@@ -5894,11 +5894,6 @@ ...@@ -5894,11 +5894,6 @@
"meta": 1643274501008, "meta": 1643274501008,
"relativePath": "script/game/ui/presenter/notice" "relativePath": "script/game/ui/presenter/notice"
}, },
"b3b4451d-4077-4e86-8252-7ae8b694d4e1": {
"asset": 1643274457939,
"meta": 1643274501042,
"relativePath": "script/game/ui/presenter/notice/NewNoticeViewPresenter.ts"
},
"58bc93c2-d8df-487b-bd07-0a6f079cb593": { "58bc93c2-d8df-487b-bd07-0a6f079cb593": {
"asset": 1643274457931, "asset": 1643274457931,
"meta": 1643274501048, "meta": 1643274501048,
...@@ -6154,11 +6149,6 @@ ...@@ -6154,11 +6149,6 @@
"meta": 1643274501888, "meta": 1643274501888,
"relativePath": "script/game/ui/view/type/DateCountView.ts" "relativePath": "script/game/ui/view/type/DateCountView.ts"
}, },
"78e0410b-bcbe-4e20-b27c-3c966b2d3076": {
"asset": 1643274457971,
"meta": 1643274501891,
"relativePath": "script/game/ui/view/type/DatingEventSubview.ts"
},
"cdfe4b36-3844-4a91-aa67-381fd2a1dd29": { "cdfe4b36-3844-4a91-aa67-381fd2a1dd29": {
"asset": 1643274457972, "asset": 1643274457972,
"meta": 1643274501893, "meta": 1643274501893,
...@@ -6324,11 +6314,6 @@ ...@@ -6324,11 +6314,6 @@
"meta": 1643275019690, "meta": 1643275019690,
"relativePath": "script/game/ui/view/impl/notice/NewNoticeViewImpl.ts" "relativePath": "script/game/ui/view/impl/notice/NewNoticeViewImpl.ts"
}, },
"13297d9a-7696-4c46-96e0-0bbebf0919d2": {
"asset": 1643275570064,
"meta": 1643275577993,
"relativePath": "script/game/model/GameModelManager.ts"
},
"f2d00e7e-a889-4fad-a98c-7248c79456b3": { "f2d00e7e-a889-4fad-a98c-7248c79456b3": {
"asset": 1643275229396, "asset": 1643275229396,
"meta": 1643275578015, "meta": 1643275578015,
...@@ -6339,16 +6324,6 @@ ...@@ -6339,16 +6324,6 @@
"meta": 1643275668210, "meta": 1643275668210,
"relativePath": "script/game/ui/presenter/ChatListViewPresenter.ts" "relativePath": "script/game/ui/presenter/ChatListViewPresenter.ts"
}, },
"6bc4c8b1-0f3e-4663-84cd-3d5670f40a40": {
"asset": 1643275596943,
"meta": 1643275668338,
"relativePath": "script/game/ui/presenter/DatingEventViewPresenter.ts"
},
"52f06191-b63c-4fbb-9df6-1c1bbda46344": {
"asset": 1643275595231,
"meta": 1643275668496,
"relativePath": "script/game/ui/presenter/DatingScenePresenter.ts"
},
"44fa1ecc-7d51-4cf6-8c85-6b51e158d85d": { "44fa1ecc-7d51-4cf6-8c85-6b51e158d85d": {
"asset": 1643275597785, "asset": 1643275597785,
"meta": 1643275668511, "meta": 1643275668511,
...@@ -6364,14 +6339,39 @@ ...@@ -6364,14 +6339,39 @@
"meta": 1643275668604, "meta": 1643275668604,
"relativePath": "script/game/ui/presenter/ExtraPlotDatingEventSubViewPresenter.ts" "relativePath": "script/game/ui/presenter/ExtraPlotDatingEventSubViewPresenter.ts"
}, },
"73860035-95fb-42c3-a0c8-4a1754585f6c": {
"asset": 1643275594240,
"meta": 1643275668696,
"relativePath": "script/game/ui/presenter/MainViewPresenter.ts"
},
"09017250-b1a4-4eb8-af03-3e292018a356": { "09017250-b1a4-4eb8-af03-3e292018a356": {
"asset": 1643275600304, "asset": 1643275600304,
"meta": 1643275668738, "meta": 1643275668738,
"relativePath": "script/game/ui/view/impl/PhoneCallViewImpl.ts" "relativePath": "script/game/ui/view/impl/PhoneCallViewImpl.ts"
},
"13297d9a-7696-4c46-96e0-0bbebf0919d2": {
"asset": 1643342043551,
"meta": 1643342047811,
"relativePath": "script/game/model/GameModelManager.ts"
},
"6bc4c8b1-0f3e-4663-84cd-3d5670f40a40": {
"asset": 1643337269198,
"meta": 1643342047931,
"relativePath": "script/game/ui/presenter/DatingEventViewPresenter.ts"
},
"52f06191-b63c-4fbb-9df6-1c1bbda46344": {
"asset": 1643337271287,
"meta": 1643342048069,
"relativePath": "script/game/ui/presenter/DatingScenePresenter.ts"
},
"73860035-95fb-42c3-a0c8-4a1754585f6c": {
"asset": 1643341824277,
"meta": 1643342048162,
"relativePath": "script/game/ui/presenter/MainViewPresenter.ts"
},
"b3b4451d-4077-4e86-8252-7ae8b694d4e1": {
"asset": 1643342045262,
"meta": 1643342048203,
"relativePath": "script/game/ui/presenter/notice/NewNoticeViewPresenter.ts"
},
"78e0410b-bcbe-4e20-b27c-3c966b2d3076": {
"asset": 1643337262866,
"meta": 1643342048209,
"relativePath": "script/game/ui/view/type/DatingEventSubview.ts"
} }
} }
\ No newline at end of file
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
...@@ -29,4 +29,4 @@ cc._RF.pop(); ...@@ -29,4 +29,4 @@ cc._RF.pop();
}); });
} }
})(); })();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0cy9zY3JpcHQvZ2FtZS91aS92aWV3L3R5cGUvRGF0aW5nRXZlbnRTdWJ2aWV3LnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7Ozs7Ozs7Ozs7Ozs7Ozs7OztBQW9EYSxR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leHBvcnQgdHlwZSBEYXRpbmdFdmVudFN1YnZpZXcgPSBMaXN0VmlldyAmIFB1cmVTdWJ2aWV3PERhdGluZ0V2ZW50U3Vidmlld1Byb3BzPiAmIEdldExpc3RJdGVtTm9kZTtcblxuZXhwb3J0IGNvbnN0IERhdGluZ0V2ZW50U3Vidmlld1R5cGUgPSBcIkRhdGluZ0V2ZW50U3Vidmlld1wiOyJdfQ==
\ No newline at end of file \ No newline at end of file
...@@ -33,7 +33,6 @@ const DatingEventSubview_1 = require("../view/type/DatingEventSubview"); ...@@ -33,7 +33,6 @@ const DatingEventSubview_1 = require("../view/type/DatingEventSubview");
const DatingEventView_1 = require("../view/type/DatingEventView"); const DatingEventView_1 = require("../view/type/DatingEventView");
const AlertDialogViewPresenter_1 = require("./AlertDialogViewPresenter"); const AlertDialogViewPresenter_1 = require("./AlertDialogViewPresenter");
const DatingScenePresenter_1 = require("./DatingScenePresenter"); const DatingScenePresenter_1 = require("./DatingScenePresenter");
const ExtraPlotViewPresenter_1 = require("./ExtraPlotViewPresenter");
const GuideViewPresenter_1 = require("./GuideViewPresenter"); const GuideViewPresenter_1 = require("./GuideViewPresenter");
let DatingEventViewPresenter = /** @class */ (() => { let DatingEventViewPresenter = /** @class */ (() => {
let DatingEventViewPresenter = class DatingEventViewPresenter extends PresenterBase_1.Presenter { let DatingEventViewPresenter = class DatingEventViewPresenter extends PresenterBase_1.Presenter {
...@@ -296,9 +295,6 @@ let DatingEventSubpresenter = /** @class */ (() => { ...@@ -296,9 +295,6 @@ let DatingEventSubpresenter = /** @class */ (() => {
}) })
.start(); .start();
}; };
this.onExtraPlotButtonClickCallback = () => {
UIManager_1.UIManager.pushPresenter(ExtraPlotViewPresenter_1.default, undefined);
};
} }
sceneModelToViewModel(item, index) { sceneModelToViewModel(item, index) {
this._modelMap[item.id.toString()] = item; this._modelMap[item.id.toString()] = item;
...@@ -378,7 +374,6 @@ let DatingEventSubpresenter = /** @class */ (() => { ...@@ -378,7 +374,6 @@ let DatingEventSubpresenter = /** @class */ (() => {
onLeftButtonClickCallback: this.onLeftButtonClickCallback, onLeftButtonClickCallback: this.onLeftButtonClickCallback,
onRightButtonClickCallback: this.onRightButtonClickCallback, onRightButtonClickCallback: this.onRightButtonClickCallback,
onNameButtonClickCallback: this.onNameButtonClickCallback, onNameButtonClickCallback: this.onNameButtonClickCallback,
onExtraPlotButtonClickCallback: this.onExtraPlotButtonClickCallback,
onCloseSectionViewCallBack: this.onCloseSectionViewCallBack onCloseSectionViewCallBack: this.onCloseSectionViewCallBack
}); });
} }
...@@ -474,11 +469,6 @@ let DatingEventSubpresenter = /** @class */ (() => { ...@@ -474,11 +469,6 @@ let DatingEventSubpresenter = /** @class */ (() => {
this._disposable.add(GameModelManager_1.GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus)); this._disposable.add(GameModelManager_1.GameModelManager.RefreshAllStatus.on(this.onRefreshAllStatus));
this._disposable.add(GameModelManager_1.GameModelManager.CloseDatingSceneView.on(this.onCloseDatingSceneView)); this._disposable.add(GameModelManager_1.GameModelManager.CloseDatingSceneView.on(this.onCloseDatingSceneView));
this._disposable.add(GameModelManager_1.GameModelManager.CloseExtraSceneView.on(this.onCloseExtraSceneView)); this._disposable.add(GameModelManager_1.GameModelManager.CloseExtraSceneView.on(this.onCloseExtraSceneView));
this._disposable.add(GameModelManager_1.GameModelManager.OpenExtraPlotView.on(this.onExtraPlotButtonClickCallback));
// let isNeedEnterCurChapter = GameModelManager.checkIsNeedEnterCurDateChapter();
// if (isNeedEnterCurChapter) {
// this.selectCurChapter();
// }
this.selectCurChapter(); this.selectCurChapter();
if (!this.view.isHidden) { if (!this.view.isHidden) {
this.refreshMaxChapterIndex(); this.refreshMaxChapterIndex();
......
...@@ -22,7 +22,6 @@ const GameConstData_1 = require("../../../common/gameplay/gamedata/GameConstData ...@@ -22,7 +22,6 @@ const GameConstData_1 = require("../../../common/gameplay/gamedata/GameConstData
const UIManager_1 = require("../../../common/gameplay/managers/UIManager"); const UIManager_1 = require("../../../common/gameplay/managers/UIManager");
const DateSceneConfig_1 = require("../../../config/DateSceneConfig"); const DateSceneConfig_1 = require("../../../config/DateSceneConfig");
const Enums_1 = require("../../Enums"); const Enums_1 = require("../../Enums");
const CDKeyEventManager_1 = require("../../model/CDKeyEventManager");
const DatingEventSceneModel_1 = require("../../model/DatingEventSceneModel"); const DatingEventSceneModel_1 = require("../../model/DatingEventSceneModel");
const GameModelManager_1 = require("../../model/GameModelManager"); const GameModelManager_1 = require("../../model/GameModelManager");
const PresenterCCViewFactory_1 = require("../PresenterCCViewFactory"); const PresenterCCViewFactory_1 = require("../PresenterCCViewFactory");
...@@ -81,38 +80,6 @@ let DatingScenePresenter = /** @class */ (() => { ...@@ -81,38 +80,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._completingPlot = false; this._completingPlot = false;
this.execPlot(); this.execPlot();
}; };
this.onClickRollBackBtn = (pid) => {
CDKeyEventManager_1.default.getInstance().shiftCDKeyRemovePlotAD();
let removeAdCardNum = CDKeyEventManager_1.default.getInstance().checkCDKeyRemovePlotAD();
let temp = {
dataptr: {},
titlecontent: "此功能不可逆",
content: "使用传送门会清掉此章节到已解锁最新章节之间的剧情存档和剧情内产生的数值,<color=red>且不可逆</color>,确定使用传送门吗?",
ishasad: !(removeAdCardNum > 0),
istwobtn: true,
adconfig: "inject_fruit",
hasBanner: false,
callback: async (type, ret) => {
if (ret) {
let retainVar = this.getRetainVarKeyArr();
await AVG_1.PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
AVG_1.GameRecord.saveRecord();
this._showScrollView = !this._showScrollView;
this.view.closeView();
await GameModelManager_1.GameModelManager.init((value) => {
});
GameModelManager_1.GameModelManager.setIsChangePlotSceneType(true);
UIManager_1.UIManager.showSceneToast("数据刷新完成");
let isSpecialScene = this._model.id === this._specialDealSceneId;
this._showBackBtn = !(isSpecialScene && this._model.status === DatingEventSceneModel_1.DatingEventStatus.InProgress);
this.view.showBackBtn(this._showBackBtn);
GameModelManager_1.GameModelManager.RefreshAllStatus.emit();
}
}
};
UIManager_1.UIManager.pushPresenter(AlertDialogViewPresenter_1.default, temp);
};
this.onDeadEvent = (pid) => { this.onDeadEvent = (pid) => {
if (this._model.status == DatingEventSceneModel_1.DatingEventStatus.Completed) { if (this._model.status == DatingEventSceneModel_1.DatingEventStatus.Completed) {
let temp = { let temp = {
...@@ -257,7 +224,6 @@ let DatingScenePresenter = /** @class */ (() => { ...@@ -257,7 +224,6 @@ let DatingScenePresenter = /** @class */ (() => {
bgPath = "textures/background/dating_event/" + bgPath; bgPath = "textures/background/dating_event/" + bgPath;
return this.view.setBackgroundEffect(bgPath); return this.view.setBackgroundEffect(bgPath);
})); }));
this._disposable.add(GameModelManager_1.GameModelManager.RollBackToPlot.on(this.onClickRollBackBtn));
this._showScrollView = false; this._showScrollView = false;
this._disposable.add(GameModelManager_1.GameModelManager.DeadEvent.on(this.onDeadEvent)); this._disposable.add(GameModelManager_1.GameModelManager.DeadEvent.on(this.onDeadEvent));
this._disposable.add(GameModelManager_1.GameModelManager.SpecialToast.on(this.onSpecialToast)); this._disposable.add(GameModelManager_1.GameModelManager.SpecialToast.on(this.onSpecialToast));
......
...@@ -120,10 +120,6 @@ let MainViewPresenter = /** @class */ (() => { ...@@ -120,10 +120,6 @@ let MainViewPresenter = /** @class */ (() => {
} }
} }
}; };
this.onRefreshDiscoveryRedDot = () => {
this._viewProps.discoverRedDot = !GameModelManager_1.GameModelManager.checkResumeFullEnergyMarked();
this.view.setProps(this._viewProps);
};
this.onMainTabForceClick = (param) => { this.onMainTabForceClick = (param) => {
UIManager_1.UIManager.popToPresenter(this); UIManager_1.UIManager.popToPresenter(this);
let index = param.index; let index = param.index;
...@@ -355,7 +351,6 @@ let MainViewPresenter = /** @class */ (() => { ...@@ -355,7 +351,6 @@ let MainViewPresenter = /** @class */ (() => {
this._subPresenters[0].open(viewContainer, undefined); this._subPresenters[0].open(viewContainer, undefined);
this.dealTabGuide(Enums_1.MainTabs.messageTab); this.dealTabGuide(Enums_1.MainTabs.messageTab);
this._viewProps.selectedTab = Enums_1.MainTabs.messageTab; this._viewProps.selectedTab = Enums_1.MainTabs.messageTab;
this._disposable.add(GameModelManager_1.GameModelManager.RefreshDiscoverTabRed.on(this.onRefreshDiscoveryRedDot));
this._disposable.add(GameModelManager_1.GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked)); this._disposable.add(GameModelManager_1.GameModelManager.ShowPlotBlocked.on(this.onShowPlotBlocked));
this._disposable.add(GameModelManager_1.GameModelManager.AutoPopView.on(this.onAutoPopView)); this._disposable.add(GameModelManager_1.GameModelManager.AutoPopView.on(this.onAutoPopView));
this._disposable.add(GameModelManager_1.GameModelManager.UnlockItem.on(this.onUnlockItem)); this._disposable.add(GameModelManager_1.GameModelManager.UnlockItem.on(this.onUnlockItem));
......
...@@ -48,7 +48,6 @@ let NewNoticeViewPresenter = /** @class */ (() => { ...@@ -48,7 +48,6 @@ let NewNoticeViewPresenter = /** @class */ (() => {
this.onCloseButtonClickCalback = () => { this.onCloseButtonClickCalback = () => {
if (this._canClose) { if (this._canClose) {
this.checkTipsToggleState(); this.checkTipsToggleState();
GameModelManager_1.GameModelManager.setNoticeReaded(true);
clearTimeout(this._closeTimeTicker); clearTimeout(this._closeTimeTicker);
this.view.close(); this.view.close();
} }
...@@ -81,8 +80,6 @@ let NewNoticeViewPresenter = /** @class */ (() => { ...@@ -81,8 +80,6 @@ let NewNoticeViewPresenter = /** @class */ (() => {
initView() { initView() {
//重置可关闭状态为false //重置可关闭状态为false
this._canClose = false; this._canClose = false;
//根据是否是第一次弹起紧急公告判断延迟时间
//this._delayTime = GameModelManager.getNoticeReaded() ? 0 : 3;
this._delayTime = 0; this._delayTime = 0;
//重置提示文本状态 //重置提示文本状态
this.view.getCloseTipsLabel().string = ""; this.view.getCloseTipsLabel().string = "";
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!