Commit 66300151 by 张树文

删除传送门功能

1 parent 544fe28c
Showing with 24 additions and 342 deletions
......@@ -55,7 +55,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
this._isDotTutorial = false;
this._reviewPlot = "";
this.view.completePlotCallback = this.completePlot;
this.view.onRollBackBtnCallback = this.onRollBackBtnCallback;
this.view.onReviewButtonClickCallback = this.onReviewButtonClickCallback;
this._model = param;
if (this._model.status === DatingEventStatus.New) {
......@@ -68,10 +67,8 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
// this.view.setRunCloseAction((isSpecialScene && this._model.status !== DatingEventStatus.Completed));
if (this._model.isExtra) {
GameModelManager.setIsMainPlotSceneType(false);
this.view.showRollBackBtn(false);
} else {
GameModelManager.setIsMainPlotSceneType(true);
this.view.showRollBackBtn(true);
}
delay(0.1).then(async () => {
if (param.status === DatingEventStatus.Completed) {
......@@ -124,7 +121,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
}));
this._disposable.add(GameModelManager.RollBackToPlot.on(this.onClickRollBackBtn));
this._showScrollView = false;
this.view.getScrollViewRootNode().active = this._showScrollView;
this._disposable.add(GameModelManager.DeadEvent.on(this.onDeadEvent));
this._disposable.add(GameModelManager.SpecialToast.on(this.onSpecialToast));
}
......@@ -158,11 +154,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
if (content) { // TODO 图片设置
if (content.type === SentenceType.TEXT) {
this.view.showBackBtn(this._showBackBtn);
if (this._model.isExtra) {
this.view.showRollBackBtn(false);
} else {
this.view.showRollBackBtn(true);
}
await this.view.setContent(sentence.roleId === GameConstData.GAME_CONST_PLAYER_ROLE_VALUE,
richNodesToCocosString(content.value),
sentence.roleId === 1 ? "" : roleData.getNameIcon(),
......@@ -178,7 +169,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
}
} else if (content.type === SentenceType.SELECT) {
this.view.showBackBtn(false);
this.view.showRollBackBtn(false);
let setSelection = async () => {
let value = content.value[this._currSelect!];
let str = value.summary;
......@@ -242,11 +232,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
this._finished = true;
this.view.setIsRunningAction(false);
this.view.showBackBtn(this._showBackBtn);
if (this._model.isExtra) {
this.view.showRollBackBtn(false);
} else {
this.view.showRollBackBtn(true);
}
let Plot = PlotManager.getCurrentPlots()[0];
let isToBeContinued = Plot.id == SpecialPlotId.ToBeContinued;
let isEnd = Plot.id == SpecialPlotId.End;
......@@ -357,37 +342,15 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
return portrait;
}
onRollBackBtnCallback = () => {
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
if (this._showScrollView) {
let scrollView = this.view.getScrollViewRootNode().getChildByName("ScrollView");
scrollView.scaleY = 0;
cc.tween(scrollView)
.to(0.3, { scaleY: 1 })
.start();
this.CreateOrUpdateChapterBtns();
} else {
this.view.getScrollViewContentNode().removeAllChildren();
}
}
CreateOrUpdateChapterBtns() {
this.view.getScrollViewContentNode().removeAllChildren();
let ret: { chapterId: number, chapterName: number, chapterStartPlotId: number }[] = [];
let models = GameModelManager.getMainDatingEventScenesModel();
for (let i = 0; i < models.length; i++) {
ret.push({ chapterId: i + 1, chapterName: models[i].config.name, chapterStartPlotId: models[i].config.start_plot_id });
}
// for (let i = 0; i < ret.length; ++i) {
// let btn = cc.instantiate(this.view.getChapterBtn());
// btn.getComponent(ChapterBtn).setData(ret[i].chapterId, ret[i].chapterName, ret[i].chapterStartPlotId);
// btn.parent = this.view.getScrollViewContentNode();
// }
for (let i = ret.length - 1; i >= 0; i--) {
let btn = cc.instantiate(this.view.getChapterBtn());
btn.getComponent(ChapterBtn).setData(ret[i].chapterId, ret[i].chapterName, ret[i].chapterStartPlotId);
btn.parent = this.view.getScrollViewContentNode();
}
}
......@@ -409,10 +372,7 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
await PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
GameRecord.saveRecord();
// this.rollBackPlotInfo(pid);
this.view.getScrollViewContentNode().removeAllChildren();
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
this.view.closeView();
await GameModelManager.init((value: number) => {
});
......@@ -500,10 +460,7 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
await PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
GameRecord.saveRecord();
// this.rollBackPlotInfo(pid);
this.view.getScrollViewContentNode().removeAllChildren();
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
this.view.closeView();
await GameModelManager.init((value: number) => {
});
......@@ -578,18 +535,6 @@ export class DatingScenePresenter extends Presenter<DatingEventSceneModel, Datin
nextKey = plotIds[i + 1];
}
}
// let cfg = ConfigManager.getAllConfig(dateSceneConfig);
// let ids: string[] = [];
// for (const id in cfg) {
// if (cfg[id].DateType == DateType.Date_Normal) {
// ids.push(id);
// }
// }
// for (let i = 0; i < ids.length; i++) {
// if (ids[i] == currEventId.toString()) {
// nextKey = ids[i + 1];
// }
// }
console.log("getNextDatingEventModel", nextKey);
return nextKey;
}
......
......@@ -47,9 +47,6 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView {
@property(cc.Node)
private endTipNode = DummyNode;
// @property(cc.Node)
// private closeActNode = DummyNode;
@property(cc.Node)
private arrowguideNode = DummyNode;
......@@ -59,15 +56,9 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView {
@property(Typewriter)
private typewriter: Typewriter = undefined as unknown as Typewriter;
@property(cc.Node)
private rollBackBtn = DummyNode;
@property(cc.Prefab)
private chapterBtn = DummyPrefab;
@property(cc.Node)
private scrollViewRootNode = DummyNode;
@property(cc.Node)
private contentNode;
@property(cc.Node)
private skipButtonNode = DummyNode;
@property(cc.Node)
private autoPlayButtonNode = DummyNode;
......@@ -141,7 +132,6 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView {
//#endregion
completePlotCallback: () => Promise<void>;
onRollBackBtnCallback: () => void;
onReviewButtonClickCallback: () => void;
onEnable() {
......@@ -447,50 +437,12 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView {
runCloseAction() {
this.closeView();
// this.setIsRunningAction(true);
// this.closeActNode.stopAllActions();
// this.closeActNode.scale = 1;
// this.closeActNode.opacity = 0;
// this.closeActNode.active = true;
// this.backBtnNode.active = false;
// let actTime: number = 1;
// let tempX: number = 0;
// let tempY: number = 0;
// let tempR: number = 0;
// let tempS: number = this.node.width / this.closeActNode.width;
// let easeS: cc.Easing = cc.easeSineOut();
// let moveAct = cc.moveTo(actTime, cc.v2(tempX, tempY)).easing(easeS);
// let fadeInAct = cc.fadeIn(actTime).easing(easeS);
// let scaleAct = cc.scaleTo(actTime / 2, tempS).easing(easeS);
// let rotationAct = cc.rotateTo(actTime / 2, tempR).easing(easeS);
// let call = cc.callFunc(() => {
// this.closeView();
// });
// let spawnMF = cc.spawn(moveAct, fadeInAct);
// let spawnSR = cc.spawn(scaleAct, rotationAct);
// let seq = cc.sequence(spawnMF, spawnSR, call);
// this.closeActNode.runAction(seq);
}
getScrollViewRootNode = (): cc.Node => {
return this.scrollViewRootNode;
}
getScrollViewContentNode = (): cc.Node => {
return this.contentNode;
}
getChapterBtn = (): cc.Prefab => {
return this.chapterBtn;
}
onRollBackBtnClick() {
this.resetAutoPlayButtonState();
this.onRollBackBtnCallback();
}
showRollBackBtn = (isShow: boolean) => {
this.rollBackBtn.active = isShow;
}
onRefreshAllStatus() {
this.closeAction();
......
......@@ -15,14 +15,10 @@ export interface DatingSceneView extends View {
showBackBtn: (show: boolean) => void;
setRunCloseAction: (run: boolean) => void;
getScrollViewRootNode: () => cc.Node;
getScrollViewContentNode: () => cc.Node;
getChapterBtn: () => cc.Prefab;
/**关闭ui */
closeView: () => void;
showRollBackBtn: (isShow: boolean) => void;
onRollBackBtnCallback: () => void;
onReviewButtonClickCallback: () => void;
}
......
{"version":3,"sources":["assets/script/game/ui/view/type/DatingSceneView.ts"],"names":[],"mappings":";;;;;;;AA4Ba,QAAA,mBAAmB,GAAG,iBAAiB,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { View } from \"../../../../common/classbase/ViewBase\";\n\nexport interface DatingSceneView extends View {\n /**\n * 完成当前剧情回调函数\n */\n completePlotCallback: () => Promise<void>;\n setContent(isSelf: boolean, text: string, nameSpr: string, name?: string, portraitImg?: string, otherPortraitImg?: string, showRouge?: boolean): Promise<void>;\n setBackground(path: string): Promise<void>;\n setBackgroundEffect(path: string): Promise<void>;\n setIsRunningAction: (isRunning: boolean) => void;\n /**引导返回 */\n guideBack(): void;\n /**是否显示返回按钮*/\n showBackBtn: (show: boolean) => void;\n setRunCloseAction: (run: boolean) => void;\n\n getScrollViewRootNode: () => cc.Node;\n getScrollViewContentNode: () => cc.Node;\n getChapterBtn: () => cc.Prefab;\n\n /**关闭ui */\n closeView: () => void;\n showRollBackBtn: (isShow: boolean) => void;\n onRollBackBtnCallback: () => void;\n onReviewButtonClickCallback: () => void;\n}\n\nexport const DatingSceneViewType = \"DatingSceneView\";"]}
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/view/type/DatingSceneView.ts"],"names":[],"mappings":";;;;;;;AAwBa,QAAA,mBAAmB,GAAG,iBAAiB,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { View } from \"../../../../common/classbase/ViewBase\";\n\nexport interface DatingSceneView extends View {\n /**\n * 完成当前剧情回调函数\n */\n completePlotCallback: () => Promise<void>;\n setContent(isSelf: boolean, text: string, nameSpr: string, name?: string, portraitImg?: string, otherPortraitImg?: string, showRouge?: boolean): Promise<void>;\n setBackground(path: string): Promise<void>;\n setBackgroundEffect(path: string): Promise<void>;\n setIsRunningAction: (isRunning: boolean) => void;\n /**引导返回 */\n guideBack(): void;\n /**是否显示返回按钮*/\n showBackBtn: (show: boolean) => void;\n setRunCloseAction: (run: boolean) => void;\n\n getChapterBtn: () => cc.Prefab;\n\n /**关闭ui */\n closeView: () => void;\n onReviewButtonClickCallback: () => void;\n}\n\nexport const DatingSceneViewType = \"DatingSceneView\";"]}
\ No newline at end of file
......@@ -82,21 +82,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._completingPlot = false;
this.execPlot();
};
this.onRollBackBtnCallback = () => {
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
if (this._showScrollView) {
let scrollView = this.view.getScrollViewRootNode().getChildByName("ScrollView");
scrollView.scaleY = 0;
cc.tween(scrollView)
.to(0.3, { scaleY: 1 })
.start();
this.CreateOrUpdateChapterBtns();
}
else {
this.view.getScrollViewContentNode().removeAllChildren();
}
};
this.onClickRollBackBtn = (pid) => {
CDKeyEventManager_1.default.getInstance().shiftCDKeyRemovePlotAD();
let removeAdCardNum = CDKeyEventManager_1.default.getInstance().checkCDKeyRemovePlotAD();
......@@ -114,10 +99,7 @@ let DatingScenePresenter = /** @class */ (() => {
await AVG_1.PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
AVG_1.GameRecord.saveRecord();
// this.rollBackPlotInfo(pid);
this.view.getScrollViewContentNode().removeAllChildren();
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
this.view.closeView();
await GameModelManager_1.GameModelManager.init((value) => {
});
......@@ -165,10 +147,7 @@ let DatingScenePresenter = /** @class */ (() => {
await AVG_1.PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
AVG_1.GameRecord.saveRecord();
// this.rollBackPlotInfo(pid);
this.view.getScrollViewContentNode().removeAllChildren();
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
this.view.closeView();
await GameModelManager_1.GameModelManager.init((value) => {
});
......@@ -214,7 +193,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._isDotTutorial = false;
this._reviewPlot = "";
this.view.completePlotCallback = this.completePlot;
this.view.onRollBackBtnCallback = this.onRollBackBtnCallback;
this.view.onReviewButtonClickCallback = this.onReviewButtonClickCallback;
this._model = param;
if (this._model.status === DatingEventSceneModel_1.DatingEventStatus.New) {
......@@ -227,11 +205,9 @@ let DatingScenePresenter = /** @class */ (() => {
// this.view.setRunCloseAction((isSpecialScene && this._model.status !== DatingEventStatus.Completed));
if (this._model.isExtra) {
GameModelManager_1.GameModelManager.setIsMainPlotSceneType(false);
this.view.showRollBackBtn(false);
}
else {
GameModelManager_1.GameModelManager.setIsMainPlotSceneType(true);
this.view.showRollBackBtn(true);
}
simba_utils_1.delay(0.1).then(async () => {
if (param.status === DatingEventSceneModel_1.DatingEventStatus.Completed) {
......@@ -284,7 +260,6 @@ let DatingScenePresenter = /** @class */ (() => {
}));
this._disposable.add(GameModelManager_1.GameModelManager.RollBackToPlot.on(this.onClickRollBackBtn));
this._showScrollView = false;
this.view.getScrollViewRootNode().active = this._showScrollView;
this._disposable.add(GameModelManager_1.GameModelManager.DeadEvent.on(this.onDeadEvent));
this._disposable.add(GameModelManager_1.GameModelManager.SpecialToast.on(this.onSpecialToast));
}
......@@ -316,12 +291,6 @@ let DatingScenePresenter = /** @class */ (() => {
if (content) { // TODO 图片设置
if (content.type === AVG_1.SentenceType.TEXT) {
this.view.showBackBtn(this._showBackBtn);
if (this._model.isExtra) {
this.view.showRollBackBtn(false);
}
else {
this.view.showRollBackBtn(true);
}
await this.view.setContent(sentence.roleId === GameConstData_1.GameConstData.GAME_CONST_PLAYER_ROLE_VALUE, AVG_1.richNodesToCocosString(content.value), sentence.roleId === 1 ? "" : roleData.getNameIcon(), sentence.roleId === 1 ? undefined : roleData.getConfig().name,
// sentence.roleId === 1 ? otherPortrait : roleData.getPortrait(this._currPlot.face,),
sentence.roleId === 1 ? otherPortrait : this.getPortraitByRole(roleData, this._currPlot.face), otherPortrait, isShowRouge);
......@@ -334,7 +303,6 @@ let DatingScenePresenter = /** @class */ (() => {
}
else if (content.type === AVG_1.SentenceType.SELECT) {
this.view.showBackBtn(false);
this.view.showRollBackBtn(false);
let setSelection = async () => {
let value = content.value[this._currSelect];
let str = value.summary;
......@@ -402,12 +370,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._finished = true;
this.view.setIsRunningAction(false);
this.view.showBackBtn(this._showBackBtn);
if (this._model.isExtra) {
this.view.showRollBackBtn(false);
}
else {
this.view.showRollBackBtn(true);
}
let Plot = AVG_1.PlotManager.getCurrentPlots()[0];
let isToBeContinued = Plot.id == AVG_1.SpecialPlotId.ToBeContinued;
let isEnd = Plot.id == AVG_1.SpecialPlotId.End;
......@@ -494,21 +456,14 @@ let DatingScenePresenter = /** @class */ (() => {
return portrait;
}
CreateOrUpdateChapterBtns() {
this.view.getScrollViewContentNode().removeAllChildren();
let ret = [];
let models = GameModelManager_1.GameModelManager.getMainDatingEventScenesModel();
for (let i = 0; i < models.length; i++) {
ret.push({ chapterId: i + 1, chapterName: models[i].config.name, chapterStartPlotId: models[i].config.start_plot_id });
}
// for (let i = 0; i < ret.length; ++i) {
// let btn = cc.instantiate(this.view.getChapterBtn());
// btn.getComponent(ChapterBtn).setData(ret[i].chapterId, ret[i].chapterName, ret[i].chapterStartPlotId);
// btn.parent = this.view.getScrollViewContentNode();
// }
for (let i = ret.length - 1; i >= 0; i--) {
let btn = cc.instantiate(this.view.getChapterBtn());
btn.getComponent(ChapterBtn_1.default).setData(ret[i].chapterId, ret[i].chapterName, ret[i].chapterStartPlotId);
btn.parent = this.view.getScrollViewContentNode();
}
}
getRetainVarKeyArr() {
......@@ -595,18 +550,6 @@ let DatingScenePresenter = /** @class */ (() => {
nextKey = plotIds[i + 1];
}
}
// let cfg = ConfigManager.getAllConfig(dateSceneConfig);
// let ids: string[] = [];
// for (const id in cfg) {
// if (cfg[id].DateType == DateType.Date_Normal) {
// ids.push(id);
// }
// }
// for (let i = 0; i < ids.length; i++) {
// if (ids[i] == currEventId.toString()) {
// nextKey = ids[i + 1];
// }
// }
console.log("getNextDatingEventModel", nextKey);
return nextKey;
}
......
......@@ -46,14 +46,10 @@ let DatingSceneViewImpl = /** @class */ (() => {
this.backRedDot = CCDummyObjects_1.DummyNode;
this.backBtnNode = CCDummyObjects_1.DummyNode;
this.endTipNode = CCDummyObjects_1.DummyNode;
// @property(cc.Node)
// private closeActNode = DummyNode;
this.arrowguideNode = CCDummyObjects_1.DummyNode;
this.otherNameSpr = CCDummyObjects_1.DummySprite;
this.typewriter = undefined;
this.rollBackBtn = CCDummyObjects_1.DummyNode;
this.chapterBtn = CCDummyObjects_1.DummyPrefab;
this.scrollViewRootNode = CCDummyObjects_1.DummyNode;
this.skipButtonNode = CCDummyObjects_1.DummyNode;
this.autoPlayButtonNode = CCDummyObjects_1.DummyNode;
this.autoPlaySpriteFrame = [];
......@@ -85,18 +81,9 @@ let DatingSceneViewImpl = /** @class */ (() => {
}
}
};
this.getScrollViewRootNode = () => {
return this.scrollViewRootNode;
};
this.getScrollViewContentNode = () => {
return this.contentNode;
};
this.getChapterBtn = () => {
return this.chapterBtn;
};
this.showRollBackBtn = (isShow) => {
this.rollBackBtn.active = isShow;
};
}
/**
* 是否显示返回按钮
......@@ -417,33 +404,6 @@ let DatingSceneViewImpl = /** @class */ (() => {
}
runCloseAction() {
this.closeView();
// this.setIsRunningAction(true);
// this.closeActNode.stopAllActions();
// this.closeActNode.scale = 1;
// this.closeActNode.opacity = 0;
// this.closeActNode.active = true;
// this.backBtnNode.active = false;
// let actTime: number = 1;
// let tempX: number = 0;
// let tempY: number = 0;
// let tempR: number = 0;
// let tempS: number = this.node.width / this.closeActNode.width;
// let easeS: cc.Easing = cc.easeSineOut();
// let moveAct = cc.moveTo(actTime, cc.v2(tempX, tempY)).easing(easeS);
// let fadeInAct = cc.fadeIn(actTime).easing(easeS);
// let scaleAct = cc.scaleTo(actTime / 2, tempS).easing(easeS);
// let rotationAct = cc.rotateTo(actTime / 2, tempR).easing(easeS);
// let call = cc.callFunc(() => {
// this.closeView();
// });
// let spawnMF = cc.spawn(moveAct, fadeInAct);
// let spawnSR = cc.spawn(scaleAct, rotationAct);
// let seq = cc.sequence(spawnMF, spawnSR, call);
// this.closeActNode.runAction(seq);
}
onRollBackBtnClick() {
this.resetAutoPlayButtonState();
this.onRollBackBtnCallback();
}
onRefreshAllStatus() {
this.closeAction();
......@@ -524,19 +484,10 @@ let DatingSceneViewImpl = /** @class */ (() => {
property(Typewriter_1.default)
], DatingSceneViewImpl.prototype, "typewriter", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "rollBackBtn", void 0);
__decorate([
property(cc.Prefab)
], DatingSceneViewImpl.prototype, "chapterBtn", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "scrollViewRootNode", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "contentNode", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "skipButtonNode", void 0);
__decorate([
property(cc.Node)
......
......@@ -5195,8 +5195,8 @@
"relativePath": "resources/prefab/ui/DatingEventView.prefab"
},
"9d521361-150a-4693-a6c3-867dd716037f": {
"asset": 1643263526923,
"meta": 1643263526926,
"asset": 1643273277723,
"meta": 1643273277725,
"relativePath": "resources/prefab/ui/DatingSceneView.prefab"
},
"9274f284-8ad8-4099-b4a7-d65ff8ddea51": {
......@@ -6214,16 +6214,6 @@
"meta": 1643262626270,
"relativePath": "script/game/ui/view/type/MainView.ts"
},
"cde0e608-3a09-4f9a-bc95-9aee3115c34f": {
"asset": 1643263124712,
"meta": 1643263368850,
"relativePath": "script/game/ui/view/impl/dating/DatingSceneViewImpl.ts"
},
"35fa82eb-ae95-477e-a258-54c3ccf00a47": {
"asset": 1643263247206,
"meta": 1643263368862,
"relativePath": "script/game/ui/view/type/DatingSceneView.ts"
},
"b020f340-f6ad-428d-8769-c332b5e22752": {
"asset": 1643263859456,
"meta": 1643263876993,
......@@ -6299,11 +6289,6 @@
"meta": 1643271532510,
"relativePath": "script/game/ui/presenter/DatingEventViewPresenter.ts"
},
"52f06191-b63c-4fbb-9df6-1c1bbda46344": {
"asset": 1643270664587,
"meta": 1643271532645,
"relativePath": "script/game/ui/presenter/DatingScenePresenter.ts"
},
"f6da47ee-6dae-4b75-8329-44a46c55944b": {
"asset": 1643271512252,
"meta": 1643271532660,
......@@ -6383,5 +6368,20 @@
"asset": 1643271633244,
"meta": 1643272641875,
"relativePath": "script/game/ui/view/impl/message/GiftListItemImpl.ts"
},
"52f06191-b63c-4fbb-9df6-1c1bbda46344": {
"asset": 1643273267711,
"meta": 1643273270550,
"relativePath": "script/game/ui/presenter/DatingScenePresenter.ts"
},
"cde0e608-3a09-4f9a-bc95-9aee3115c34f": {
"asset": 1643273191829,
"meta": 1643273270640,
"relativePath": "script/game/ui/view/impl/dating/DatingSceneViewImpl.ts"
},
"35fa82eb-ae95-477e-a258-54c3ccf00a47": {
"asset": 1643273207364,
"meta": 1643273270649,
"relativePath": "script/game/ui/view/type/DatingSceneView.ts"
}
}
\ No newline at end of file
......@@ -66,7 +66,6 @@
"b779c231-722a-4460-ac43-333651f1de42",
"0c5e5b6a-e3cd-49c8-b1f6-dd38039c121a",
"fa82047f-ca46-4900-b016-1cbc6fb8dc8a",
"9d521361-150a-4693-a6c3-867dd716037f",
"e2cefdd5-1c31-4fc8-85ac-dbd2ea35a494",
"c408c1b6-ca44-4401-a59c-7feb174a3ef2",
"d370020c-eb3c-48b9-b561-b423f8f8c767",
......@@ -84,6 +83,7 @@
"caaa16e1-77dc-46c0-bfa4-151e51e9919f",
"2529f882-df6b-4cac-a25a-1ca4900ba066",
"02e8108f-1cea-48c1-bf08-4de4d0954e51",
"bd537cf0-df73-4b2a-bb36-40e91d4875e3"
"bd537cf0-df73-4b2a-bb36-40e91d4875e3",
"9d521361-150a-4693-a6c3-867dd716037f"
]
}
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();
});
}
})();
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbImFzc2V0cy9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LyoqXG4gICAgICog5a6M5oiQ5b2T5YmN5Ymn5oOF5Zue6LCD5Ye95pWwXG4gICAgICovXG4gICAgY29tcGxldGVQbG90Q2FsbGJhY2s6ICgpID0+IFByb21pc2U8dm9pZD47XG4gICAgc2V0Q29udGVudChpc1NlbGY6IGJvb2xlYW4sIHRleHQ6IHN0cmluZywgbmFtZVNwcjogc3RyaW5nLCBuYW1lPzogc3RyaW5nLCBwb3J0cmFpdEltZz86IHN0cmluZywgb3RoZXJQb3J0cmFpdEltZz86IHN0cmluZywgc2hvd1JvdWdlPzogYm9vbGVhbik6IFByb21pc2U8dm9pZD47XG4gICAgc2V0QmFja2dyb3VuZChwYXRoOiBzdHJpbmcpOiBQcm9taXNlPHZvaWQ+O1xuICAgIHNldEJhY2tncm91bmRFZmZlY3QocGF0aDogc3RyaW5nKTogUHJvbWlzZTx2b2lkPjtcbiAgICBzZXRJc1J1bm5pbmdBY3Rpb246IChpc1J1bm5pbmc6IGJvb2xlYW4pID0+IHZvaWQ7XG4gICAgLyoq5byV5a+86L+U5ZueICovXG4gICAgZ3VpZGVCYWNrKCk6IHZvaWQ7XG4gICAgLyoq5piv5ZCm5pi+56S66L+U5Zue5oyJ6ZKuKi9cbiAgICBzaG93QmFja0J0bjogKHNob3c6IGJvb2xlYW4pID0+IHZvaWQ7XG4gICAgc2V0UnVuQ2xvc2VBY3Rpb246IChydW46IGJvb2xlYW4pID0+IHZvaWQ7XG5cbiAgICBnZXRDaGFwdGVyQnRuOiAoKSA9PiBjYy5QcmVmYWI7XG5cbiAgICAvKirlhbPpl611aSAqL1xuICAgIGNsb3NlVmlldzogKCkgPT4gdm9pZDtcbiAgICBvblJldmlld0J1dHRvbkNsaWNrQ2FsbGJhY2s6ICgpID0+IHZvaWQ7XG59XG5cbmV4cG9ydCBjb25zdCBEYXRpbmdTY2VuZVZpZXdUeXBlID0gXCJEYXRpbmdTY2VuZVZpZXdcIjsiXX0=
\ No newline at end of file
......@@ -82,21 +82,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._completingPlot = false;
this.execPlot();
};
this.onRollBackBtnCallback = () => {
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
if (this._showScrollView) {
let scrollView = this.view.getScrollViewRootNode().getChildByName("ScrollView");
scrollView.scaleY = 0;
cc.tween(scrollView)
.to(0.3, { scaleY: 1 })
.start();
this.CreateOrUpdateChapterBtns();
}
else {
this.view.getScrollViewContentNode().removeAllChildren();
}
};
this.onClickRollBackBtn = (pid) => {
CDKeyEventManager_1.default.getInstance().shiftCDKeyRemovePlotAD();
let removeAdCardNum = CDKeyEventManager_1.default.getInstance().checkCDKeyRemovePlotAD();
......@@ -114,10 +99,7 @@ let DatingScenePresenter = /** @class */ (() => {
await AVG_1.PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
AVG_1.GameRecord.saveRecord();
// this.rollBackPlotInfo(pid);
this.view.getScrollViewContentNode().removeAllChildren();
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
this.view.closeView();
await GameModelManager_1.GameModelManager.init((value) => {
});
......@@ -165,10 +147,7 @@ let DatingScenePresenter = /** @class */ (() => {
await AVG_1.PlotManager.rollbackToPlot(pid, false, retainVar);
this.rollBackDateAdArray(pid);
AVG_1.GameRecord.saveRecord();
// this.rollBackPlotInfo(pid);
this.view.getScrollViewContentNode().removeAllChildren();
this._showScrollView = !this._showScrollView;
this.view.getScrollViewRootNode().active = this._showScrollView;
this.view.closeView();
await GameModelManager_1.GameModelManager.init((value) => {
});
......@@ -214,7 +193,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._isDotTutorial = false;
this._reviewPlot = "";
this.view.completePlotCallback = this.completePlot;
this.view.onRollBackBtnCallback = this.onRollBackBtnCallback;
this.view.onReviewButtonClickCallback = this.onReviewButtonClickCallback;
this._model = param;
if (this._model.status === DatingEventSceneModel_1.DatingEventStatus.New) {
......@@ -227,11 +205,9 @@ let DatingScenePresenter = /** @class */ (() => {
// this.view.setRunCloseAction((isSpecialScene && this._model.status !== DatingEventStatus.Completed));
if (this._model.isExtra) {
GameModelManager_1.GameModelManager.setIsMainPlotSceneType(false);
this.view.showRollBackBtn(false);
}
else {
GameModelManager_1.GameModelManager.setIsMainPlotSceneType(true);
this.view.showRollBackBtn(true);
}
simba_utils_1.delay(0.1).then(async () => {
if (param.status === DatingEventSceneModel_1.DatingEventStatus.Completed) {
......@@ -284,7 +260,6 @@ let DatingScenePresenter = /** @class */ (() => {
}));
this._disposable.add(GameModelManager_1.GameModelManager.RollBackToPlot.on(this.onClickRollBackBtn));
this._showScrollView = false;
this.view.getScrollViewRootNode().active = this._showScrollView;
this._disposable.add(GameModelManager_1.GameModelManager.DeadEvent.on(this.onDeadEvent));
this._disposable.add(GameModelManager_1.GameModelManager.SpecialToast.on(this.onSpecialToast));
}
......@@ -316,12 +291,6 @@ let DatingScenePresenter = /** @class */ (() => {
if (content) { // TODO 图片设置
if (content.type === AVG_1.SentenceType.TEXT) {
this.view.showBackBtn(this._showBackBtn);
if (this._model.isExtra) {
this.view.showRollBackBtn(false);
}
else {
this.view.showRollBackBtn(true);
}
await this.view.setContent(sentence.roleId === GameConstData_1.GameConstData.GAME_CONST_PLAYER_ROLE_VALUE, AVG_1.richNodesToCocosString(content.value), sentence.roleId === 1 ? "" : roleData.getNameIcon(), sentence.roleId === 1 ? undefined : roleData.getConfig().name,
// sentence.roleId === 1 ? otherPortrait : roleData.getPortrait(this._currPlot.face,),
sentence.roleId === 1 ? otherPortrait : this.getPortraitByRole(roleData, this._currPlot.face), otherPortrait, isShowRouge);
......@@ -334,7 +303,6 @@ let DatingScenePresenter = /** @class */ (() => {
}
else if (content.type === AVG_1.SentenceType.SELECT) {
this.view.showBackBtn(false);
this.view.showRollBackBtn(false);
let setSelection = async () => {
let value = content.value[this._currSelect];
let str = value.summary;
......@@ -402,12 +370,6 @@ let DatingScenePresenter = /** @class */ (() => {
this._finished = true;
this.view.setIsRunningAction(false);
this.view.showBackBtn(this._showBackBtn);
if (this._model.isExtra) {
this.view.showRollBackBtn(false);
}
else {
this.view.showRollBackBtn(true);
}
let Plot = AVG_1.PlotManager.getCurrentPlots()[0];
let isToBeContinued = Plot.id == AVG_1.SpecialPlotId.ToBeContinued;
let isEnd = Plot.id == AVG_1.SpecialPlotId.End;
......@@ -494,21 +456,14 @@ let DatingScenePresenter = /** @class */ (() => {
return portrait;
}
CreateOrUpdateChapterBtns() {
this.view.getScrollViewContentNode().removeAllChildren();
let ret = [];
let models = GameModelManager_1.GameModelManager.getMainDatingEventScenesModel();
for (let i = 0; i < models.length; i++) {
ret.push({ chapterId: i + 1, chapterName: models[i].config.name, chapterStartPlotId: models[i].config.start_plot_id });
}
// for (let i = 0; i < ret.length; ++i) {
// let btn = cc.instantiate(this.view.getChapterBtn());
// btn.getComponent(ChapterBtn).setData(ret[i].chapterId, ret[i].chapterName, ret[i].chapterStartPlotId);
// btn.parent = this.view.getScrollViewContentNode();
// }
for (let i = ret.length - 1; i >= 0; i--) {
let btn = cc.instantiate(this.view.getChapterBtn());
btn.getComponent(ChapterBtn_1.default).setData(ret[i].chapterId, ret[i].chapterName, ret[i].chapterStartPlotId);
btn.parent = this.view.getScrollViewContentNode();
}
}
getRetainVarKeyArr() {
......@@ -595,18 +550,6 @@ let DatingScenePresenter = /** @class */ (() => {
nextKey = plotIds[i + 1];
}
}
// let cfg = ConfigManager.getAllConfig(dateSceneConfig);
// let ids: string[] = [];
// for (const id in cfg) {
// if (cfg[id].DateType == DateType.Date_Normal) {
// ids.push(id);
// }
// }
// for (let i = 0; i < ids.length; i++) {
// if (ids[i] == currEventId.toString()) {
// nextKey = ids[i + 1];
// }
// }
console.log("getNextDatingEventModel", nextKey);
return nextKey;
}
......
......@@ -46,14 +46,10 @@ let DatingSceneViewImpl = /** @class */ (() => {
this.backRedDot = CCDummyObjects_1.DummyNode;
this.backBtnNode = CCDummyObjects_1.DummyNode;
this.endTipNode = CCDummyObjects_1.DummyNode;
// @property(cc.Node)
// private closeActNode = DummyNode;
this.arrowguideNode = CCDummyObjects_1.DummyNode;
this.otherNameSpr = CCDummyObjects_1.DummySprite;
this.typewriter = undefined;
this.rollBackBtn = CCDummyObjects_1.DummyNode;
this.chapterBtn = CCDummyObjects_1.DummyPrefab;
this.scrollViewRootNode = CCDummyObjects_1.DummyNode;
this.skipButtonNode = CCDummyObjects_1.DummyNode;
this.autoPlayButtonNode = CCDummyObjects_1.DummyNode;
this.autoPlaySpriteFrame = [];
......@@ -85,18 +81,9 @@ let DatingSceneViewImpl = /** @class */ (() => {
}
}
};
this.getScrollViewRootNode = () => {
return this.scrollViewRootNode;
};
this.getScrollViewContentNode = () => {
return this.contentNode;
};
this.getChapterBtn = () => {
return this.chapterBtn;
};
this.showRollBackBtn = (isShow) => {
this.rollBackBtn.active = isShow;
};
}
/**
* 是否显示返回按钮
......@@ -417,33 +404,6 @@ let DatingSceneViewImpl = /** @class */ (() => {
}
runCloseAction() {
this.closeView();
// this.setIsRunningAction(true);
// this.closeActNode.stopAllActions();
// this.closeActNode.scale = 1;
// this.closeActNode.opacity = 0;
// this.closeActNode.active = true;
// this.backBtnNode.active = false;
// let actTime: number = 1;
// let tempX: number = 0;
// let tempY: number = 0;
// let tempR: number = 0;
// let tempS: number = this.node.width / this.closeActNode.width;
// let easeS: cc.Easing = cc.easeSineOut();
// let moveAct = cc.moveTo(actTime, cc.v2(tempX, tempY)).easing(easeS);
// let fadeInAct = cc.fadeIn(actTime).easing(easeS);
// let scaleAct = cc.scaleTo(actTime / 2, tempS).easing(easeS);
// let rotationAct = cc.rotateTo(actTime / 2, tempR).easing(easeS);
// let call = cc.callFunc(() => {
// this.closeView();
// });
// let spawnMF = cc.spawn(moveAct, fadeInAct);
// let spawnSR = cc.spawn(scaleAct, rotationAct);
// let seq = cc.sequence(spawnMF, spawnSR, call);
// this.closeActNode.runAction(seq);
}
onRollBackBtnClick() {
this.resetAutoPlayButtonState();
this.onRollBackBtnCallback();
}
onRefreshAllStatus() {
this.closeAction();
......@@ -524,19 +484,10 @@ let DatingSceneViewImpl = /** @class */ (() => {
property(Typewriter_1.default)
], DatingSceneViewImpl.prototype, "typewriter", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "rollBackBtn", void 0);
__decorate([
property(cc.Prefab)
], DatingSceneViewImpl.prototype, "chapterBtn", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "scrollViewRootNode", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "contentNode", void 0);
__decorate([
property(cc.Node)
], DatingSceneViewImpl.prototype, "skipButtonNode", void 0);
__decorate([
property(cc.Node)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!