Commit d6e06d51 by 张树文

删除bedroom

1 parent 00056735
Showing with 2 additions and 2600 deletions
This diff could not be displayed because it is too large.
{
"ver": "1.2.7",
"uuid": "9893da49-ed1c-4c88-afe6-6a5ffd8301e6",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -3605,9 +3605,6 @@ ...@@ -3605,9 +3605,6 @@
"titleSprite": { "titleSprite": {
"__id__": 7 "__id__": 7
}, },
"buttonLayout": {
"__id__": 14
},
"tabbarButtons": [ "tabbarButtons": [
{ {
"__id__": 30 "__id__": 30
......
{
"ver": "1.1.2",
"uuid": "d0fd010c-b53c-402d-8cdc-ba1259047c3d",
"isBundle": false,
"bundleName": "",
"priority": 1,
"compressionType": {},
"optimizeHotUpdate": {},
"inlineSpriteFrames": {},
"isRemoteBundle": {},
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "4458bccc-422f-49f9-98d8-f844a1a3e113",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "419a29ab-4d00-4b65-bb28-23d9a5c70ee3",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "e2f2eb57-9f7c-4789-8854-ecb3c2e08cb2",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "95d85a83-cb18-43d4-b03d-29c077d9ae70",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "ed37faca-9207-4ffb-ac9d-332d93df4903",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "c1e50518-50fc-4392-b704-8fa2e9ffcd32",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "93b269d9-b0e4-4643-9169-0b1062cf990a",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "a8737f59-6a1e-4727-9ade-cc421302849a",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.2.7",
"uuid": "17490e5e-c876-437e-9e9a-c6a0b281e91f",
"optimizationPolicy": "AUTO",
"asyncLoadAssets": false,
"readonly": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -19,9 +19,6 @@ import CustomerServiceDataCenter from "../customerService/script/CustomerService ...@@ -19,9 +19,6 @@ import CustomerServiceDataCenter from "../customerService/script/CustomerService
import { EventCenter } from "../cooperation/event/EventCenter"; import { EventCenter } from "../cooperation/event/EventCenter";
import { CompositeDisposable } from "../cooperation/event/EventKit"; import { CompositeDisposable } from "../cooperation/event/EventKit";
import UnlockSpecialPlotEventManager from "./model/UnlockSpecialPlotEventManager"; import UnlockSpecialPlotEventManager from "./model/UnlockSpecialPlotEventManager";
import { UnlockItemModelManager } from "./model/UnlockItemModelManager";
import { UnlockSpecialPlotModelManager } from "./model/UnlockSpecialPlotModelManager";
import { BedRoomCatModelManager } from "./model/BedRoomCatModelManager";
import { initExchangeCode } from "simba-sdk-exchangecode"; import { initExchangeCode } from "simba-sdk-exchangecode";
const { ccclass, property } = cc._decorator; const { ccclass, property } = cc._decorator;
...@@ -257,8 +254,6 @@ export default class Launcher extends cc.Component { ...@@ -257,8 +254,6 @@ export default class Launcher extends cc.Component {
this.loadingNode.active = false; this.loadingNode.active = false;
//检查是否解锁手表次留番外 //检查是否解锁手表次留番外
UnlockSpecialPlotEventManager.getInstance().nextDayUnlockedSpecialPlot(4); UnlockSpecialPlotEventManager.getInstance().nextDayUnlockedSpecialPlot(4);
//进入游戏首先判断是否为第二天并改变相关功能状态
BedRoomCatModelManager.checkIsNextDay();
} }
loginGame = async () => { loginGame = async () => {
......
{
"ver": "1.0.8",
"uuid": "046eb92e-fe2a-4cff-ab74-08d9fad5dca1",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { ResUtils } from "simba-cc-resutils";
import { ConfigManager } from "simba-config-manager";
import { DeepReadonlyObject } from "simba-utils";
import { DummyLabel } from "../../common/CCDummyObjects";
import { GameConstData } from "../../common/gameplay/gamedata/GameConstData";
import { UIManager } from "../../common/gameplay/managers/UIManager";
import { IStoryTbl, storyTbl } from "../../config/StoryTbl";
import { suitConfig } from "../../config/SuitConfig";
import { BedRoomCatModelManager, CatRewardConfigTpye } from "../model/BedRoomCatModelManager";
import { UnlockItemModelManager } from "../model/UnlockItemModelManager";
import { UnlockSpecialPlotModelManager } from "../model/UnlockSpecialPlotModelManager";
import PromptAlertDialogViewPresenter from "./presenter/bedroom/PromptAlertDialogViewPresenter";
import { PromptAlertDialogViewProps } from "./view/type/PromptAlertDialogView";
export enum rewardType {
catFood = 0,
canned,
clothes,
item,
}
export enum CatRewardStatus {
unlock = 0,//未解锁
available,//可领取
received,//已领取
}
export interface rewardSturct {
numberOrId: number,
type: rewardType
}
const { ccclass, property } = cc._decorator;
@ccclass
export default class RewardLevelItem extends cc.Component {
@property({ type: cc.Label, displayName: "Task description labels" })
private taskDescriptionLabel: cc.Label = DummyLabel;
@property({ type: [cc.Node], displayName: "Reward items" })
private rewardItemsNodes: cc.Node[] = [];
@property({ type: [cc.Sprite], displayName: "Reward icons" })
private rewardIcons: cc.Sprite[] = [];
@property({ type: [cc.Label], displayName: "Reward labels" })
private rewardLabels: cc.Label[] = [];
@property({ type: cc.Button, displayName: "Reward button" })
private rewardBtn: cc.Button;
private _itemId: number = -1;
private _catRewardConfigTpye: CatRewardConfigTpye = -1;
private _btnNumber = -1;
private _rewardBtnStatus = -1;
private _rewardSturcts: rewardSturct[] = [];
private _callFunc: () => void;
async setData(catRewardConfigTpye: CatRewardConfigTpye, btnNumber: number, rewardTaskDescription: string, rewardSturcts: rewardSturct[], rewardBtnStatus: CatRewardStatus, callback: () => void) {
this._catRewardConfigTpye = catRewardConfigTpye;
this._btnNumber = btnNumber;
this._rewardSturcts = rewardSturcts;
this._rewardBtnStatus = rewardBtnStatus;
this.taskDescriptionLabel.string = rewardTaskDescription;
this._callFunc = callback;
for (let i = 0; i < rewardSturcts.length; i++) {
let path = "";
let number = "";
switch (rewardSturcts[i].type) {
case rewardType.catFood:
path = GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "catfood";
number = "x" + rewardSturcts[i].numberOrId.toString();
break;
case rewardType.canned:
path = GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "canned";
number = "x" + rewardSturcts[i].numberOrId.toString();
break;
case rewardType.clothes:
path = GameConstData.GAME_CONST_BEDROOMCAT_SUIT_SPR_DIR + rewardSturcts[i].numberOrId;
number = "x1";
break;
case rewardType.item:
//获取番外Id对应的物品Id
let cfg: DeepReadonlyObject<IStoryTbl> | undefined = undefined;
cfg = ConfigManager.getConfig(storyTbl, this._rewardSturcts[i].numberOrId);
if (cfg) {
this._itemId = cfg.itemId;
}
path = GameConstData.GAME_CONST_BEDROOMCAT_ITEM_SPR_DIR + this._itemId;
number = "x1";
break;
default:
break;
}
this.rewardIcons[i].spriteFrame = await ResUtils.loadRes(path, cc.SpriteFrame);
this.rewardLabels[i].string = number;
this.rewardItemsNodes[i].active = true;
}
this.setBtnStatus();
}
async setBtnStatus() {
this.rewardBtn.node.active = true;
if (this._rewardBtnStatus == CatRewardStatus.unlock) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "lockBtn", cc.SpriteFrame);
} else if (this._rewardBtnStatus == CatRewardStatus.available) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "receiveBtn", cc.SpriteFrame);
} else if (this._rewardBtnStatus == CatRewardStatus.received) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "receivedBtn", cc.SpriteFrame);
}
}
onBtnClick() {
if (this._rewardBtnStatus == CatRewardStatus.unlock) {
UIManager.showSceneToast("还未解锁,无法领取哦~");
} else if (this._rewardBtnStatus == CatRewardStatus.available) {
BedRoomCatModelManager.changeCatRewardStatus(this._catRewardConfigTpye, this._btnNumber);
this._rewardBtnStatus = CatRewardStatus.received;
this.setBtnStatus();
for (let i = 0; i < this._rewardSturcts.length; i++) {
switch (this._rewardSturcts[i].type) {
case rewardType.catFood:
BedRoomCatModelManager.addCatFoodNumberByFoodId(1, this._rewardSturcts[i].numberOrId);
break;
case rewardType.canned:
BedRoomCatModelManager.addCatFoodNumberByFoodId(2, this._rewardSturcts[i].numberOrId);
break;
case rewardType.clothes:
let suitConfigs = ConfigManager.getAllConfig(suitConfig);
let suitId: number = -1;
let clothingId = this._rewardSturcts[i].numberOrId;
for (let id in suitConfigs) {
if (suitConfigs[id].clothingId == clothingId) {
suitId = suitConfigs[id].suitId;
}
}
BedRoomCatModelManager.saveUnlockClothingBySuitId(suitId, clothingId);
this.showAlertDialogView(GameConstData.GAME_CONST_BEDROOMCAT_SUIT_SPR_DIR + clothingId, "碎片");
break;
case rewardType.item:
//解锁卧室物品
UnlockItemModelManager.saveItemIdToGameRecord(this._itemId);
//解锁卧室物品的第一个番外
UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(this._rewardSturcts[i].numberOrId);
this.showAlertDialogView(GameConstData.GAME_CONST_BEDROOMCAT_ITEM_SPR_DIR + this._itemId, "物品");
break;
default:
break;
}
}
UIManager.showSceneToast("领取成功~");
} else if (this._rewardBtnStatus == CatRewardStatus.received) {
UIManager.showSceneToast("已经领取过了哦~");
}
if (this._callFunc) {
this._callFunc();
}
}
showAlertDialogView(path: string, name: string) {
let temp: PromptAlertDialogViewProps = {
iconSpritePath: path,
contentLabel: "恭喜您解锁新" + name + "!!!",
};
UIManager.pushPresenter(PromptAlertDialogViewPresenter, temp);
}
getRewardBtnNode(): cc.Node {
return this.rewardBtn.node;
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "3f370921-7ebd-4276-95fc-f638c7b64b3c",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { ResUtils } from "simba-cc-resutils";
import { ConfigManager } from "simba-config-manager";
import { DeepReadonlyObject } from "simba-utils";
import { GameConstData } from "../../common/gameplay/gamedata/GameConstData";
import { UIManager } from "../../common/gameplay/managers/UIManager";
import { IStoryTbl, storyTbl } from "../../config/StoryTbl";
import { suitConfig } from "../../config/SuitConfig";
import { BedRoomCatModelManager, CatRewardConfigTpye } from "../model/BedRoomCatModelManager";
import { UnlockItemModelManager } from "../model/UnlockItemModelManager";
import { UnlockSpecialPlotModelManager } from "../model/UnlockSpecialPlotModelManager";
import PromptAlertDialogViewPresenter from "./presenter/bedroom/PromptAlertDialogViewPresenter";
import { PromptAlertDialogViewProps } from "./view/type/PromptAlertDialogView";
export enum rewardType {
catFood = 0,
canned,
clothes,
item,
}
export enum CatRewardStatus {
unlock = 0,//未解锁
available,//可领取
received,//已领取
}
export interface rewardSturct {
numberOrId: number,
type: rewardType
}
const { ccclass, property } = cc._decorator;
@ccclass
export default class RewardLoginItem extends cc.Component {
@property({ type: [cc.Node], displayName: "Reward items" })
private rewardItemsNodes: cc.Node[] = [];
@property({ type: [cc.Sprite], displayName: "Day numbers" })
private dayNumbers: cc.Sprite[] = [];
@property({ type: [cc.Sprite], displayName: "Reward icons" })
private rewardIcons: cc.Sprite[] = [];
@property({ type: [cc.Label], displayName: "Reward labels" })
private rewardLabels: cc.Label[] = [];
@property({ type: cc.Button, displayName: "Reward button" })
private rewardBtn: cc.Button;
private _itemId: number = -1;
private _catRewardConfigTpye: CatRewardConfigTpye = -1;
private _btnNumber = -1;
private _rewardBtnStatus = -1;
private _rewardSturcts: rewardSturct[] = [];
private _callFunc: () => void;
async setData(catRewardConfigTpye: CatRewardConfigTpye, btnNumber: number, rewardTaskDescription: string, rewardSturcts: rewardSturct[], rewardBtnStatus: CatRewardStatus, callback: () => void) {
this._catRewardConfigTpye = catRewardConfigTpye;
this._btnNumber = btnNumber;
this._rewardSturcts = rewardSturcts;
this._rewardBtnStatus = rewardBtnStatus;
this._callFunc = callback;
if ((btnNumber + 1) < 10) {
this.dayNumbers[0].node.active = false;
this.dayNumbers[1].spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_DAY_SPR_DIR + "day" + (btnNumber + 1), cc.SpriteFrame);
} else {
this.dayNumbers[0].spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_DAY_SPR_DIR + "day" + Math.floor(((btnNumber + 1) / 10)), cc.SpriteFrame);
this.dayNumbers[1].spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_DAY_SPR_DIR + "day" + ((btnNumber + 1) % 10), cc.SpriteFrame);
}
for (let i = 0; i < rewardSturcts.length; i++) {
let path = "";
let number = "";
switch (rewardSturcts[i].type) {
case rewardType.catFood:
path = GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "catfood";
number = "x" + rewardSturcts[i].numberOrId.toString();
break;
case rewardType.canned:
path = GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "canned";
number = "x" + rewardSturcts[i].numberOrId.toString();
break;
case rewardType.clothes:
path = GameConstData.GAME_CONST_BEDROOMCAT_SUIT_SPR_DIR + rewardSturcts[i].numberOrId;
number = "x1";
break;
case rewardType.item:
//获取番外Id对应的物品Id
let cfg: DeepReadonlyObject<IStoryTbl> | undefined = undefined;
cfg = ConfigManager.getConfig(storyTbl, this._rewardSturcts[i].numberOrId);
if (cfg) {
this._itemId = cfg.itemId;
}
path = GameConstData.GAME_CONST_BEDROOMCAT_ITEM_SPR_DIR + this._itemId;
number = "x1";
break;
default:
break;
}
this.rewardIcons[i].spriteFrame = await ResUtils.loadRes(path, cc.SpriteFrame);
this.rewardLabels[i].string = number;
this.rewardItemsNodes[i].active = true;
}
this.setBtnStatus();
}
async setBtnStatus() {
this.rewardBtn.node.active = true;
if (this._rewardBtnStatus == CatRewardStatus.unlock) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "lockBtn", cc.SpriteFrame);
} else if (this._rewardBtnStatus == CatRewardStatus.available) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "receiveBtn", cc.SpriteFrame);
} else if (this._rewardBtnStatus == CatRewardStatus.received) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "receivedBtn", cc.SpriteFrame);
}
}
onBtnClick() {
if (this._rewardBtnStatus == CatRewardStatus.unlock) {
UIManager.showSceneToast("还未解锁,无法领取哦~");
} else if (this._rewardBtnStatus == CatRewardStatus.available) {
BedRoomCatModelManager.changeCatRewardStatus(this._catRewardConfigTpye, this._btnNumber);
this._rewardBtnStatus = CatRewardStatus.received;
this.setBtnStatus();
for (let i = 0; i < this._rewardSturcts.length; i++) {
switch (this._rewardSturcts[i].type) {
case rewardType.catFood:
BedRoomCatModelManager.addCatFoodNumberByFoodId(1, this._rewardSturcts[i].numberOrId);
break;
case rewardType.canned:
BedRoomCatModelManager.addCatFoodNumberByFoodId(2, this._rewardSturcts[i].numberOrId);
break;
case rewardType.clothes:
let suitConfigs = ConfigManager.getAllConfig(suitConfig);
let suitId: number = -1;
let clothingId = this._rewardSturcts[i].numberOrId;
for (let id in suitConfigs) {
if (suitConfigs[id].clothingId == clothingId) {
suitId = suitConfigs[id].suitId;
}
}
BedRoomCatModelManager.saveUnlockClothingBySuitId(suitId, clothingId);
this.showAlertDialogView(GameConstData.GAME_CONST_BEDROOMCAT_SUIT_SPR_DIR + clothingId, "碎片");
break;
case rewardType.item:
//解锁卧室物品
UnlockItemModelManager.saveItemIdToGameRecord(this._itemId);
//解锁卧室物品的第一个番外
UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(this._rewardSturcts[i].numberOrId);
this.showAlertDialogView(GameConstData.GAME_CONST_BEDROOMCAT_ITEM_SPR_DIR + this._itemId, "物品");
break;
default:
break;
}
}
UIManager.showSceneToast("领取成功~");
} else if (this._rewardBtnStatus == CatRewardStatus.received) {
UIManager.showSceneToast("已经领取过了哦~");
}
if (this._callFunc) {
this._callFunc();
}
}
showAlertDialogView(path: string, name: string) {
let temp: PromptAlertDialogViewProps = {
iconSpritePath: path,
contentLabel: "恭喜您解锁新" + name + "!!!",
};
UIManager.pushPresenter(PromptAlertDialogViewPresenter, temp);
}
getRewardBtnNode(): cc.Node {
return this.rewardBtn.node;
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "6231cce6-f477-48a9-9b46-6283983f0bab",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { ResUtils } from "simba-cc-resutils";
import { ConfigManager } from "simba-config-manager";
import { DeepReadonlyObject } from "simba-utils";
import { DummyLabel } from "../../common/CCDummyObjects";
import { GameConstData } from "../../common/gameplay/gamedata/GameConstData";
import { UIManager } from "../../common/gameplay/managers/UIManager";
import { IStoryTbl, storyTbl } from "../../config/StoryTbl";
import { suitConfig } from "../../config/SuitConfig";
import { BedRoomCatModelManager, CatRewardConfigTpye } from "../model/BedRoomCatModelManager";
import { UnlockItemModelManager } from "../model/UnlockItemModelManager";
import { UnlockSpecialPlotModelManager } from "../model/UnlockSpecialPlotModelManager";
import PromptAlertDialogViewPresenter from "./presenter/bedroom/PromptAlertDialogViewPresenter";
import { PromptAlertDialogViewProps } from "./view/type/PromptAlertDialogView";
export enum rewardType {
catFood = 0,
canned,
clothes,
item,
}
export enum CatRewardStatus {
unlock = 0,//未解锁
available,//可领取
received,//已领取
}
export interface rewardSturct {
numberOrId: number,
type: rewardType
}
const { ccclass, property } = cc._decorator;
@ccclass
export default class RewardPlotItem extends cc.Component {
@property({ type: cc.Label, displayName: "Task description labels" })
private taskDescriptionLabel: cc.Label = DummyLabel;
@property({ type: [cc.Node], displayName: "Reward items" })
private rewardItemsNodes: cc.Node[] = [];
@property({ type: [cc.Sprite], displayName: "Reward icons" })
private rewardIcons: cc.Sprite[] = [];
@property({ type: [cc.Label], displayName: "Reward labels" })
private rewardLabels: cc.Label[] = [];
@property({ type: cc.Button, displayName: "Reward button" })
private rewardBtn: cc.Button;
private _itemId: number = -1;
private _catRewardConfigTpye: CatRewardConfigTpye = -1;
private _btnNumber = -1;
private _rewardBtnStatus = -1;
private _rewardSturcts: rewardSturct[] = [];
private _callFunc: () => void;
async setData(catRewardConfigTpye: CatRewardConfigTpye, btnNumber: number, rewardTaskDescription: string, rewardSturcts: rewardSturct[], rewardBtnStatus: CatRewardStatus, callback: () => void) {
this._catRewardConfigTpye = catRewardConfigTpye;
this._btnNumber = btnNumber;
this._rewardSturcts = rewardSturcts;
this._rewardBtnStatus = rewardBtnStatus;
this.taskDescriptionLabel.string = rewardTaskDescription;
this._callFunc = callback;
for (let i = 0; i < rewardSturcts.length; i++) {
let path = "";
let number = "";
switch (rewardSturcts[i].type) {
case rewardType.catFood:
path = GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "catfood";
number = "x" + rewardSturcts[i].numberOrId.toString();
break;
case rewardType.canned:
path = GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "canned";
number = "x" + rewardSturcts[i].numberOrId.toString();
break;
case rewardType.clothes:
path = GameConstData.GAME_CONST_BEDROOMCAT_SUIT_SPR_DIR + rewardSturcts[i].numberOrId;
number = "x1";
break;
case rewardType.item:
//获取番外Id对应的物品Id
let cfg: DeepReadonlyObject<IStoryTbl> | undefined = undefined;
cfg = ConfigManager.getConfig(storyTbl, this._rewardSturcts[i].numberOrId);
if (cfg) {
this._itemId = cfg.itemId;
}
path = GameConstData.GAME_CONST_BEDROOMCAT_ITEM_SPR_DIR + this._itemId;
number = "x1";
break;
default:
break;
}
this.rewardIcons[i].spriteFrame = await ResUtils.loadRes(path, cc.SpriteFrame);
this.rewardLabels[i].string = number;
this.rewardItemsNodes[i].active = true;
}
this.setBtnStatus();
}
async setBtnStatus() {
this.rewardBtn.node.active = true;
if (this._rewardBtnStatus == CatRewardStatus.unlock) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "lockBtn", cc.SpriteFrame);
} else if (this._rewardBtnStatus == CatRewardStatus.available) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "receiveBtn", cc.SpriteFrame);
} else if (this._rewardBtnStatus == CatRewardStatus.received) {
this.rewardBtn.getComponentInChildren(cc.Sprite).spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SPR_DIR + "receivedBtn", cc.SpriteFrame);
}
}
onBtnClick() {
if (this._rewardBtnStatus == CatRewardStatus.unlock) {
UIManager.showSceneToast("还未解锁,无法领取哦~");
} else if (this._rewardBtnStatus == CatRewardStatus.available) {
BedRoomCatModelManager.changeCatRewardStatus(this._catRewardConfigTpye, this._btnNumber);
this._rewardBtnStatus = CatRewardStatus.received;
this.setBtnStatus();
for (let i = 0; i < this._rewardSturcts.length; i++) {
switch (this._rewardSturcts[i].type) {
case rewardType.catFood:
BedRoomCatModelManager.addCatFoodNumberByFoodId(1, this._rewardSturcts[i].numberOrId);
break;
case rewardType.canned:
BedRoomCatModelManager.addCatFoodNumberByFoodId(2, this._rewardSturcts[i].numberOrId);
break;
case rewardType.clothes:
let suitConfigs = ConfigManager.getAllConfig(suitConfig);
let suitId: number = -1;
let clothingId = this._rewardSturcts[i].numberOrId;
for (let id in suitConfigs) {
if (suitConfigs[id].clothingId == clothingId) {
suitId = suitConfigs[id].suitId;
}
}
BedRoomCatModelManager.saveUnlockClothingBySuitId(suitId, clothingId);
this.showAlertDialogView(GameConstData.GAME_CONST_BEDROOMCAT_SUIT_SPR_DIR + clothingId, "碎片");
break;
case rewardType.item:
//解锁卧室物品
UnlockItemModelManager.saveItemIdToGameRecord(this._itemId);
//解锁卧室物品的第一个番外
UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(this._rewardSturcts[i].numberOrId);
this.showAlertDialogView(GameConstData.GAME_CONST_BEDROOMCAT_ITEM_SPR_DIR + this._itemId, "物品");
break;
default:
break;
}
}
UIManager.showSceneToast("领取成功~");
} else if (this._rewardBtnStatus == CatRewardStatus.received) {
UIManager.showSceneToast("已经领取过了哦~");
}
if (this._callFunc) {
this._callFunc();
}
}
showAlertDialogView(path: string, name: string) {
let temp: PromptAlertDialogViewProps = {
iconSpritePath: path,
contentLabel: "恭喜您解锁新" + name + "!!!",
};
UIManager.pushPresenter(PromptAlertDialogViewPresenter, temp);
}
getRewardBtnNode(): cc.Node {
return this.rewardBtn.node;
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "2433e59f-a3cc-4a1d-9fea-2848dbcb784a",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { ResUtils } from "simba-cc-resutils";
import { DummyLabel, DummyNode, DummySprite } from "../../common/CCDummyObjects";
import { GameConstData } from "../../common/gameplay/gamedata/GameConstData";
import { UIManager } from "../../common/gameplay/managers/UIManager";
import { SuitConfig } from "../model/BedRoomCatModelManager";
const { ccclass, property } = cc._decorator;
@ccclass
export default class SuitItem extends cc.Component {
@property({ type: cc.Sprite, displayName: "Icon sprite" })
iconSprite: cc.Sprite = DummySprite;
@property({ type: cc.Label, displayName: "Name label" })
nameLabel: cc.Label = DummyLabel;
@property({ type: cc.Node, displayName: "Lock root node" })
lockRootNode: cc.Node = DummyNode;
@property({ type: cc.Label, displayName: "Unlock condition label" })
unlockConditionLabel: cc.Label = DummyLabel;
private _showLockRootNode: boolean = true;
async setData(suitConfig: SuitConfig, showLockRootNode: boolean) {
this.iconSprite.spriteFrame = await ResUtils.loadRes(GameConstData.GAME_CONST_BEDROOMCAT_SUIT_SPR_DIR + suitConfig.clothingId, cc.SpriteFrame)
this.nameLabel.string = suitConfig.clothingName;
this._showLockRootNode = showLockRootNode;
if (showLockRootNode) {
this.lockRootNode.active = true;
this.unlockConditionLabel.string = suitConfig.unlockCondition;
}
}
onBtnClick() {
if (this._showLockRootNode) {
UIManager.showToast("快去完成任务,领取服装吧!");
return;
}
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "7473711f-e670-4903-b945-fc7d830fdb74",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { DummyNode } from "../../common/CCDummyObjects";
const { ccclass, property } = cc._decorator;
@ccclass
export default class WardrobeViewFix extends cc.Component {
@property({ type: cc.Node, displayName: "Title node" })
titleNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Wardrobe root node" })
wardrobeRootNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Suit tab root node" })
suitTabRootNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Introduction node" })
introductionNode: cc.Node = DummyNode;
onLoad() {
//界面设计尺寸为720*1080
let originalWigth = 720;
let originalHeight = 1080;
let originalProportion = originalHeight / originalWigth;
let actualWidth = cc.winSize.width;
let actualHeight = cc.winSize.height;
let actualProportion = actualHeight / actualWidth;
let titleNodeWidget = this.titleNode.getComponent(cc.Widget);
let suitTabRootNodeWidget = this.suitTabRootNode.getComponent(cc.Widget);
let introductionNodeWidget = this.introductionNode.getComponent(cc.Widget);
if (actualProportion >= 1.9) {
titleNodeWidget.verticalCenter = 590;
titleNodeWidget.updateAlignment();
suitTabRootNodeWidget.verticalCenter = -600;
suitTabRootNodeWidget.updateAlignment();
introductionNodeWidget.top = 200;
introductionNodeWidget.updateAlignment();
}
if (actualProportion <= 1.5) {
titleNodeWidget.verticalCenter = 370;
titleNodeWidget.updateAlignment();
suitTabRootNodeWidget.verticalCenter = -390;
suitTabRootNodeWidget.updateAlignment();
introductionNodeWidget.top = 100;
introductionNodeWidget.updateAlignment();
this.wardrobeRootNode.scale = 0.7;
}
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "04348e54-6f06-4b0b-bd78-51538919d756",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -2,7 +2,6 @@ import { SDK } from "simba-sdk"; ...@@ -2,7 +2,6 @@ import { SDK } from "simba-sdk";
import { GameRecord, PlotManager } from "../../../avg/AVG"; import { GameRecord, PlotManager } from "../../../avg/AVG";
import { Presenter } from "../../../common/classbase/PresenterBase"; import { Presenter } from "../../../common/classbase/PresenterBase";
import { UIManager } from "../../../common/gameplay/managers/UIManager"; import { UIManager } from "../../../common/gameplay/managers/UIManager";
import { BedRoomCatModelManager } from "../../model/BedRoomCatModelManager";
import UnlockSpecialPlotEventManager from "../../model/UnlockSpecialPlotEventManager"; import UnlockSpecialPlotEventManager from "../../model/UnlockSpecialPlotEventManager";
import { UnlockSpecialPlotModelManager } from "../../model/UnlockSpecialPlotModelManager"; import { UnlockSpecialPlotModelManager } from "../../model/UnlockSpecialPlotModelManager";
import { RegPresenter } from "../PresenterCCViewFactory"; import { RegPresenter } from "../PresenterCCViewFactory";
...@@ -22,9 +21,6 @@ export default class DebugViewPresenter extends Presenter<undefined, DebugView>{ ...@@ -22,9 +21,6 @@ export default class DebugViewPresenter extends Presenter<undefined, DebugView>{
onCopyRecordBtnClickCallback: this.onCopyRecordBtnClickCallback, onCopyRecordBtnClickCallback: this.onCopyRecordBtnClickCallback,
onYouHuaBtnClickCallback: this.onYouHuaBtnClickCallback, onYouHuaBtnClickCallback: this.onYouHuaBtnClickCallback,
onShouBiaoBtnClickCallback: this.onShouBiaoBtnClickCallback, onShouBiaoBtnClickCallback: this.onShouBiaoBtnClickCallback,
onCatFoodBtnClickCallback: this.onCatFoodBtnClickCallback,
onCannedBtnClickCallback: this.onCannedBtnClickCallback,
onClearSuitShareRecordBtnClickCallback: this.onClearSuitShareRecordBtnClickCallback,
}; };
} }
...@@ -73,19 +69,4 @@ export default class DebugViewPresenter extends Presenter<undefined, DebugView>{ ...@@ -73,19 +69,4 @@ export default class DebugViewPresenter extends Presenter<undefined, DebugView>{
UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(4); UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(4);
UIManager.showSceneToast("解锁了新的番外,记得去卧室查看哦~"); UIManager.showSceneToast("解锁了新的番外,记得去卧室查看哦~");
} }
onCatFoodBtnClickCallback = (foodNumber: number) => {
BedRoomCatModelManager.setCatFoodNumberByFoodId(1, foodNumber);
UIManager.showSceneToast("修改成功");
}
onCannedBtnClickCallback = (foodNumber: number) => {
BedRoomCatModelManager.setCatFoodNumberByFoodId(2, foodNumber);
UIManager.showSceneToast("修改成功");
}
onClearSuitShareRecordBtnClickCallback = () => {
BedRoomCatModelManager.clearSuitShareRecord();
UIManager.showSceneToast("清除成功");
}
} }
\ No newline at end of file
...@@ -10,7 +10,6 @@ import GameDotMgr from "../../GameDotMgr"; ...@@ -10,7 +10,6 @@ import GameDotMgr from "../../GameDotMgr";
import { SDK } from "simba-sdk"; import { SDK } from "simba-sdk";
import UnlockSpecialPlotEventManager from "../../model/UnlockSpecialPlotEventManager"; import UnlockSpecialPlotEventManager from "../../model/UnlockSpecialPlotEventManager";
import CDKeyEventManager from "../../model/CDKeyEventManager"; import CDKeyEventManager from "../../model/CDKeyEventManager";
import { BedRoomCatModelManager } from "../../model/BedRoomCatModelManager";
import { exchangeCode } from "simba-sdk-exchangecode"; import { exchangeCode } from "simba-sdk-exchangecode";
import { ExchangeErrorCode } from "simba-sdk-exchangecode/dist/ExchangeCodeClassBase"; import { ExchangeErrorCode } from "simba-sdk-exchangecode/dist/ExchangeCodeClassBase";
import { GameConfig } from "../../../GameConfig"; import { GameConfig } from "../../../GameConfig";
...@@ -81,15 +80,6 @@ export default class ExchangeCodeViewPresenter extends Presenter<ExchangeCodePar ...@@ -81,15 +80,6 @@ export default class ExchangeCodeViewPresenter extends Presenter<ExchangeCodePar
} else if (id >= GameConstData.CHANGE_ROLE_LIKE && id < 3000) { } else if (id >= GameConstData.CHANGE_ROLE_LIKE && id < 3000) {
let roleId = id - GameConstData.CHANGE_ROLE_LIKE; let roleId = id - GameConstData.CHANGE_ROLE_LIKE;
CDKeyEventManager.getInstance().changeRoleLike(roleId, count); CDKeyEventManager.getInstance().changeRoleLike(roleId, count);
} else if (id >= GameConstData.ADD_BEDROOMCAT_CATFOOD && id < 4000) {
let foodId = id - GameConstData.ADD_BEDROOMCAT_CATFOOD;
BedRoomCatModelManager.addCatFoodNumberByFoodId(foodId, count);
UIManager.showToast("领取成功!");
} else if (id >= GameConstData.ADD_CLOTHING_ID && id < 5000) {
let suitId = Math.floor((id - GameConstData.ADD_CLOTHING_ID) / 10);
let clothingId = id - GameConstData.ADD_CLOTHING_ID;
BedRoomCatModelManager.saveUnlockClothingBySuitId(suitId, clothingId);
UIManager.showToast("领取成功!");
} }
} }
GameModelManager.UpdatePlayerData.emit(); GameModelManager.UpdatePlayerData.emit();
...@@ -140,15 +130,6 @@ export default class ExchangeCodeViewPresenter extends Presenter<ExchangeCodePar ...@@ -140,15 +130,6 @@ export default class ExchangeCodeViewPresenter extends Presenter<ExchangeCodePar
} else if (id >= GameConstData.CHANGE_ROLE_LIKE && id < 3000) { } else if (id >= GameConstData.CHANGE_ROLE_LIKE && id < 3000) {
let roleId = id - GameConstData.CHANGE_ROLE_LIKE; let roleId = id - GameConstData.CHANGE_ROLE_LIKE;
CDKeyEventManager.getInstance().changeRoleLike(roleId, count); CDKeyEventManager.getInstance().changeRoleLike(roleId, count);
} else if (id >= GameConstData.ADD_BEDROOMCAT_CATFOOD && id < 4000) {
let foodId = id - GameConstData.ADD_BEDROOMCAT_CATFOOD;
BedRoomCatModelManager.addCatFoodNumberByFoodId(foodId, count);
UIManager.showToast("领取成功!");
} else if (id >= GameConstData.ADD_CLOTHING_ID && id < 5000) {
let suitId = Math.floor((id - GameConstData.ADD_CLOTHING_ID) / 10);
let clothingId = id - GameConstData.ADD_CLOTHING_ID;
BedRoomCatModelManager.saveUnlockClothingBySuitId(suitId, clothingId);
UIManager.showToast("领取成功!");
} }
} }
GameModelManager.UpdatePlayerData.emit(); GameModelManager.UpdatePlayerData.emit();
......
...@@ -9,7 +9,6 @@ import { AutoPopViewType, GuideLocation, GuideOperationType, GuideState, MainTab ...@@ -9,7 +9,6 @@ import { AutoPopViewType, GuideLocation, GuideOperationType, GuideState, MainTab
import GameDotMgr from "../../GameDotMgr"; import GameDotMgr from "../../GameDotMgr";
import { DatingEventStatus } from "../../model/DatingEventSceneModel"; import { DatingEventStatus } from "../../model/DatingEventSceneModel";
import { GameModelManager } from "../../model/GameModelManager"; import { GameModelManager } from "../../model/GameModelManager";
import { HttpRequests } from "../../network/HttpRequests";
import { RegPresenter } from "../PresenterCCViewFactory"; import { RegPresenter } from "../PresenterCCViewFactory";
import VerbView from "../VerbView"; import VerbView from "../VerbView";
import { showToBeContinue } from "../view/impl/AlertToBeContinueImpl"; import { showToBeContinue } from "../view/impl/AlertToBeContinueImpl";
...@@ -26,18 +25,10 @@ import { AudioManager } from "simba-cc-audio-manager"; ...@@ -26,18 +25,10 @@ import { AudioManager } from "simba-cc-audio-manager";
import { DeepReadonlyObject } from "simba-utils"; import { DeepReadonlyObject } from "simba-utils";
import { ResUtils } from "simba-cc-resutils"; import { ResUtils } from "simba-cc-resutils";
import { GameConstData } from "../../../common/gameplay/gamedata/GameConstData"; import { GameConstData } from "../../../common/gameplay/gamedata/GameConstData";
import BedroomViewPresenter from "./bedroom/BedroomViewPresenter";
import { UnlockItemModelManager } from "../../model/UnlockItemModelManager"; import { UnlockItemModelManager } from "../../model/UnlockItemModelManager";
import { IItemTbl, itemTbl } from "../../../config/ItemTbl"; import { IItemTbl, itemTbl } from "../../../config/ItemTbl";
import { channel, GameConfig } from "../../../GameConfig"; import { channel, GameConfig } from "../../../GameConfig";
import GameCenter from "../../../cooperation/script/GameCenter";
import { HttpClient } from "simba-httpclient"; import { HttpClient } from "simba-httpclient";
import { BedroomCatRewardViewProps } from "../view/type/BedroomCatRewardView";
import BedroomCatRewardViewPresenter from "./bedroom/BedroomCatRewardViewPresenter";
import { BedRoomCatModelManager } from "../../model/BedRoomCatModelManager";
import { PromptAlertDialogViewProps } from "../view/type/PromptAlertDialogView";
import PromptAlertDialogViewPresenter from "./bedroom/PromptAlertDialogViewPresenter";
import { UnlockSpecialPlotModelManager } from "../../model/UnlockSpecialPlotModelManager";
import { DateType, PageIndex } from "../../../avg/EditorEnums"; import { DateType, PageIndex } from "../../../avg/EditorEnums";
import NewNoticeViewPresenter from "./notice/NewNoticeViewPresenter"; import NewNoticeViewPresenter from "./notice/NewNoticeViewPresenter";
import { SourceView } from "../view/type/notice/NewNoticeView"; import { SourceView } from "../view/type/notice/NewNoticeView";
...@@ -119,14 +110,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> { ...@@ -119,14 +110,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> {
} }
} }
onRewardBtnClickCallback = () => {
let temp: BedroomCatRewardViewProps = {
onClickTabbarBtn: () => { },
onCloseBtnClick: () => { },
};
UIManager.pushPresenter(BedroomCatRewardViewPresenter, temp);
}
checkRedDot = (plots: ReadonlyPlots) => { checkRedDot = (plots: ReadonlyPlots) => {
this._viewProps.messageRedDot = plots[MAIN_PLOT_INDEX].plotSceneType === PlotSceneType.Message || plots[MAIN_PLOT_INDEX].plotSceneType === PlotSceneType.PhoneCall; this._viewProps.messageRedDot = plots[MAIN_PLOT_INDEX].plotSceneType === PlotSceneType.Message || plots[MAIN_PLOT_INDEX].plotSceneType === PlotSceneType.PhoneCall;
this._viewProps.datingEventRedDot = false; this._viewProps.datingEventRedDot = false;
...@@ -192,22 +175,15 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> { ...@@ -192,22 +175,15 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> {
//开始弹起自动窗口 //开始弹起自动窗口
if (PlotManager.getCurrentPlots()[MAIN_PLOT_INDEX].id === SpecialPlotId.ToBeContinued) { if (PlotManager.getCurrentPlots()[MAIN_PLOT_INDEX].id === SpecialPlotId.ToBeContinued) {
GameModelManager.registerAutoPopView(AutoPopViewType.ToBeContinued); GameModelManager.registerAutoPopView(AutoPopViewType.ToBeContinued);
} else if (this.checkNoviceTutorialOver()) {
// GameModelManager.registerAutoPopView(AutoPopViewType.Notice);
} }
let autoShowNotice = GameModelManager.getAutoShowNotice(); let autoShowNotice = GameModelManager.getAutoShowNotice();
if (autoShowNotice) { if (autoShowNotice) {
GameModelManager.registerAutoPopView(AutoPopViewType.Notice); GameModelManager.registerAutoPopView(AutoPopViewType.Notice);
} }
// GameModelManager.registerAutoPopView(AutoPopViewType.RewardView);
let unlockItems = UnlockItemModelManager.unlockItems; let unlockItems = UnlockItemModelManager.unlockItems;
if (unlockItems.indexOf(4) == -1) { if (unlockItems.indexOf(4) == -1) {
GameModelManager.registerAutoPopView(AutoPopViewType.NoteBook); GameModelManager.registerAutoPopView(AutoPopViewType.NoteBook);
} }
// let autoShowUrgentNotice = GameModelManager.getUrgentNoticeInfo().autoShow;
// if (autoShowUrgentNotice) {
// GameModelManager.registerAutoPopView(AutoPopViewType.UrgentNotice);
// }
if (!needEnterSpecialDatingScene) { if (!needEnterSpecialDatingScene) {
let hasGuide = GameModelManager.checkHasGuide(); let hasGuide = GameModelManager.checkHasGuide();
if (!hasGuide) { if (!hasGuide) {
...@@ -403,24 +379,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> { ...@@ -403,24 +379,6 @@ export default class MainViewPresenter extends Presenter<undefined, MainView> {
UIManager.pushPresenter(NewNoticeViewPresenter, SourceView.MessageView); UIManager.pushPresenter(NewNoticeViewPresenter, SourceView.MessageView);
} }
break; break;
case AutoPopViewType.RewardView:
{
await this.onRewardBtnClickCallback();
}
break;
case AutoPopViewType.NoteBook:
{
let temp: PromptAlertDialogViewProps = {
iconSpritePath: GameConstData.GAME_CONST_BEDROOMCAT_ITEM_SPR_DIR + 4,
contentLabel: "恭喜您获得新物品:日记本,快去卧室查看吧!",
};
UIManager.pushPresenter(PromptAlertDialogViewPresenter, temp);
setTimeout(() => {
UnlockItemModelManager.saveItemIdToGameRecord(4);
UnlockSpecialPlotModelManager.saveUnlockedSpecialPlotIdByItemIdToGameRecord(5);
}, 3000);
}
break;
case AutoPopViewType.UrgentNotice: case AutoPopViewType.UrgentNotice:
{ {
UIManager.pushPresenter(UrgentNoticeViewPresenter, undefined); UIManager.pushPresenter(UrgentNoticeViewPresenter, undefined);
......
import { Presenter } from "../../../../common/classbase/PresenterBase";
import { BedRoomCatModelManager, CatRewardConfigTpye } from "../../../model/BedRoomCatModelManager";
import { GameModelManager } from "../../../model/GameModelManager";
import { RegPresenter } from "../../PresenterCCViewFactory";
import RewardLevelItem from "../../RewardLevelItem";
import RewardLoginItem, { rewardSturct, rewardType } from "../../RewardLoginItem";
import RewardPlotItem from "../../RewardPlotItem";
import { BedroomCatRewardViewType, BedroomCatRewardViewProps, BedroomCatRewardView } from "../../view/type/BedroomCatRewardView";
@RegPresenter(BedroomCatRewardViewType)
export default class BedroomCatRewardViewPresenter extends Presenter<BedroomCatRewardViewProps, BedroomCatRewardView>{
static uuid = "BedroomCatRewardViewPresenter";
private _viewProps: BedroomCatRewardViewProps;
private _titleLabel: string[] = [
"记得每天来看看哦~",
"饭统碗里没有粮啦!点击碗即可喂食哦~",
"解锁章节会获取相应的奖励哦~",
"",
];
constructor() {
super();
}
onOpen(props: BedroomCatRewardViewProps) {
super.onOpen(props);
this._viewProps = props;
this._viewProps.onClickTabbarBtn = this.onClickTabbarBtn;
this._viewProps.onCloseBtnClick = this.onCloseBtnClick;
this.view.setProps(this._viewProps);
this.onShow();
}
onShow() {
super.onShow();
//进入奖励界面初始化奖励的状态
BedRoomCatModelManager.initCatRewardStatus();
this.onClickTabbarBtn(1);
}
onClose() {
super.onClose();
}
onEnterBackground() {
super.onEnterBackground();
}
onEnterForeground() {
super.onEnterForeground();
this.updateRedDot();
}
updateRedDot() {
for (let i = 1; i < 4; i++) {
let catRewardStatus = BedRoomCatModelManager.getCatRewardStatus(i);
for (let j = 0; j < catRewardStatus.length; j++) {
if (catRewardStatus[j] == 1) {
this.view.getRedDotNodes()[i - 1].active = true;
break;
} else {
this.view.getRedDotNodes()[i - 1].active = false;
}
}
}
}
CreateOrUpdateRewardItem(tabbarId: number) {
this.view.getScrollViewContentNode().removeAllChildren();
let cfg = BedRoomCatModelManager.getCatRewardConfigByConfigType(tabbarId);
let catRewardStatus = BedRoomCatModelManager.getCatRewardStatus(tabbarId);
let rewardSturcts: rewardSturct[] = [];
for (let i = 0; i < cfg.length; ++i) {
if (cfg[i].rewardTpye !== tabbarId) {
continue;
}
if (cfg[i].catFoodNumber !== 0 && cfg[i].catFoodNumber) {
rewardSturcts.push({ numberOrId: cfg[i].catFoodNumber, type: rewardType.catFood });
}
if (cfg[i].cannedNumber !== 0 && cfg[i].cannedNumber) {
rewardSturcts.push({ numberOrId: cfg[i].cannedNumber, type: rewardType.canned });
}
if (cfg[i].clothedId !== 0 && cfg[i].clothedId) {
rewardSturcts.push({ numberOrId: cfg[i].clothedId, type: rewardType.clothes });
}
if (cfg[i].specialPlotId !== 0 && cfg[i].specialPlotId) {
rewardSturcts.push({ numberOrId: cfg[i].specialPlotId!, type: rewardType.item });
}
let btn = cc.instantiate(this.view.getRewardItemPrefabs()[tabbarId - 1]);
let callback = () => {
this.updateRedDot();
}
if (tabbarId == CatRewardConfigTpye.CatLoginRewardConfig) {
btn.getComponent(RewardLoginItem).setData(cfg[i].rewardTpye, i, cfg[i].rewardTaskDescription, rewardSturcts, catRewardStatus[i], callback);
} else if (tabbarId == CatRewardConfigTpye.CatLevelRewardConfig) {
btn.getComponent(RewardLevelItem).setData(cfg[i].rewardTpye, i, cfg[i].rewardTaskDescription, rewardSturcts, catRewardStatus[i], callback);
} else if (tabbarId == CatRewardConfigTpye.CatPlotRewardConfig) {
btn.getComponent(RewardPlotItem).setData(cfg[i].rewardTpye, i, cfg[i].rewardTaskDescription, rewardSturcts, catRewardStatus[i], callback);
}
btn.parent = this.view.getScrollViewContentNode();
rewardSturcts = [];
}
this.view.getScrollView().scrollToTop();
}
onClickTabbarBtn = (tabbarId: number) => {
for (let i = 0; i < this.view.getTabbarButtons().length; i++) {
if (i == tabbarId - 1) {
this.view.getTabbarButtons()[i].getComponentInChildren(cc.Sprite).spriteFrame = this.view.getTabbarSpriteFrames()[0];
} else {
this.view.getTabbarButtons()[i].getComponentInChildren(cc.Sprite).spriteFrame = undefined as unknown as cc.SpriteFrame;
}
}
this.view.getRewardPanelTitleSprite().spriteFrame = this.view.getRewardPanelTitleSpriteFrames()[tabbarId - 1];
this.view.getRewardPanelTitleLabel().string = this._titleLabel[tabbarId - 1];
this.CreateOrUpdateRewardItem(tabbarId);
if (tabbarId <= CatRewardConfigTpye.CatPlotRewardConfig) {
this.view.getWelfareNode().active = false;
this.view.getRewardPanelNode().active = true;
} else {
this.view.getWelfareNode().active = true;
this.view.getRewardPanelNode().active = false;
}
this.updateRedDot();
}
onCloseBtnClick = () => {
this.view.close();
GameModelManager.BackToBedRoom.emit();
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "5dc5096b-b65d-4f44-b3f2-89a3ab114742",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "df6055e1-c80d-4d83-b760-16b5cdafb962",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { ResUtils } from "simba-cc-resutils";
import { Presenter } from "../../../../common/classbase/PresenterBase";
import { RegPresenter } from "../../PresenterCCViewFactory";
import { PromptAlertDialogViewType, PromptAlertDialogViewProps, PromptAlertDialogView } from "../../view/type/PromptAlertDialogView";
@RegPresenter(PromptAlertDialogViewType)
export default class PromptAlertDialogViewPresenter extends Presenter<PromptAlertDialogViewProps, PromptAlertDialogView>{
static uuid = "PromptAlertDialogView";
private _viewProps: PromptAlertDialogViewProps;
constructor() {
super();
}
onOpen(props: PromptAlertDialogViewProps) {
super.onOpen(props);
this._viewProps = props;
this.view.setProps(this._viewProps);
this.onShow();
}
onShow() {
super.onShow();
this.setPromptConfig();
}
async setPromptConfig() {
this.view.getIconSprite().spriteFrame = await ResUtils.loadRes(this._viewProps.iconSpritePath, cc.SpriteFrame);
this.view.getContentLable().string = this._viewProps.contentLabel;
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "924d3d62-027f-485b-b7dd-801a6806dc3d",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { ResUtils } from "simba-cc-resutils";
import CCWechatScreenShotMgr from "../../../../common/CCWechatScreenShotMgr";
import { Presenter } from "../../../../common/classbase/PresenterBase";
import { UIManager } from "../../../../common/gameplay/managers/UIManager";
import { RegPresenter } from "../../PresenterCCViewFactory";
import { ShareSuitViewType, ShareSuitViewProps, ShareSuitView } from "../../view/type/ShareSuitView";
@RegPresenter(ShareSuitViewType)
export default class ShareSuitViewPresenter extends Presenter<ShareSuitViewProps, ShareSuitView>{
static uuid = "ShareSuitViewPresenter";
private _viewProps: ShareSuitViewProps;
private _onShow: boolean = false;
constructor() {
super();
}
onOpen(props: ShareSuitViewProps) {
super.onOpen(props);
this._viewProps = props;
this._viewProps.bgSpritePath = props.bgSpritePath;
this._viewProps.rolePortraitSpritePath = props.rolePortraitSpritePath;
this._viewProps.onCloseBtnClickCallback = this.onCloseBtnClickCallback;
this.view.setProps(this._viewProps);
this.onShow();
}
onShow() {
super.onShow();
this.showShareSuitRolePortrait();
}
onClose() {
super.onClose();
}
onEnterBackground() {
super.onEnterBackground();
}
onEnterForeground() {
super.onEnterForeground();
}
async showShareSuitRolePortrait() {
this._onShow = true;
this.view.getShareSuitViewBgSprite().spriteFrame = await ResUtils.loadRes(this._viewProps.bgSpritePath, cc.SpriteFrame);
this.view.getShareSuitViewRolePortraitSprite().spriteFrame = await ResUtils.loadRes(this._viewProps.rolePortraitSpritePath, cc.SpriteFrame);
let shareNode = this.view.getShareNode();
let shareNodeWorldSpace = shareNode.convertToWorldSpaceAR(cc.v2(0, 0));
CCWechatScreenShotMgr.getInstance().doShot(shareNodeWorldSpace, shareNode.width, shareNode.height,
() => { // successCallback
// 延迟2s退出
cc.tween(this.view.getViewNode()).delay(2).call(() => {
this.onCloseBtnClickCallback();
this._viewProps.shareSuitViewCallback(true);
console.log('ShowShareSuitRolePortrait successCallback');
}).start();
},
(): boolean => { // successCheckCallback
console.log('ShowShareSuitRolePortrait successCheckCallback: ', this._onShow);
return this._onShow;
},
() => { // shareFailCallback
console.log('ShowShareSuitRolePortrait shareFailCallback');
this._viewProps.shareSuitViewCallback(false);
UIManager.showSceneToast("自动截图失败,请升级微信哦~");
this.onCloseBtnClickCallback();
},
() => { // failCallback
console.log('ShowShareSuitRolePortrait failCallback');
this._viewProps.shareSuitViewCallback(false);
UIManager.showSceneToast("自动截图失败,请稍后重试哦~");
this.onCloseBtnClickCallback();
},
() => { // completeCallback
console.log('ShowShareSuitRolePortrait completeCallback');
}
);
// CCWechatScreenShotMgr.getInstance().shotFullScreen(
// () => { // successCallback
// // 延迟2s退出
// cc.tween(this.view.getViewNode()).delay(2).call(() => {
// this.onCloseBtnClickCallback();
// this._viewProps.shareSuitViewCallback(true);
// console.log('ShowShareSuitRolePortrait successCallback');
// }).start();
// },
// (): boolean => { // successCheckCallback
// console.log('ShowShareSuitRolePortrait successCheckCallback: ', this._onShow);
// return this._onShow;
// },
// () => { // shareFailCallback
// console.log('ShowShareSuitRolePortrait shareFailCallback');
// this._viewProps.shareSuitViewCallback(false);
// UIManager.showSceneToast("自动截图失败,请升级微信哦~");
// this.onCloseBtnClickCallback();
// },
// () => { // failCallback
// console.log('ShowShareSuitRolePortrait failCallback');
// this._viewProps.shareSuitViewCallback(false);
// UIManager.showSceneToast("自动截图失败,请稍后重试哦~");
// this.onCloseBtnClickCallback();
// },
// () => { // completeCallback
// console.log('ShowShareSuitRolePortrait completeCallback');
// }
// );
}
onCloseBtnClickCallback = () => {
this.view.close();
this._onShow = false;
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "a189260d-2ae1-4d3c-84c0-e82878c15294",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "c2dfdd08-ee66-4a46-8bd8-b1e6e3d2a190",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -10,11 +10,8 @@ import { GameConstData } from "../../../../common/gameplay/gamedata/GameConstDat ...@@ -10,11 +10,8 @@ import { GameConstData } from "../../../../common/gameplay/gamedata/GameConstDat
import { SVPoint } from "simba-sdk/dist/SDKTypes"; import { SVPoint } from "simba-sdk/dist/SDKTypes";
import { DeepReadonly } from "simba-utils"; import { DeepReadonly } from "simba-utils";
import { GetRewardType } from "../../../../common/gameplay/gamedata/GameEnumData"; import { GetRewardType } from "../../../../common/gameplay/gamedata/GameEnumData";
import GameCenter from "../../../../cooperation/script/GameCenter";
import { channel, GameConfig } from "../../../../GameConfig"; import { channel, GameConfig } from "../../../../GameConfig";
import { UIManager } from "../../../../common/gameplay/managers/UIManager"; import { UIManager } from "../../../../common/gameplay/managers/UIManager";
import ShareSuitViewPresenter from "../../presenter/bedroom/ShareSuitViewPresenter";
import { ShareSuitViewProps } from "../type/ShareSuitView";
import { GameModelManager } from "../../../model/GameModelManager"; import { GameModelManager } from "../../../model/GameModelManager";
...@@ -172,16 +169,7 @@ export default class AlertDialogViewImpl extends CCPureView<AlertDialogViewProps ...@@ -172,16 +169,7 @@ export default class AlertDialogViewImpl extends CCPureView<AlertDialogViewProps
} }
onShareScreenClickCallback(event) { onShareScreenClickCallback(event) {
let temp: ShareSuitViewProps = {
bgSpritePath: this._props.dataptr.bgPath,
rolePortraitSpritePath: this._props.dataptr.rolePath,
shareSuitViewCallback: (result) => {
this._props.callback("", result, this._props.dataptr);
this.closeView();
},
onCloseBtnClickCallback: () => { }
};
UIManager.pushPresenter(ShareSuitViewPresenter, temp);
} }
onADBtnClick() { onADBtnClick() {
......
...@@ -5,7 +5,6 @@ import { CCPureView, CCView } from "../../../../common/classbase/CCViewBase"; ...@@ -5,7 +5,6 @@ import { CCPureView, CCView } from "../../../../common/classbase/CCViewBase";
import { NodePoolFactory } from "../../../../common/utils/NodePoolFactory"; import { NodePoolFactory } from "../../../../common/utils/NodePoolFactory";
import { GameConfig } from "../../../../GameConfig"; import { GameConfig } from "../../../../GameConfig";
import { DirectionType } from "../../../Enums"; import { DirectionType } from "../../../Enums";
import { BedRoomCatModelManager } from "../../../model/BedRoomCatModelManager";
import { GuideViewParamModel } from "../../presenter/GuideViewPresenter"; import { GuideViewParamModel } from "../../presenter/GuideViewPresenter";
import { RegView } from "../../PresenterCCViewFactory"; import { RegView } from "../../PresenterCCViewFactory";
import { ChatListAutoNextPlot, ChatListItemProps, ChatListView, ChatListViewProps, ChatListViewType } from "../type/ChatListView"; import { ChatListAutoNextPlot, ChatListItemProps, ChatListView, ChatListViewProps, ChatListViewType } from "../type/ChatListView";
...@@ -48,8 +47,6 @@ export class ChatListViewImpl extends CCPureView<ChatListViewProps> implements C ...@@ -48,8 +47,6 @@ export class ChatListViewImpl extends CCPureView<ChatListViewProps> implements C
onCloseBtnClick() { onCloseBtnClick() {
GameConfig.isVerb = false; GameConfig.isVerb = false;
//再次初始化奖励状态
BedRoomCatModelManager.initCatRewardStatus();
this.closeAction(); this.closeAction();
} }
......
import { DummyLabel, DummyNode, DummyRichText, DummyScrollView, DummySprite } from "../../../../../common/CCDummyObjects";
import { CCPureView } from "../../../../../common/classbase/CCViewBase";
import Typewriter from "../../../../../common/components/Typewriter";
import { RegView } from "../../../PresenterCCViewFactory";
import { BedroomCatRewardView, BedroomCatRewardViewProps, BedroomCatRewardViewType } from "../../type/BedroomCatRewardView";
const { ccclass, property } = cc._decorator;
@ccclass
@RegView(BedroomCatRewardViewType, "prefab/ui/bedroomCat/BedroomCatRewardView")
export class BedroomCatRewardViewImpl extends CCPureView<BedroomCatRewardViewProps> implements BedroomCatRewardView {
@property(cc.Sprite)
private rewardPanelTitleSprite: cc.Sprite = DummySprite;
@property({ type: [cc.SpriteFrame], displayName: "Reward panel title spriteFrames" })
private rewardPanelTitleSpriteFrames: cc.SpriteFrame[] = [];
@property(cc.Label)
private rewardPanelTitleLabel: cc.Label = DummyLabel;
@property(cc.Node)
private rewardPanelNode = DummyNode;
@property(cc.ScrollView)
private scrollView = DummyScrollView;
@property(cc.Node)
private contentNode = DummyNode;
@property({ type: [cc.Prefab], displayName: "Reward item prefabs" })
private rewardItemPrefabs: cc.Prefab[] = [];
@property(cc.Node)
private welfareNode = DummyNode;
@property({ type: [cc.Button], displayName: "Tabbar Buttons" })
private tabbarButtons: cc.Button[] = [];
@property({ type: [cc.SpriteFrame], displayName: "Tabbar Spriteframes" })
private tabbarSpriteFrames: cc.SpriteFrame[] = [];
@property({ type: [cc.Node], displayName: "RedDot nodes" })
private redDotNodes: cc.Node[] = [];
@property({ type: cc.Node, displayName: "Close tip label node" })
private closeTipLabelNode: cc.Node = DummyNode;
getThisViewNode() {
return this.node;
}
getRewardPanelTitleSprite(): cc.Sprite {
return this.rewardPanelTitleSprite;
}
getRewardPanelTitleSpriteFrames(): cc.SpriteFrame[] {
return this.rewardPanelTitleSpriteFrames;
}
getRewardPanelTitleLabel(): cc.Label {
return this.rewardPanelTitleLabel;
}
getRewardPanelNode(): cc.Node {
return this.rewardPanelNode;
}
getScrollView(): cc.ScrollView {
return this.scrollView;
}
getScrollViewContentNode(): cc.Node {
return this.contentNode;
}
getRewardItemPrefabs(): cc.Prefab[] {
return this.rewardItemPrefabs;
}
getWelfareNode(): cc.Node {
return this.welfareNode;
}
getTabbarButtons(): cc.Button[] {
return this.tabbarButtons;
}
getTabbarSpriteFrames(): cc.SpriteFrame[] {
return this.tabbarSpriteFrames;
}
getRedDotNodes(): cc.Node[] {
return this.redDotNodes;
}
getCloseTipLabelNode(): cc.Node {
return this.closeTipLabelNode;
}
onClickTabbarBtn(event, customEventData) {
let tabbarId = Number(customEventData);
this._props.onClickTabbarBtn(tabbarId);
}
onCloseClickCallBack() {
this._props.onCloseBtnClick();
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "3315a756-b4db-47b8-9c48-b5dfd093e1af",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { DummyLabel, DummyNode, DummyProgressBar, DummyRichText, DummySprite } from "../../../../../common/CCDummyObjects";
import { CCPureView } from "../../../../../common/classbase/CCViewBase";
import Typewriter from "../../../../../common/components/Typewriter";
import { RegView } from "../../../PresenterCCViewFactory";
import { BedroomView, BedroomViewProps, BedroomViewType } from "../../type/BedroomView";
const { ccclass, property } = cc._decorator;
@ccclass
@RegView(BedroomViewType, "prefab/ui/BedroomView")
export class BedroomViewImpl extends CCPureView<BedroomViewProps> implements BedroomView {
@property({ type: [cc.Node], displayName: "Item Nodes" })
itemNodes: cc.Node[] = [];
@property({ type: [cc.Node], displayName: "Top button root nodes" })
topBtnRootNodes: cc.Node[] = [];
@property({ type: [cc.Node], displayName: "Top button Nodes" })
topBtnNodes: cc.Node[] = [];
@property({ type: [cc.Label], displayName: "Top button number labels" })
topBtnNumberLabels: cc.Label[] = [];
@property({ type: [cc.Node], displayName: "Introduction Nodes" })
introductionNodes: cc.Node[] = [];
@property({ type: [cc.Sprite], displayName: "Introduction icons" })
introductionIcons: cc.Sprite[] = [];
@property({ type: [cc.Label], displayName: "Introduction name labels" })
introductionNameLabels: cc.Label[] = [];
@property({ type: [cc.Label], displayName: "Introduction labels" })
introductionLabels: cc.Label[] = [];
@property({ type: cc.Node, displayName: "Cat button skeleton node" })
catButtonSkeletonNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Cat bubble node" })
catBubbleNode: cc.Node = DummyNode;
@property({ type: cc.Label, displayName: "Cat bubble Label" })
catBubbleLabel: cc.Label = DummyLabel;
@property({ type: cc.Node, displayName: "Cat level label" })
catFeedRootNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Cat blow button node" })
catBlowBtnNode: cc.Node = DummyNode;
@property({ type: [cc.Node], displayName: "Feed button Nodes" })
foodBtnNodes: cc.Node[] = [];
@property({ type: [cc.Label], displayName: "Food number labels" })
foodNumberLabels: cc.Label[] = [];
@property({ type: cc.Label, displayName: "Cat level label" })
catLevelLabel: cc.Label = DummyLabel;
@property({ type: cc.Label, displayName: "Cat exp label" })
catExpLabel: cc.Label = DummyLabel;
@property({ type: cc.ProgressBar, displayName: "Cat exp progressBar" })
catExpProgressBar: cc.ProgressBar = DummyProgressBar;
@property({ type: cc.Node, displayName: "Reward button node" })
rewardBtnNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Reward reddot node" })
rewardRedDotNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Wardrobe button node" })
wardrobeBtnNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Wardrobe reddot node" })
wardrobeRedDotNode: cc.Node = DummyNode;
@property({ type: [cc.SpriteFrame], displayName: "Background spriteFrames" })
backgroundSpriteFrames: cc.SpriteFrame[] = [];
@property({ type: cc.Sprite, displayName: "Background sprite" })
background: cc.Sprite = DummySprite;
@property({ type: [cc.SpriteFrame], displayName: "ChangeBg spriteFrames" })
changeBgSpriteFrames: cc.SpriteFrame[] = [];
@property({ type: cc.Sprite, displayName: "ChangeBackground sprite" })
changeBackground: cc.Sprite = DummySprite;
getThisNode(): cc.Node {
return this.node;
}
getItemNodes(): cc.Node[] {
return this.itemNodes;
}
getTopBtnRootNodes(): cc.Node[] {
return this.topBtnRootNodes;
}
getTopBtnNodes(): cc.Node[] {
return this.topBtnNodes;
}
getTopBtnNumberLabels(): cc.Label[] {
return this.topBtnNumberLabels;
}
getIntroductionNodes(): cc.Node[] {
return this.introductionNodes;
}
getIntroductionIcons(): cc.Sprite[] {
return this.introductionIcons;
}
getIntroductionNameLabels(): cc.Label[] {
return this.introductionNameLabels;
}
getIntroductionLabels(): cc.Label[] {
return this.introductionLabels;
}
getCatButtonSkeletonNode(): cc.Node {
return this.catButtonSkeletonNode;
}
getCatBubbleNode(): cc.Node {
return this.catBubbleNode;
}
getCatBubbleLabel(): cc.Label {
return this.catBubbleLabel;
}
getCatFeedRootNode(): cc.Node {
return this.catFeedRootNode;
}
getCatBlowBtnNode(): cc.Node {
return this.catBlowBtnNode;
}
getFoodBtnNodes(): cc.Node[] {
return this.foodBtnNodes;
}
getFoodNumberLabels(): cc.Label[] {
return this.foodNumberLabels;
}
getCatLevelLabel(): cc.Label {
return this.catLevelLabel;
}
getCatExpLabel(): cc.Label {
return this.catExpLabel;
}
getCatExpProgressBar(): cc.ProgressBar {
return this.catExpProgressBar;
}
getRewardBtnNode(): cc.Node {
return this.rewardBtnNode;
}
getRewardRedDotNode(): cc.Node {
return this.rewardRedDotNode;
}
getWardrobeBtnNode(): cc.Node {
return this.wardrobeBtnNode;
}
getWardrobeRedDotNode(): cc.Node {
return this.wardrobeRedDotNode;
}
getBackgroundSpriteFrames(): cc.SpriteFrame[] {
return this.backgroundSpriteFrames;
}
getBackground(): cc.Sprite {
return this.background;
}
getChangeBgSpriteFrames(): cc.SpriteFrame[] {
return this.changeBgSpriteFrames;
}
getChangeBackground(): cc.Sprite {
return this.changeBackground;
}
onClickItem(event, customEventData) {
let itemId = Number(customEventData);
this._props.onClickItem(itemId);
}
onBackBtnClickCallBack() {
this._props.onBackBtnClickCallBack();
}
onClickTopAddBtn(event, customEventData) {
let foodId = Number(customEventData);
this._props.onClickTopAddBtn(foodId);
}
onClickRewardBtn() {
this._props.onRewardBtnClickCallBack();
}
onClickWardrobeBtn() {
this._props.onWardrobeBtnClickCallBack();
}
onClickCatButton() {
this._props.onCatBtnClickCallBack();
}
onClickBowlBtn() {
this._props.onBowlBtnClickCallBack();
}
onClickFoodBtn(event, customEventData) {
let foodId = Number(customEventData);
this._props.onFoodBtnClickCallBack(foodId);
}
onClickFeedCloseBtn() {
this._props.onFeedCloseBtnClickCallBack();
}
onClickChangeBackgroundBtn() {
this._props.onChangeBackgroundBtnClickCallBack();
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "b90ae014-bbbe-4032-9724-94b8e772872f",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { DummyLabel, DummyRichText, DummyNode, DummyButton, DummySprite } from "../../../../../common/CCDummyObjects";
import { CCPureView } from "../../../../../common/classbase/CCViewBase";
import { RegView } from "../../../PresenterCCViewFactory";
import { PromptAlertDialogViewProps, PromptAlertDialogView, PromptAlertDialogViewType } from "../../type/PromptAlertDialogView";
const { ccclass, property } = cc._decorator;
@ccclass
@RegView(PromptAlertDialogViewType, "prefab/ui/bedroomCat/PromptAlertDialogView")
export default class PromptAlertDialogViewImpl extends CCPureView<PromptAlertDialogViewProps> implements PromptAlertDialogView {
@property(cc.Sprite)
iconSprite: cc.Sprite = DummySprite;
@property(cc.RichText)
contentLabel: cc.RichText = DummyRichText;
getIconSprite(): cc.Sprite {
return this.iconSprite;
}
getContentLable(): cc.RichText {
return this.contentLabel
}
onOkBtnClick() {
this.close();
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "1aaf7fb6-fdcb-4468-99e5-44dee21f1d08",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { DummyNode, DummySprite } from "../../../../../common/CCDummyObjects";
import { CCPureView } from "../../../../../common/classbase/CCViewBase";
import { RegView } from "../../../PresenterCCViewFactory";
import { ShareSuitView, ShareSuitViewProps, ShareSuitViewType } from "../../type/ShareSuitView";
const { ccclass, property } = cc._decorator;
@ccclass
@RegView(ShareSuitViewType, "prefab/ui/bedroomCat/ShareSuitView")
export class ShareSuitViewImpl extends CCPureView<ShareSuitViewProps> implements ShareSuitView {
@property({ type: cc.Node, displayName: "ShareSuitView share node" })
shareNode: cc.Node = DummyNode;
@property({ type: cc.Sprite, displayName: "ShareSuitView background sprite" })
shareSuitViewBgSprite: cc.Sprite = DummySprite;
@property({ type: cc.Sprite, displayName: "ShareSuitViewRolePortrait sprite" })
shareSuitViewRolePortraitSprite: cc.Sprite = DummySprite;
getViewNode(): cc.Node {
return this.node;
}
getShareNode(): cc.Node {
return this.shareNode;
}
getShareSuitViewBgSprite(): cc.Sprite {
return this.shareSuitViewBgSprite;
}
getShareSuitViewRolePortraitSprite(): cc.Sprite {
return this.shareSuitViewRolePortraitSprite;
}
onCloseBtnClick() {
this._props.onCloseBtnClickCallback();
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "00a88bbb-9bc0-4507-b994-ad17373ad2cc",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { DummyButton, DummyLabel, DummyNode, DummyPrefab, DummyRichText, DummySprite } from "../../../../../common/CCDummyObjects";
import { CCPureView } from "../../../../../common/classbase/CCViewBase";
import Typewriter from "../../../../../common/components/Typewriter";
import { RegView } from "../../../PresenterCCViewFactory";
import { WardrobeView, WardrobeViewProps, WardrobeViewType } from "../../type/WardrobeView";
const { ccclass, property } = cc._decorator;
@ccclass
@RegView(WardrobeViewType, "prefab/ui/bedroomCat/WardrobeView")
export class WardrobeViewImpl extends CCPureView<WardrobeViewProps> implements WardrobeView {
@property({ type: cc.Node, displayName: "Introduction icon node" })
introductionIconNode: cc.Node = DummyNode;
@property({ type: cc.Node, displayName: "Introduction node" })
introductionNode: cc.Node = DummyNode;
@property({ type: cc.Sprite, displayName: "Role Portrait" })
rolePortrait: cc.Sprite = DummySprite;
@property({ type: cc.Sprite, displayName: "Role Portrait lock" })
rolePortraitLock: cc.Sprite = DummySprite;
@property({ type: cc.Label, displayName: "Role Portrait lock label" })
rolePortraitLockLabel: cc.Label = DummyLabel;
@property({ type: cc.Button, displayName: "Wear button" })
wearBtn: cc.Button = DummyButton;
@property({ type: cc.Button, displayName: "Share button" })
shareBtn: cc.Button = DummyButton;
@property({ type: [cc.Button], displayName: "Suit buttons" })
suitButtons: cc.Button[] = [];
@property({ type: [cc.SpriteFrame], displayName: "Suit button sprites" })
suitButtonSprites: cc.SpriteFrame[] = [];
@property({ type: [cc.Node], displayName: "Suit button reddot nodes" })
redDotNodes: cc.Node[] = [];
@property({ type: cc.Node, displayName: "ScrollView content node" })
scrollViewContentNode: cc.Node = DummyNode;
@property({ type: cc.Prefab, displayName: "Suit item" })
suitItem: cc.Prefab = DummyPrefab;
@property({ type: cc.Prefab, displayName: "Suit item null" })
suitItemNull: cc.Prefab = DummyPrefab;
@property({ type: cc.Node, displayName: "Stay tuned node" })
stayTunedNode: cc.Node = DummyNode;
getIntroductionIconNode(): cc.Node {
return this.introductionIconNode;
}
getIntroductionNode(): cc.Node {
return this.introductionNode;
}
getRolePortrait(): cc.Sprite {
return this.rolePortrait;
}
getRolePortraitLock(): cc.Sprite {
return this.rolePortraitLock;
}
getRolePortraitLockLabel(): cc.Label {
return this.rolePortraitLockLabel;
}
getWearBtn(): cc.Button {
return this.wearBtn;
}
getShareBtn(): cc.Button {
return this.shareBtn;
}
getSuitButtons(): cc.Button[] {
return this.suitButtons;
}
getSuitButtonSprites(): cc.SpriteFrame[] {
return this.suitButtonSprites;
}
getRedDotNodes(): cc.Node[] {
return this.redDotNodes;
}
getScrollViewContentNode(): cc.Node {
return this.scrollViewContentNode;
}
getSuitItem(): cc.Prefab {
return this.suitItem;
}
getSuitItemNull(): cc.Prefab {
return this.suitItemNull;
}
getStayTunedNode(): cc.Node {
return this.stayTunedNode;
}
onWearBtnClick() {
this._props.onWearBtnClickCallBack();
}
onShareBtnClick() {
this._props.onShareBtnClickCallBack();
}
onTabBtnClick(event, customEventData) {
let suitId = Number(customEventData);
this._props.onTabBtnClickCallBack(suitId);
}
onBackBtnClick() {
this._props.onBackBtnClickCallBack();
}
}
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "2c4c8d95-5b6f-47f0-8dea-638601f5be33",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -5,7 +5,6 @@ import { DummySprite, DummyNode, DummyPrefab } from "../../../../../common/CCDum ...@@ -5,7 +5,6 @@ import { DummySprite, DummyNode, DummyPrefab } from "../../../../../common/CCDum
import { ResUtils } from "simba-cc-resutils"; import { ResUtils } from "simba-cc-resutils";
import Typewriter from "../../../../../common/components/Typewriter"; import Typewriter from "../../../../../common/components/Typewriter";
import PortraitFixComponent from "../../../../../common/components/PortraitFixComponent"; import PortraitFixComponent from "../../../../../common/components/PortraitFixComponent";
import { BedRoomCatModelManager } from "../../../../model/BedRoomCatModelManager";
import { GameConfig } from "../../../../../GameConfig"; import { GameConfig } from "../../../../../GameConfig";
import { GameModelManager } from "../../../../model/GameModelManager"; import { GameModelManager } from "../../../../model/GameModelManager";
...@@ -111,8 +110,6 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView { ...@@ -111,8 +110,6 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView {
closeAction() { closeAction() {
GameModelManager.setIsMainPlotSceneType(false); GameModelManager.setIsMainPlotSceneType(false);
GameConfig.isVerb = false; GameConfig.isVerb = false;
//再次初始化奖励状态
BedRoomCatModelManager.initCatRewardStatus();
//清除自动播放计时器 //清除自动播放计时器
clearTimeout(this._autoPlayTimer); clearTimeout(this._autoPlayTimer);
if (this._isRunCloseAction) { if (this._isRunCloseAction) {
...@@ -203,7 +200,7 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView { ...@@ -203,7 +200,7 @@ export class DatingSceneViewImpl extends CCView implements DatingSceneView {
if (isSelf) { if (isSelf) {
let portraitPath = portraitImg.substring(0, portraitImg.lastIndexOf("/") + 1); let portraitPath = portraitImg.substring(0, portraitImg.lastIndexOf("/") + 1);
let faceId = portraitImg.substring(portraitImg.lastIndexOf("/") + 1, portraitImg.length); let faceId = portraitImg.substring(portraitImg.lastIndexOf("/") + 1, portraitImg.length);
portraitImg = portraitPath + BedRoomCatModelManager.getUsingSuitId() + "/" + faceId; portraitImg = portraitPath + "1/" + faceId;
} }
promises.push(ResUtils.loadRes(portraitImg, cc.SpriteFrame).then((sf) => { promises.push(ResUtils.loadRes(portraitImg, cc.SpriteFrame).then((sf) => {
if (this.node.active) { if (this.node.active) {
......
import { PureView } from "../../../../common/classbase/ViewBase";
import Typewriter from "../../../../common/components/Typewriter";
type onClickTabbarBtn = (tabbarId: number) => void;
type onCloseBtnClick = () => void;
type onCloseNoviceGuideBtnClickCallBack = () => void;
export interface BedroomCatRewardViewProps {
onClickTabbarBtn: onClickTabbarBtn;
onCloseBtnClick: onCloseBtnClick;
}
type BedroomCatRewardViewBase = PureView<BedroomCatRewardViewProps>;
export interface BedroomCatRewardView extends BedroomCatRewardViewBase {
getThisViewNode: () => cc.Node;
getRewardPanelTitleSprite: () => cc.Sprite;
getRewardPanelTitleSpriteFrames: () => cc.SpriteFrame[];
getRewardPanelTitleLabel: () => cc.Label;
getRewardPanelNode: () => cc.Node;
getScrollView: () => cc.ScrollView;
getScrollViewContentNode: () => cc.Node;
getRewardItemPrefabs: () => cc.Prefab[];
getWelfareNode: () => cc.Node;
getTabbarButtons: () => cc.Button[];
getTabbarSpriteFrames: () => cc.SpriteFrame[];
getRedDotNodes: () => cc.Node[];
getCloseTipLabelNode: () => cc.Node;
}
export const BedroomCatRewardViewType = "BedroomCatRewardView";
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "fecc5d80-2a67-4450-aa95-72e3690e7a25",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { PureView } from "../../../../common/classbase/ViewBase";
import Typewriter from "../../../../common/components/Typewriter";
export interface BedroomViewProps {
onClickItem: (itemId: number) => void;
onBackBtnClickCallBack: () => void;
onClickTopAddBtn: (foodId: number) => void;
onRewardBtnClickCallBack: () => void;
onWardrobeBtnClickCallBack: () => void;
onCatBtnClickCallBack: () => void;
onBowlBtnClickCallBack: () => void;
onFoodBtnClickCallBack: (foodId: number) => void;
onFeedCloseBtnClickCallBack: () => void;
onChangeBackgroundBtnClickCallBack: () => void;
}
type BedroomViewBase = PureView<BedroomViewProps>;
export interface BedroomView extends BedroomViewBase {
getThisNode: () => cc.Node;
getItemNodes: () => cc.Node[];
getTopBtnRootNodes: () => cc.Node[];
getTopBtnNodes: () => cc.Node[];
getTopBtnNumberLabels: () => cc.Label[];
getIntroductionNodes: () => cc.Node[];
getIntroductionIcons: () => cc.Sprite[];
getIntroductionNameLabels: () => cc.Label[];
getIntroductionLabels: () => cc.Label[];
getCatButtonSkeletonNode: () => cc.Node;
getCatBubbleNode: () => cc.Node;
getCatBubbleLabel: () => cc.Label;
getCatFeedRootNode: () => cc.Node;
getCatBlowBtnNode: () => cc.Node;
getFoodBtnNodes: () => cc.Node[];
getFoodNumberLabels: () => cc.Label[];
getCatLevelLabel: () => cc.Label;
getCatExpLabel: () => cc.Label;
getCatExpProgressBar: () => cc.ProgressBar;
getRewardBtnNode: () => cc.Node;
getRewardRedDotNode: () => cc.Node;
getWardrobeBtnNode: () => cc.Node;
getWardrobeRedDotNode: () => cc.Node;
getBackgroundSpriteFrames: () => cc.SpriteFrame[];
getBackground: () => cc.Sprite;
getChangeBgSpriteFrames: () => cc.SpriteFrame[];
getChangeBackground: () => cc.Sprite;
}
export const BedroomViewType = "BedroomView";
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "1183d05c-394f-4ea1-a2db-574049486a2e",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
...@@ -5,9 +5,6 @@ type onClearRecordBtnClickCallback = () => void; ...@@ -5,9 +5,6 @@ type onClearRecordBtnClickCallback = () => void;
type onCopyRecordBtnClickCallback = () => void; type onCopyRecordBtnClickCallback = () => void;
type onYouHuaBtnClickCallback = () => void; type onYouHuaBtnClickCallback = () => void;
type onShouBiaoBtnClickCallback = () => void; type onShouBiaoBtnClickCallback = () => void;
type onCatFoodBtnClickCallback = (foodNumber: number) => void;
type onCannedBtnClickCallback = (foodNumber: number) => void;
type onClearSuitShareRecordBtnClickCallback = () => void;
export interface DebugViewProps { export interface DebugViewProps {
playerID: string; playerID: string;
onCopyIdBtnClickCallback: onCopyIdBtnClickCallback; onCopyIdBtnClickCallback: onCopyIdBtnClickCallback;
...@@ -15,9 +12,6 @@ export interface DebugViewProps { ...@@ -15,9 +12,6 @@ export interface DebugViewProps {
onCopyRecordBtnClickCallback: onCopyRecordBtnClickCallback; onCopyRecordBtnClickCallback: onCopyRecordBtnClickCallback;
onYouHuaBtnClickCallback: onYouHuaBtnClickCallback; onYouHuaBtnClickCallback: onYouHuaBtnClickCallback;
onShouBiaoBtnClickCallback: onShouBiaoBtnClickCallback; onShouBiaoBtnClickCallback: onShouBiaoBtnClickCallback;
onCatFoodBtnClickCallback: onCatFoodBtnClickCallback;
onCannedBtnClickCallback: onCannedBtnClickCallback;
onClearSuitShareRecordBtnClickCallback: onClearSuitShareRecordBtnClickCallback;
} }
type DebugViewBase = PureView<DebugViewProps>; type DebugViewBase = PureView<DebugViewProps>;
......
import { PureView } from "../../../../common/classbase/ViewBase";
export interface PromptAlertDialogViewProps {
iconSpritePath: string;
contentLabel: string;
}
type PromptAlertDialogViewBase = PureView<PromptAlertDialogViewProps>;
export interface PromptAlertDialogView extends PromptAlertDialogViewBase {
getIconSprite: () => cc.Sprite;
getContentLable: () => cc.RichText;
}
export const PromptAlertDialogViewType = "PromptAlertDialogView";
{
"ver": "1.0.8",
"uuid": "63e7bcd2-dac9-4340-9274-dcc36de8e384",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { PureView } from "../../../../common/classbase/ViewBase";
export type ShareSuitViewCallback = (result: boolean, param?: any) => void;
export type onCloseBtnClickCallback = () => void;
export interface ShareSuitViewProps {
bgSpritePath: string,
rolePortraitSpritePath: string,
shareSuitViewCallback: ShareSuitViewCallback;
onCloseBtnClickCallback: onCloseBtnClickCallback;
}
type ShareSuitViewBase = PureView<ShareSuitViewProps>;
export interface ShareSuitView extends ShareSuitViewBase {
getViewNode: () => cc.Node;
getShareNode: () => cc.Node;
getShareSuitViewBgSprite: () => cc.Sprite;
getShareSuitViewRolePortraitSprite: () => cc.Sprite;
}
export const ShareSuitViewType = "ShareSuitView";
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "4e706b13-4dc7-4c5b-99d9-31c01d5a12e4",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
import { PureView } from "../../../../common/classbase/ViewBase";
import Typewriter from "../../../../common/components/Typewriter";
type onWearBtnClickCallBack = () => void;
type onShareBtnClickCallBack = () => void;
type onTabBtnClickCallBack = (suitId: number) => void;
type onBackBtnClickCallBack = () => void;
type onCloseNoviceGuideBtnClickCallBack = () => void;
export interface WardrobeViewProps {
onWearBtnClickCallBack: onWearBtnClickCallBack;
onShareBtnClickCallBack: onShareBtnClickCallBack;
onTabBtnClickCallBack: onTabBtnClickCallBack;
onBackBtnClickCallBack: onBackBtnClickCallBack;
onCloseNoviceGuideBtnClickCallBack: onCloseNoviceGuideBtnClickCallBack;
}
type WardrobeViewBase = PureView<WardrobeViewProps>;
export interface WardrobeView extends WardrobeViewBase {
getIntroductionIconNode: () => cc.Node;
getIntroductionNode: () => cc.Node;
getRolePortrait: () => cc.Sprite;
getRolePortraitLock: () => cc.Sprite;
getRolePortraitLockLabel: () => cc.Label;
getWearBtn: () => cc.Button;
getShareBtn: () => cc.Button;
getSuitButtons: () => cc.Button[];
getSuitButtonSprites: () => cc.SpriteFrame[];
getRedDotNodes: () => cc.Node[];
getScrollViewContentNode: () => cc.Node;
getSuitItem: () => cc.Prefab;
getSuitItemNull: () => cc.Prefab;
getStayTunedNode: () => cc.Node;
}
export const WardrobeViewType = "WardrobeView";
\ No newline at end of file
{
"ver": "1.0.8",
"uuid": "d8379af7-51c0-4736-a22b-30e80ac0f856",
"isPlugin": false,
"loadPluginInWeb": true,
"loadPluginInNative": true,
"loadPluginInEditor": false,
"subMetas": {}
}
\ No newline at end of file
"use strict";
cc._RF.push(module, '00a88u7m8BFB7mUrRc3OtLM', 'ShareSuitViewImpl');
// script/game/ui/view/impl/bedroom/ShareSuitViewImpl.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShareSuitViewImpl = void 0;
const CCDummyObjects_1 = require("../../../../../common/CCDummyObjects");
const CCViewBase_1 = require("../../../../../common/classbase/CCViewBase");
const PresenterCCViewFactory_1 = require("../../../PresenterCCViewFactory");
const ShareSuitView_1 = require("../../type/ShareSuitView");
const { ccclass, property } = cc._decorator;
let ShareSuitViewImpl = /** @class */ (() => {
let ShareSuitViewImpl = class ShareSuitViewImpl extends CCViewBase_1.CCPureView {
constructor() {
super(...arguments);
this.shareNode = CCDummyObjects_1.DummyNode;
this.shareSuitViewBgSprite = CCDummyObjects_1.DummySprite;
this.shareSuitViewRolePortraitSprite = CCDummyObjects_1.DummySprite;
}
getViewNode() {
return this.node;
}
getShareNode() {
return this.shareNode;
}
getShareSuitViewBgSprite() {
return this.shareSuitViewBgSprite;
}
getShareSuitViewRolePortraitSprite() {
return this.shareSuitViewRolePortraitSprite;
}
onCloseBtnClick() {
this._props.onCloseBtnClickCallback();
}
};
__decorate([
property({ type: cc.Node, displayName: "ShareSuitView share node" })
], ShareSuitViewImpl.prototype, "shareNode", void 0);
__decorate([
property({ type: cc.Sprite, displayName: "ShareSuitView background sprite" })
], ShareSuitViewImpl.prototype, "shareSuitViewBgSprite", void 0);
__decorate([
property({ type: cc.Sprite, displayName: "ShareSuitViewRolePortrait sprite" })
], ShareSuitViewImpl.prototype, "shareSuitViewRolePortraitSprite", void 0);
ShareSuitViewImpl = __decorate([
ccclass,
PresenterCCViewFactory_1.RegView(ShareSuitView_1.ShareSuitViewType, "prefab/ui/bedroomCat/ShareSuitView")
], ShareSuitViewImpl);
return ShareSuitViewImpl;
})();
exports.ShareSuitViewImpl = ShareSuitViewImpl;
cc._RF.pop();
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/view/impl/bedroom/ShareSuitViewImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yEAA8E;AAC9E,2EAAwE;AACxE,4EAA0D;AAC1D,4DAAgG;AAEhG,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC;AAI5C;IAAA,IAAa,iBAAiB,GAA9B,MAAa,iBAAkB,SAAQ,uBAA8B;QAArE;;YAGI,cAAS,GAAY,0BAAS,CAAC;YAE/B,0BAAqB,GAAc,4BAAW,CAAC;YAE/C,oCAA+B,GAAc,4BAAW,CAAC;QAqB7D,CAAC;QAnBG,WAAW;YACP,OAAO,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC;QAED,YAAY;YACR,OAAO,IAAI,CAAC,SAAS,CAAC;QAC1B,CAAC;QAED,wBAAwB;YACpB,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACtC,CAAC;QAED,kCAAkC;YAC9B,OAAO,IAAI,CAAC,+BAA+B,CAAC;QAChD,CAAC;QAED,eAAe;YACX,IAAI,CAAC,MAAM,CAAC,uBAAuB,EAAE,CAAC;QAC1C,CAAC;KACJ,CAAA;IAzBG;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,0BAA0B,EAAE,CAAC;wDACtC;IAE/B;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;oEAC/B;IAE/C;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,kCAAkC,EAAE,CAAC;8EACtB;IAPhD,iBAAiB;QAF7B,OAAO;QACP,gCAAO,CAAC,iCAAiB,EAAE,oCAAoC,CAAC;OACpD,iBAAiB,CA4B7B;IAAD,wBAAC;KAAA;AA5BY,8CAAiB","file":"","sourceRoot":"/","sourcesContent":["import { DummyNode, DummySprite } from \"../../../../../common/CCDummyObjects\";\nimport { CCPureView } from \"../../../../../common/classbase/CCViewBase\";\nimport { RegView } from \"../../../PresenterCCViewFactory\";\nimport { ShareSuitView, ShareSuitViewProps, ShareSuitViewType } from \"../../type/ShareSuitView\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\n@RegView(ShareSuitViewType, \"prefab/ui/bedroomCat/ShareSuitView\")\nexport class ShareSuitViewImpl extends CCPureView<ShareSuitViewProps> implements ShareSuitView {\n\n @property({ type: cc.Node, displayName: \"ShareSuitView share node\" })\n shareNode: cc.Node = DummyNode;\n @property({ type: cc.Sprite, displayName: \"ShareSuitView background sprite\" })\n shareSuitViewBgSprite: cc.Sprite = DummySprite;\n @property({ type: cc.Sprite, displayName: \"ShareSuitViewRolePortrait sprite\" })\n shareSuitViewRolePortraitSprite: cc.Sprite = DummySprite;\n\n getViewNode(): cc.Node {\n return this.node;\n }\n\n getShareNode(): cc.Node {\n return this.shareNode;\n }\n\n getShareSuitViewBgSprite(): cc.Sprite {\n return this.shareSuitViewBgSprite;\n }\n\n getShareSuitViewRolePortraitSprite(): cc.Sprite {\n return this.shareSuitViewRolePortraitSprite;\n }\n\n onCloseBtnClick() {\n this._props.onCloseBtnClickCallback();\n }\n}"]}
\ No newline at end of file
"use strict";
cc._RF.push(module, '043485UbwZLC714UVOJGddW', 'WardrobeViewFix');
// script/game/ui/WardrobeViewFix.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const CCDummyObjects_1 = require("../../common/CCDummyObjects");
const { ccclass, property } = cc._decorator;
let WardrobeViewFix = /** @class */ (() => {
let WardrobeViewFix = class WardrobeViewFix extends cc.Component {
constructor() {
super(...arguments);
this.titleNode = CCDummyObjects_1.DummyNode;
this.wardrobeRootNode = CCDummyObjects_1.DummyNode;
this.suitTabRootNode = CCDummyObjects_1.DummyNode;
this.introductionNode = CCDummyObjects_1.DummyNode;
}
onLoad() {
//界面设计尺寸为720*1080
let originalWigth = 720;
let originalHeight = 1080;
let originalProportion = originalHeight / originalWigth;
let actualWidth = cc.winSize.width;
let actualHeight = cc.winSize.height;
let actualProportion = actualHeight / actualWidth;
let titleNodeWidget = this.titleNode.getComponent(cc.Widget);
let suitTabRootNodeWidget = this.suitTabRootNode.getComponent(cc.Widget);
let introductionNodeWidget = this.introductionNode.getComponent(cc.Widget);
if (actualProportion >= 1.9) {
titleNodeWidget.verticalCenter = 590;
titleNodeWidget.updateAlignment();
suitTabRootNodeWidget.verticalCenter = -600;
suitTabRootNodeWidget.updateAlignment();
introductionNodeWidget.top = 200;
introductionNodeWidget.updateAlignment();
}
if (actualProportion <= 1.5) {
titleNodeWidget.verticalCenter = 370;
titleNodeWidget.updateAlignment();
suitTabRootNodeWidget.verticalCenter = -390;
suitTabRootNodeWidget.updateAlignment();
introductionNodeWidget.top = 100;
introductionNodeWidget.updateAlignment();
this.wardrobeRootNode.scale = 0.7;
}
}
};
__decorate([
property({ type: cc.Node, displayName: "Title node" })
], WardrobeViewFix.prototype, "titleNode", void 0);
__decorate([
property({ type: cc.Node, displayName: "Wardrobe root node" })
], WardrobeViewFix.prototype, "wardrobeRootNode", void 0);
__decorate([
property({ type: cc.Node, displayName: "Suit tab root node" })
], WardrobeViewFix.prototype, "suitTabRootNode", void 0);
__decorate([
property({ type: cc.Node, displayName: "Introduction node" })
], WardrobeViewFix.prototype, "introductionNode", void 0);
WardrobeViewFix = __decorate([
ccclass
], WardrobeViewFix);
return WardrobeViewFix;
})();
exports.default = WardrobeViewFix;
cc._RF.pop();
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/WardrobeViewFix.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAAwD;AAExD,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC;AAG5C;IAAA,IAAqB,eAAe,GAApC,MAAqB,eAAgB,SAAQ,EAAE,CAAC,SAAS;QAAzD;;YAGI,cAAS,GAAY,0BAAS,CAAC;YAE/B,qBAAgB,GAAY,0BAAS,CAAC;YAEtC,oBAAe,GAAY,0BAAS,CAAC;YAErC,qBAAgB,GAAY,0BAAS,CAAC;QA+B1C,CAAC;QA7BG,MAAM;YACF,iBAAiB;YACjB,IAAI,aAAa,GAAG,GAAG,CAAC;YACxB,IAAI,cAAc,GAAG,IAAI,CAAC;YAC1B,IAAI,kBAAkB,GAAG,cAAc,GAAG,aAAa,CAAC;YACxD,IAAI,WAAW,GAAG,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;YACnC,IAAI,YAAY,GAAG,EAAE,CAAC,OAAO,CAAC,MAAM,CAAC;YACrC,IAAI,gBAAgB,GAAG,YAAY,GAAG,WAAW,CAAC;YAClD,IAAI,eAAe,GAAG,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;YAC7D,IAAI,qBAAqB,GAAG,IAAI,CAAC,eAAe,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;YACzE,IAAI,sBAAsB,GAAG,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC;YAC3E,IAAI,gBAAgB,IAAI,GAAG,EAAE;gBACzB,eAAe,CAAC,cAAc,GAAG,GAAG,CAAC;gBACrC,eAAe,CAAC,eAAe,EAAE,CAAC;gBAClC,qBAAqB,CAAC,cAAc,GAAG,CAAC,GAAG,CAAC;gBAC5C,qBAAqB,CAAC,eAAe,EAAE,CAAC;gBACxC,sBAAsB,CAAC,GAAG,GAAG,GAAG,CAAC;gBACjC,sBAAsB,CAAC,eAAe,EAAE,CAAC;aAC5C;YACD,IAAI,gBAAgB,IAAI,GAAG,EAAE;gBACzB,eAAe,CAAC,cAAc,GAAG,GAAG,CAAC;gBACrC,eAAe,CAAC,eAAe,EAAE,CAAC;gBAClC,qBAAqB,CAAC,cAAc,GAAG,CAAC,GAAG,CAAC;gBAC5C,qBAAqB,CAAC,eAAe,EAAE,CAAC;gBACxC,sBAAsB,CAAC,GAAG,GAAG,GAAG,CAAC;gBACjC,sBAAsB,CAAC,eAAe,EAAE,CAAC;gBACzC,IAAI,CAAC,gBAAgB,CAAC,KAAK,GAAG,GAAG,CAAC;aACrC;QACL,CAAC;KACJ,CAAA;IArCG;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC;sDACxB;IAE/B;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;6DACzB;IAEtC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,oBAAoB,EAAE,CAAC;4DAC1B;IAErC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,mBAAmB,EAAE,CAAC;6DACxB;IATrB,eAAe;QADnC,OAAO;OACa,eAAe,CAwCnC;IAAD,sBAAC;KAAA;kBAxCoB,eAAe","file":"","sourceRoot":"/","sourcesContent":["import { DummyNode } from \"../../common/CCDummyObjects\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\nexport default class WardrobeViewFix extends cc.Component {\n \n @property({ type: cc.Node, displayName: \"Title node\" })\n titleNode: cc.Node = DummyNode;\n @property({ type: cc.Node, displayName: \"Wardrobe root node\" })\n wardrobeRootNode: cc.Node = DummyNode;\n @property({ type: cc.Node, displayName: \"Suit tab root node\" })\n suitTabRootNode: cc.Node = DummyNode;\n @property({ type: cc.Node, displayName: \"Introduction node\" })\n introductionNode: cc.Node = DummyNode;\n\n onLoad() {\n //界面设计尺寸为720*1080\n let originalWigth = 720;\n let originalHeight = 1080;\n let originalProportion = originalHeight / originalWigth;\n let actualWidth = cc.winSize.width;\n let actualHeight = cc.winSize.height;\n let actualProportion = actualHeight / actualWidth;\n let titleNodeWidget = this.titleNode.getComponent(cc.Widget);\n let suitTabRootNodeWidget = this.suitTabRootNode.getComponent(cc.Widget);\n let introductionNodeWidget = this.introductionNode.getComponent(cc.Widget);\n if (actualProportion >= 1.9) {\n titleNodeWidget.verticalCenter = 590;\n titleNodeWidget.updateAlignment();\n suitTabRootNodeWidget.verticalCenter = -600;\n suitTabRootNodeWidget.updateAlignment();\n introductionNodeWidget.top = 200;\n introductionNodeWidget.updateAlignment();\n }\n if (actualProportion <= 1.5) {\n titleNodeWidget.verticalCenter = 370;\n titleNodeWidget.updateAlignment();\n suitTabRootNodeWidget.verticalCenter = -390;\n suitTabRootNodeWidget.updateAlignment();\n introductionNodeWidget.top = 100;\n introductionNodeWidget.updateAlignment();\n this.wardrobeRootNode.scale = 0.7;\n }\n }\n}"]}
\ No newline at end of file
"use strict";
cc._RF.push(module, '1183dBcOU9OoaLbV0BJSGou', 'BedroomView');
// script/game/ui/view/type/BedroomView.ts
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.BedroomViewType = void 0;
exports.BedroomViewType = "BedroomView";
cc._RF.pop();
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/view/type/BedroomView.ts"],"names":[],"mappings":";;;;;;;AA8Ca,QAAA,eAAe,GAAG,aAAa,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { PureView } from \"../../../../common/classbase/ViewBase\";\nimport Typewriter from \"../../../../common/components/Typewriter\";\n\nexport interface BedroomViewProps {\n onClickItem: (itemId: number) => void;\n onBackBtnClickCallBack: () => void;\n onClickTopAddBtn: (foodId: number) => void;\n onRewardBtnClickCallBack: () => void;\n onWardrobeBtnClickCallBack: () => void;\n onCatBtnClickCallBack: () => void;\n onBowlBtnClickCallBack: () => void;\n onFoodBtnClickCallBack: (foodId: number) => void;\n onFeedCloseBtnClickCallBack: () => void;\n onChangeBackgroundBtnClickCallBack: () => void;\n}\ntype BedroomViewBase = PureView<BedroomViewProps>;\n\nexport interface BedroomView extends BedroomViewBase {\n getThisNode: () => cc.Node;\n getItemNodes: () => cc.Node[];\n getTopBtnRootNodes: () => cc.Node[];\n getTopBtnNodes: () => cc.Node[];\n getTopBtnNumberLabels: () => cc.Label[];\n getIntroductionNodes: () => cc.Node[];\n getIntroductionIcons: () => cc.Sprite[];\n getIntroductionNameLabels: () => cc.Label[];\n getIntroductionLabels: () => cc.Label[];\n getCatButtonSkeletonNode: () => cc.Node;\n getCatBubbleNode: () => cc.Node;\n getCatBubbleLabel: () => cc.Label;\n getCatFeedRootNode: () => cc.Node;\n getCatBlowBtnNode: () => cc.Node;\n getFoodBtnNodes: () => cc.Node[];\n getFoodNumberLabels: () => cc.Label[];\n getCatLevelLabel: () => cc.Label;\n getCatExpLabel: () => cc.Label;\n getCatExpProgressBar: () => cc.ProgressBar;\n getRewardBtnNode: () => cc.Node;\n getRewardRedDotNode: () => cc.Node;\n getWardrobeBtnNode: () => cc.Node;\n getWardrobeRedDotNode: () => cc.Node;\n getBackgroundSpriteFrames: () => cc.SpriteFrame[];\n getBackground: () => cc.Sprite;\n getChangeBgSpriteFrames: () => cc.SpriteFrame[];\n getChangeBackground: () => cc.Sprite;\n}\nexport const BedroomViewType = \"BedroomView\";"]}
\ No newline at end of file
"use strict";
cc._RF.push(module, '1aaf7+2/ctEaJnlRN7iHx0I', 'PromptAlertDialogViewImpl');
// script/game/ui/view/impl/bedroom/PromptAlertDialogViewImpl.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const CCDummyObjects_1 = require("../../../../../common/CCDummyObjects");
const CCViewBase_1 = require("../../../../../common/classbase/CCViewBase");
const PresenterCCViewFactory_1 = require("../../../PresenterCCViewFactory");
const PromptAlertDialogView_1 = require("../../type/PromptAlertDialogView");
const { ccclass, property } = cc._decorator;
let PromptAlertDialogViewImpl = /** @class */ (() => {
let PromptAlertDialogViewImpl = class PromptAlertDialogViewImpl extends CCViewBase_1.CCPureView {
constructor() {
super(...arguments);
this.iconSprite = CCDummyObjects_1.DummySprite;
this.contentLabel = CCDummyObjects_1.DummyRichText;
}
getIconSprite() {
return this.iconSprite;
}
getContentLable() {
return this.contentLabel;
}
onOkBtnClick() {
this.close();
}
};
__decorate([
property(cc.Sprite)
], PromptAlertDialogViewImpl.prototype, "iconSprite", void 0);
__decorate([
property(cc.RichText)
], PromptAlertDialogViewImpl.prototype, "contentLabel", void 0);
PromptAlertDialogViewImpl = __decorate([
ccclass,
PresenterCCViewFactory_1.RegView(PromptAlertDialogView_1.PromptAlertDialogViewType, "prefab/ui/bedroomCat/PromptAlertDialogView")
], PromptAlertDialogViewImpl);
return PromptAlertDialogViewImpl;
})();
exports.default = PromptAlertDialogViewImpl;
cc._RF.pop();
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/view/impl/bedroom/PromptAlertDialogViewImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,yEAAsH;AACtH,2EAAwE;AACxE,4EAA0D;AAC1D,4EAAgI;AAGhI,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC;AAI5C;IAAA,IAAqB,yBAAyB,GAA9C,MAAqB,yBAA0B,SAAQ,uBAAsC;QAA7F;;YAGI,eAAU,GAAc,4BAAW,CAAC;YAEpC,iBAAY,GAAgB,8BAAa,CAAC;QAa9C,CAAC;QAXG,aAAa;YACT,OAAO,IAAI,CAAC,UAAU,CAAC;QAC3B,CAAC;QAED,eAAe;YACX,OAAO,IAAI,CAAC,YAAY,CAAA;QAC5B,CAAC;QAED,YAAY;YACR,IAAI,CAAC,KAAK,EAAE,CAAC;QACjB,CAAC;KACJ,CAAA;IAfG;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;iEACgB;IAEpC;QADC,QAAQ,CAAC,EAAE,CAAC,QAAQ,CAAC;mEACoB;IALzB,yBAAyB;QAF7C,OAAO;QACP,gCAAO,CAAC,iDAAyB,EAAE,4CAA4C,CAAC;OAC5D,yBAAyB,CAkB7C;IAAD,gCAAC;KAAA;kBAlBoB,yBAAyB","file":"","sourceRoot":"/","sourcesContent":["import { DummyLabel, DummyRichText, DummyNode, DummyButton, DummySprite } from \"../../../../../common/CCDummyObjects\";\r\nimport { CCPureView } from \"../../../../../common/classbase/CCViewBase\";\r\nimport { RegView } from \"../../../PresenterCCViewFactory\";\r\nimport { PromptAlertDialogViewProps, PromptAlertDialogView, PromptAlertDialogViewType } from \"../../type/PromptAlertDialogView\";\r\n\r\n\r\nconst { ccclass, property } = cc._decorator;\r\n\r\n@ccclass\r\n@RegView(PromptAlertDialogViewType, \"prefab/ui/bedroomCat/PromptAlertDialogView\")\r\nexport default class PromptAlertDialogViewImpl extends CCPureView<PromptAlertDialogViewProps> implements PromptAlertDialogView {\r\n\r\n @property(cc.Sprite)\r\n iconSprite: cc.Sprite = DummySprite;\r\n @property(cc.RichText)\r\n contentLabel: cc.RichText = DummyRichText;\r\n\r\n getIconSprite(): cc.Sprite {\r\n return this.iconSprite;\r\n }\r\n\r\n getContentLable(): cc.RichText {\r\n return this.contentLabel\r\n }\r\n\r\n onOkBtnClick() {\r\n this.close();\r\n }\r\n}"]}
\ No newline at end of file
"use strict";
cc._RF.push(module, '2c4c82VW29H8I3qY4YB9b4z', 'WardrobeViewImpl');
// script/game/ui/view/impl/bedroom/WardrobeViewImpl.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.WardrobeViewImpl = void 0;
const CCDummyObjects_1 = require("../../../../../common/CCDummyObjects");
const CCViewBase_1 = require("../../../../../common/classbase/CCViewBase");
const PresenterCCViewFactory_1 = require("../../../PresenterCCViewFactory");
const WardrobeView_1 = require("../../type/WardrobeView");
const { ccclass, property } = cc._decorator;
let WardrobeViewImpl = /** @class */ (() => {
let WardrobeViewImpl = class WardrobeViewImpl extends CCViewBase_1.CCPureView {
constructor() {
super(...arguments);
this.introductionIconNode = CCDummyObjects_1.DummyNode;
this.introductionNode = CCDummyObjects_1.DummyNode;
this.rolePortrait = CCDummyObjects_1.DummySprite;
this.rolePortraitLock = CCDummyObjects_1.DummySprite;
this.rolePortraitLockLabel = CCDummyObjects_1.DummyLabel;
this.wearBtn = CCDummyObjects_1.DummyButton;
this.shareBtn = CCDummyObjects_1.DummyButton;
this.suitButtons = [];
this.suitButtonSprites = [];
this.redDotNodes = [];
this.scrollViewContentNode = CCDummyObjects_1.DummyNode;
this.suitItem = CCDummyObjects_1.DummyPrefab;
this.suitItemNull = CCDummyObjects_1.DummyPrefab;
this.stayTunedNode = CCDummyObjects_1.DummyNode;
}
getIntroductionIconNode() {
return this.introductionIconNode;
}
getIntroductionNode() {
return this.introductionNode;
}
getRolePortrait() {
return this.rolePortrait;
}
getRolePortraitLock() {
return this.rolePortraitLock;
}
getRolePortraitLockLabel() {
return this.rolePortraitLockLabel;
}
getWearBtn() {
return this.wearBtn;
}
getShareBtn() {
return this.shareBtn;
}
getSuitButtons() {
return this.suitButtons;
}
getSuitButtonSprites() {
return this.suitButtonSprites;
}
getRedDotNodes() {
return this.redDotNodes;
}
getScrollViewContentNode() {
return this.scrollViewContentNode;
}
getSuitItem() {
return this.suitItem;
}
getSuitItemNull() {
return this.suitItemNull;
}
getStayTunedNode() {
return this.stayTunedNode;
}
onWearBtnClick() {
this._props.onWearBtnClickCallBack();
}
onShareBtnClick() {
this._props.onShareBtnClickCallBack();
}
onTabBtnClick(event, customEventData) {
let suitId = Number(customEventData);
this._props.onTabBtnClickCallBack(suitId);
}
onBackBtnClick() {
this._props.onBackBtnClickCallBack();
}
};
__decorate([
property({ type: cc.Node, displayName: "Introduction icon node" })
], WardrobeViewImpl.prototype, "introductionIconNode", void 0);
__decorate([
property({ type: cc.Node, displayName: "Introduction node" })
], WardrobeViewImpl.prototype, "introductionNode", void 0);
__decorate([
property({ type: cc.Sprite, displayName: "Role Portrait" })
], WardrobeViewImpl.prototype, "rolePortrait", void 0);
__decorate([
property({ type: cc.Sprite, displayName: "Role Portrait lock" })
], WardrobeViewImpl.prototype, "rolePortraitLock", void 0);
__decorate([
property({ type: cc.Label, displayName: "Role Portrait lock label" })
], WardrobeViewImpl.prototype, "rolePortraitLockLabel", void 0);
__decorate([
property({ type: cc.Button, displayName: "Wear button" })
], WardrobeViewImpl.prototype, "wearBtn", void 0);
__decorate([
property({ type: cc.Button, displayName: "Share button" })
], WardrobeViewImpl.prototype, "shareBtn", void 0);
__decorate([
property({ type: [cc.Button], displayName: "Suit buttons" })
], WardrobeViewImpl.prototype, "suitButtons", void 0);
__decorate([
property({ type: [cc.SpriteFrame], displayName: "Suit button sprites" })
], WardrobeViewImpl.prototype, "suitButtonSprites", void 0);
__decorate([
property({ type: [cc.Node], displayName: "Suit button reddot nodes" })
], WardrobeViewImpl.prototype, "redDotNodes", void 0);
__decorate([
property({ type: cc.Node, displayName: "ScrollView content node" })
], WardrobeViewImpl.prototype, "scrollViewContentNode", void 0);
__decorate([
property({ type: cc.Prefab, displayName: "Suit item" })
], WardrobeViewImpl.prototype, "suitItem", void 0);
__decorate([
property({ type: cc.Prefab, displayName: "Suit item null" })
], WardrobeViewImpl.prototype, "suitItemNull", void 0);
__decorate([
property({ type: cc.Node, displayName: "Stay tuned node" })
], WardrobeViewImpl.prototype, "stayTunedNode", void 0);
WardrobeViewImpl = __decorate([
ccclass,
PresenterCCViewFactory_1.RegView(WardrobeView_1.WardrobeViewType, "prefab/ui/bedroomCat/WardrobeView")
], WardrobeViewImpl);
return WardrobeViewImpl;
})();
exports.WardrobeViewImpl = WardrobeViewImpl;
cc._RF.pop();
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/view/impl/bedroom/WardrobeViewImpl.ts"],"names":[],"mappings":"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","file":"","sourceRoot":"/","sourcesContent":["import { DummyButton, DummyLabel, DummyNode, DummyPrefab, DummyRichText, DummySprite } from \"../../../../../common/CCDummyObjects\";\nimport { CCPureView } from \"../../../../../common/classbase/CCViewBase\";\nimport Typewriter from \"../../../../../common/components/Typewriter\";\nimport { RegView } from \"../../../PresenterCCViewFactory\";\nimport { WardrobeView, WardrobeViewProps, WardrobeViewType } from \"../../type/WardrobeView\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\n@RegView(WardrobeViewType, \"prefab/ui/bedroomCat/WardrobeView\")\nexport class WardrobeViewImpl extends CCPureView<WardrobeViewProps> implements WardrobeView {\n\n @property({ type: cc.Node, displayName: \"Introduction icon node\" })\n introductionIconNode: cc.Node = DummyNode;\n @property({ type: cc.Node, displayName: \"Introduction node\" })\n introductionNode: cc.Node = DummyNode;\n @property({ type: cc.Sprite, displayName: \"Role Portrait\" })\n rolePortrait: cc.Sprite = DummySprite;\n @property({ type: cc.Sprite, displayName: \"Role Portrait lock\" })\n rolePortraitLock: cc.Sprite = DummySprite;\n @property({ type: cc.Label, displayName: \"Role Portrait lock label\" })\n rolePortraitLockLabel: cc.Label = DummyLabel;\n @property({ type: cc.Button, displayName: \"Wear button\" })\n wearBtn: cc.Button = DummyButton;\n @property({ type: cc.Button, displayName: \"Share button\" })\n shareBtn: cc.Button = DummyButton;\n @property({ type: [cc.Button], displayName: \"Suit buttons\" })\n suitButtons: cc.Button[] = [];\n @property({ type: [cc.SpriteFrame], displayName: \"Suit button sprites\" })\n suitButtonSprites: cc.SpriteFrame[] = [];\n @property({ type: [cc.Node], displayName: \"Suit button reddot nodes\" })\n redDotNodes: cc.Node[] = [];\n @property({ type: cc.Node, displayName: \"ScrollView content node\" })\n scrollViewContentNode: cc.Node = DummyNode;\n @property({ type: cc.Prefab, displayName: \"Suit item\" })\n suitItem: cc.Prefab = DummyPrefab;\n @property({ type: cc.Prefab, displayName: \"Suit item null\" })\n suitItemNull: cc.Prefab = DummyPrefab;\n @property({ type: cc.Node, displayName: \"Stay tuned node\" })\n stayTunedNode: cc.Node = DummyNode;\n\n getIntroductionIconNode(): cc.Node {\n return this.introductionIconNode;\n }\n\n getIntroductionNode(): cc.Node {\n return this.introductionNode;\n }\n\n getRolePortrait(): cc.Sprite {\n return this.rolePortrait;\n }\n\n getRolePortraitLock(): cc.Sprite {\n return this.rolePortraitLock;\n }\n\n getRolePortraitLockLabel(): cc.Label {\n return this.rolePortraitLockLabel;\n }\n\n getWearBtn(): cc.Button {\n return this.wearBtn;\n }\n\n getShareBtn(): cc.Button {\n return this.shareBtn;\n }\n\n getSuitButtons(): cc.Button[] {\n return this.suitButtons;\n }\n\n getSuitButtonSprites(): cc.SpriteFrame[] {\n return this.suitButtonSprites;\n }\n\n getRedDotNodes(): cc.Node[] {\n return this.redDotNodes;\n }\n\n getScrollViewContentNode(): cc.Node {\n return this.scrollViewContentNode;\n }\n\n getSuitItem(): cc.Prefab {\n return this.suitItem;\n }\n\n getSuitItemNull(): cc.Prefab {\n return this.suitItemNull;\n }\n\n getStayTunedNode(): cc.Node {\n return this.stayTunedNode;\n }\n\n onWearBtnClick() {\n this._props.onWearBtnClickCallBack();\n }\n\n onShareBtnClick() {\n this._props.onShareBtnClickCallBack();\n }\n\n onTabBtnClick(event, customEventData) {\n let suitId = Number(customEventData);\n this._props.onTabBtnClickCallBack(suitId);\n }\n\n onBackBtnClick() {\n this._props.onBackBtnClickCallBack();\n }\n}"]}
\ No newline at end of file
"use strict";
cc._RF.push(module, '3315adWtNtHuJxItd/Qk+Gv', 'BedroomCatRewardViewImpl');
// script/game/ui/view/impl/bedroom/BedroomCatRewardViewImpl.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.BedroomCatRewardViewImpl = void 0;
const CCDummyObjects_1 = require("../../../../../common/CCDummyObjects");
const CCViewBase_1 = require("../../../../../common/classbase/CCViewBase");
const PresenterCCViewFactory_1 = require("../../../PresenterCCViewFactory");
const BedroomCatRewardView_1 = require("../../type/BedroomCatRewardView");
const { ccclass, property } = cc._decorator;
let BedroomCatRewardViewImpl = /** @class */ (() => {
let BedroomCatRewardViewImpl = class BedroomCatRewardViewImpl extends CCViewBase_1.CCPureView {
constructor() {
super(...arguments);
this.rewardPanelTitleSprite = CCDummyObjects_1.DummySprite;
this.rewardPanelTitleSpriteFrames = [];
this.rewardPanelTitleLabel = CCDummyObjects_1.DummyLabel;
this.rewardPanelNode = CCDummyObjects_1.DummyNode;
this.scrollView = CCDummyObjects_1.DummyScrollView;
this.contentNode = CCDummyObjects_1.DummyNode;
this.rewardItemPrefabs = [];
this.welfareNode = CCDummyObjects_1.DummyNode;
this.tabbarButtons = [];
this.tabbarSpriteFrames = [];
this.redDotNodes = [];
this.closeTipLabelNode = CCDummyObjects_1.DummyNode;
}
getThisViewNode() {
return this.node;
}
getRewardPanelTitleSprite() {
return this.rewardPanelTitleSprite;
}
getRewardPanelTitleSpriteFrames() {
return this.rewardPanelTitleSpriteFrames;
}
getRewardPanelTitleLabel() {
return this.rewardPanelTitleLabel;
}
getRewardPanelNode() {
return this.rewardPanelNode;
}
getScrollView() {
return this.scrollView;
}
getScrollViewContentNode() {
return this.contentNode;
}
getRewardItemPrefabs() {
return this.rewardItemPrefabs;
}
getWelfareNode() {
return this.welfareNode;
}
getTabbarButtons() {
return this.tabbarButtons;
}
getTabbarSpriteFrames() {
return this.tabbarSpriteFrames;
}
getRedDotNodes() {
return this.redDotNodes;
}
getCloseTipLabelNode() {
return this.closeTipLabelNode;
}
onClickTabbarBtn(event, customEventData) {
let tabbarId = Number(customEventData);
this._props.onClickTabbarBtn(tabbarId);
}
onCloseClickCallBack() {
this._props.onCloseBtnClick();
}
};
__decorate([
property(cc.Sprite)
], BedroomCatRewardViewImpl.prototype, "rewardPanelTitleSprite", void 0);
__decorate([
property({ type: [cc.SpriteFrame], displayName: "Reward panel title spriteFrames" })
], BedroomCatRewardViewImpl.prototype, "rewardPanelTitleSpriteFrames", void 0);
__decorate([
property(cc.Label)
], BedroomCatRewardViewImpl.prototype, "rewardPanelTitleLabel", void 0);
__decorate([
property(cc.Node)
], BedroomCatRewardViewImpl.prototype, "rewardPanelNode", void 0);
__decorate([
property(cc.ScrollView)
], BedroomCatRewardViewImpl.prototype, "scrollView", void 0);
__decorate([
property(cc.Node)
], BedroomCatRewardViewImpl.prototype, "contentNode", void 0);
__decorate([
property({ type: [cc.Prefab], displayName: "Reward item prefabs" })
], BedroomCatRewardViewImpl.prototype, "rewardItemPrefabs", void 0);
__decorate([
property(cc.Node)
], BedroomCatRewardViewImpl.prototype, "welfareNode", void 0);
__decorate([
property({ type: [cc.Button], displayName: "Tabbar Buttons" })
], BedroomCatRewardViewImpl.prototype, "tabbarButtons", void 0);
__decorate([
property({ type: [cc.SpriteFrame], displayName: "Tabbar Spriteframes" })
], BedroomCatRewardViewImpl.prototype, "tabbarSpriteFrames", void 0);
__decorate([
property({ type: [cc.Node], displayName: "RedDot nodes" })
], BedroomCatRewardViewImpl.prototype, "redDotNodes", void 0);
__decorate([
property({ type: cc.Node, displayName: "Close tip label node" })
], BedroomCatRewardViewImpl.prototype, "closeTipLabelNode", void 0);
BedroomCatRewardViewImpl = __decorate([
ccclass,
PresenterCCViewFactory_1.RegView(BedroomCatRewardView_1.BedroomCatRewardViewType, "prefab/ui/bedroomCat/BedroomCatRewardView")
], BedroomCatRewardViewImpl);
return BedroomCatRewardViewImpl;
})();
exports.BedroomCatRewardViewImpl = BedroomCatRewardViewImpl;
cc._RF.pop();
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/view/impl/bedroom/BedroomCatRewardViewImpl.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,yEAA0H;AAC1H,2EAAwE;AAExE,4EAA0D;AAC1D,0EAA4H;AAE5H,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC;AAI5C;IAAA,IAAa,wBAAwB,GAArC,MAAa,wBAAyB,SAAQ,uBAAqC;QAAnF;;YAGY,2BAAsB,GAAc,4BAAW,CAAC;YAEhD,iCAA4B,GAAqB,EAAE,CAAC;YAEpD,0BAAqB,GAAa,2BAAU,CAAC;YAE7C,oBAAe,GAAG,0BAAS,CAAC;YAE5B,eAAU,GAAG,gCAAe,CAAC;YAE7B,gBAAW,GAAG,0BAAS,CAAC;YAExB,sBAAiB,GAAgB,EAAE,CAAC;YAEpC,gBAAW,GAAG,0BAAS,CAAC;YAExB,kBAAa,GAAgB,EAAE,CAAC;YAEhC,uBAAkB,GAAqB,EAAE,CAAC;YAE1C,gBAAW,GAAc,EAAE,CAAC;YAE5B,sBAAiB,GAAY,0BAAS,CAAC;QA8DnD,CAAC;QA5DG,eAAe;YACX,OAAO,IAAI,CAAC,IAAI,CAAC;QACrB,CAAC;QAED,yBAAyB;YACrB,OAAO,IAAI,CAAC,sBAAsB,CAAC;QACvC,CAAC;QAED,+BAA+B;YAC3B,OAAO,IAAI,CAAC,4BAA4B,CAAC;QAC7C,CAAC;QAED,wBAAwB;YACpB,OAAO,IAAI,CAAC,qBAAqB,CAAC;QACtC,CAAC;QAED,kBAAkB;YACd,OAAO,IAAI,CAAC,eAAe,CAAC;QAChC,CAAC;QAED,aAAa;YACT,OAAO,IAAI,CAAC,UAAU,CAAC;QAC3B,CAAC;QAED,wBAAwB;YACpB,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;QAED,oBAAoB;YAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;QAED,cAAc;YACV,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;QAED,gBAAgB;YACZ,OAAO,IAAI,CAAC,aAAa,CAAC;QAC9B,CAAC;QAED,qBAAqB;YACjB,OAAO,IAAI,CAAC,kBAAkB,CAAC;QACnC,CAAC;QAED,cAAc;YACV,OAAO,IAAI,CAAC,WAAW,CAAC;QAC5B,CAAC;QAED,oBAAoB;YAChB,OAAO,IAAI,CAAC,iBAAiB,CAAC;QAClC,CAAC;QAED,gBAAgB,CAAC,KAAK,EAAE,eAAe;YACnC,IAAI,QAAQ,GAAG,MAAM,CAAC,eAAe,CAAC,CAAC;YACvC,IAAI,CAAC,MAAM,CAAC,gBAAgB,CAAC,QAAQ,CAAC,CAAC;QAC3C,CAAC;QAED,oBAAoB;YAChB,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,CAAC;QAClC,CAAC;KACJ,CAAA;IApFG;QADC,QAAQ,CAAC,EAAE,CAAC,MAAM,CAAC;4EACoC;IAExD;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,iCAAiC,EAAE,CAAC;kFACzB;IAE5D;QADC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC;2EACkC;IAErD;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;qEACkB;IAEpC;QADC,QAAQ,CAAC,EAAE,CAAC,UAAU,CAAC;gEACa;IAErC;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;iEACc;IAEhC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;uEACxB;IAE5C;QADC,QAAQ,CAAC,EAAE,CAAC,IAAI,CAAC;iEACc;IAEhC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,gBAAgB,EAAE,CAAC;mEACvB;IAExC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,WAAW,CAAC,EAAE,WAAW,EAAE,qBAAqB,EAAE,CAAC;wEACvB;IAElD;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,WAAW,EAAE,cAAc,EAAE,CAAC;iEACvB;IAEpC;QADC,QAAQ,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC,IAAI,EAAE,WAAW,EAAE,sBAAsB,EAAE,CAAC;uEAClB;IAzBtC,wBAAwB;QAFpC,OAAO;QACP,gCAAO,CAAC,+CAAwB,EAAE,2CAA2C,CAAC;OAClE,wBAAwB,CAuFpC;IAAD,+BAAC;KAAA;AAvFY,4DAAwB","file":"","sourceRoot":"/","sourcesContent":["import { DummyLabel, DummyNode, DummyRichText, DummyScrollView, DummySprite } from \"../../../../../common/CCDummyObjects\";\nimport { CCPureView } from \"../../../../../common/classbase/CCViewBase\";\nimport Typewriter from \"../../../../../common/components/Typewriter\";\nimport { RegView } from \"../../../PresenterCCViewFactory\";\nimport { BedroomCatRewardView, BedroomCatRewardViewProps, BedroomCatRewardViewType } from \"../../type/BedroomCatRewardView\";\n\nconst { ccclass, property } = cc._decorator;\n\n@ccclass\n@RegView(BedroomCatRewardViewType, \"prefab/ui/bedroomCat/BedroomCatRewardView\")\nexport class BedroomCatRewardViewImpl extends CCPureView<BedroomCatRewardViewProps> implements BedroomCatRewardView {\n\n @property(cc.Sprite)\n private rewardPanelTitleSprite: cc.Sprite = DummySprite;\n @property({ type: [cc.SpriteFrame], displayName: \"Reward panel title spriteFrames\" })\n private rewardPanelTitleSpriteFrames: cc.SpriteFrame[] = [];\n @property(cc.Label)\n private rewardPanelTitleLabel: cc.Label = DummyLabel;\n @property(cc.Node)\n private rewardPanelNode = DummyNode;\n @property(cc.ScrollView)\n private scrollView = DummyScrollView;\n @property(cc.Node)\n private contentNode = DummyNode;\n @property({ type: [cc.Prefab], displayName: \"Reward item prefabs\" })\n private rewardItemPrefabs: cc.Prefab[] = [];\n @property(cc.Node)\n private welfareNode = DummyNode;\n @property({ type: [cc.Button], displayName: \"Tabbar Buttons\" })\n private tabbarButtons: cc.Button[] = [];\n @property({ type: [cc.SpriteFrame], displayName: \"Tabbar Spriteframes\" })\n private tabbarSpriteFrames: cc.SpriteFrame[] = [];\n @property({ type: [cc.Node], displayName: \"RedDot nodes\" })\n private redDotNodes: cc.Node[] = [];\n @property({ type: cc.Node, displayName: \"Close tip label node\" })\n private closeTipLabelNode: cc.Node = DummyNode;\n\n getThisViewNode() {\n return this.node;\n }\n\n getRewardPanelTitleSprite(): cc.Sprite {\n return this.rewardPanelTitleSprite;\n }\n\n getRewardPanelTitleSpriteFrames(): cc.SpriteFrame[] {\n return this.rewardPanelTitleSpriteFrames;\n }\n\n getRewardPanelTitleLabel(): cc.Label {\n return this.rewardPanelTitleLabel;\n }\n\n getRewardPanelNode(): cc.Node {\n return this.rewardPanelNode;\n }\n\n getScrollView(): cc.ScrollView {\n return this.scrollView;\n }\n\n getScrollViewContentNode(): cc.Node {\n return this.contentNode;\n }\n\n getRewardItemPrefabs(): cc.Prefab[] {\n return this.rewardItemPrefabs;\n }\n\n getWelfareNode(): cc.Node {\n return this.welfareNode;\n }\n\n getTabbarButtons(): cc.Button[] {\n return this.tabbarButtons;\n }\n\n getTabbarSpriteFrames(): cc.SpriteFrame[] {\n return this.tabbarSpriteFrames;\n }\n\n getRedDotNodes(): cc.Node[] {\n return this.redDotNodes;\n }\n\n getCloseTipLabelNode(): cc.Node {\n return this.closeTipLabelNode;\n }\n\n onClickTabbarBtn(event, customEventData) {\n let tabbarId = Number(customEventData);\n this._props.onClickTabbarBtn(tabbarId);\n }\n\n onCloseClickCallBack() {\n this._props.onCloseBtnClick();\n }\n}"]}
\ No newline at end of file
...@@ -3605,9 +3605,6 @@ ...@@ -3605,9 +3605,6 @@
"titleSprite": { "titleSprite": {
"__id__": 7 "__id__": 7
}, },
"buttonLayout": {
"__id__": 14
},
"tabbarButtons": [ "tabbarButtons": [
{ {
"__id__": 30 "__id__": 30
......
"use strict";
cc._RF.push(module, '4e706sTTcdMW5nZMcAdWhLk', 'ShareSuitView');
// script/game/ui/view/type/ShareSuitView.ts
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.ShareSuitViewType = void 0;
exports.ShareSuitViewType = "ShareSuitView";
cc._RF.pop();
\ No newline at end of file
{"version":3,"sources":["assets/script/game/ui/view/type/ShareSuitView.ts"],"names":[],"mappings":";;;;;;;AAoBa,QAAA,iBAAiB,GAAG,eAAe,CAAC","file":"","sourceRoot":"/","sourcesContent":["import { PureView } from \"../../../../common/classbase/ViewBase\";\n\nexport type ShareSuitViewCallback = (result: boolean, param?: any) => void;\nexport type onCloseBtnClickCallback = () => void;\nexport interface ShareSuitViewProps {\n bgSpritePath: string,\n rolePortraitSpritePath: string,\n shareSuitViewCallback: ShareSuitViewCallback;\n onCloseBtnClickCallback: onCloseBtnClickCallback;\n}\n\ntype ShareSuitViewBase = PureView<ShareSuitViewProps>;\n\nexport interface ShareSuitView extends ShareSuitViewBase {\n getViewNode: () => cc.Node;\n getShareNode: () => cc.Node;\n getShareSuitViewBgSprite: () => cc.Sprite;\n getShareSuitViewRolePortraitSprite: () => cc.Sprite;\n}\n\nexport const ShareSuitViewType = \"ShareSuitView\";"]}
\ No newline at end of file
"use strict";
cc._RF.push(module, '5dc50lrtl1PRLPyiaOrEUdC', 'BedroomCatRewardViewPresenter');
// script/game/ui/presenter/bedroom/BedroomCatRewardViewPresenter.ts
"use strict";
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
Object.defineProperty(exports, "__esModule", { value: true });
const PresenterBase_1 = require("../../../../common/classbase/PresenterBase");
const BedRoomCatModelManager_1 = require("../../../model/BedRoomCatModelManager");
const GameModelManager_1 = require("../../../model/GameModelManager");
const PresenterCCViewFactory_1 = require("../../PresenterCCViewFactory");
const RewardLevelItem_1 = require("../../RewardLevelItem");
const RewardLoginItem_1 = require("../../RewardLoginItem");
const RewardPlotItem_1 = require("../../RewardPlotItem");
const BedroomCatRewardView_1 = require("../../view/type/BedroomCatRewardView");
let BedroomCatRewardViewPresenter = /** @class */ (() => {
let BedroomCatRewardViewPresenter = class BedroomCatRewardViewPresenter extends PresenterBase_1.Presenter {
constructor() {
super();
this._titleLabel = [
"记得每天来看看哦~",
"饭统碗里没有粮啦!点击碗即可喂食哦~",
"解锁章节会获取相应的奖励哦~",
"",
];
this.onClickTabbarBtn = (tabbarId) => {
for (let i = 0; i < this.view.getTabbarButtons().length; i++) {
if (i == tabbarId - 1) {
this.view.getTabbarButtons()[i].getComponentInChildren(cc.Sprite).spriteFrame = this.view.getTabbarSpriteFrames()[0];
}
else {
this.view.getTabbarButtons()[i].getComponentInChildren(cc.Sprite).spriteFrame = undefined;
}
}
this.view.getRewardPanelTitleSprite().spriteFrame = this.view.getRewardPanelTitleSpriteFrames()[tabbarId - 1];
this.view.getRewardPanelTitleLabel().string = this._titleLabel[tabbarId - 1];
this.CreateOrUpdateRewardItem(tabbarId);
if (tabbarId <= BedRoomCatModelManager_1.CatRewardConfigTpye.CatPlotRewardConfig) {
this.view.getWelfareNode().active = false;
this.view.getRewardPanelNode().active = true;
}
else {
this.view.getWelfareNode().active = true;
this.view.getRewardPanelNode().active = false;
}
this.updateRedDot();
};
this.onCloseBtnClick = () => {
this.view.close();
GameModelManager_1.GameModelManager.BackToBedRoom.emit();
};
}
onOpen(props) {
super.onOpen(props);
this._viewProps = props;
this._viewProps.onClickTabbarBtn = this.onClickTabbarBtn;
this._viewProps.onCloseBtnClick = this.onCloseBtnClick;
this.view.setProps(this._viewProps);
this.onShow();
}
onShow() {
super.onShow();
//进入奖励界面初始化奖励的状态
BedRoomCatModelManager_1.BedRoomCatModelManager.initCatRewardStatus();
this.onClickTabbarBtn(1);
}
onClose() {
super.onClose();
}
onEnterBackground() {
super.onEnterBackground();
}
onEnterForeground() {
super.onEnterForeground();
this.updateRedDot();
}
updateRedDot() {
for (let i = 1; i < 4; i++) {
let catRewardStatus = BedRoomCatModelManager_1.BedRoomCatModelManager.getCatRewardStatus(i);
for (let j = 0; j < catRewardStatus.length; j++) {
if (catRewardStatus[j] == 1) {
this.view.getRedDotNodes()[i - 1].active = true;
break;
}
else {
this.view.getRedDotNodes()[i - 1].active = false;
}
}
}
}
CreateOrUpdateRewardItem(tabbarId) {
this.view.getScrollViewContentNode().removeAllChildren();
let cfg = BedRoomCatModelManager_1.BedRoomCatModelManager.getCatRewardConfigByConfigType(tabbarId);
let catRewardStatus = BedRoomCatModelManager_1.BedRoomCatModelManager.getCatRewardStatus(tabbarId);
let rewardSturcts = [];
for (let i = 0; i < cfg.length; ++i) {
if (cfg[i].rewardTpye !== tabbarId) {
continue;
}
if (cfg[i].catFoodNumber !== 0 && cfg[i].catFoodNumber) {
rewardSturcts.push({ numberOrId: cfg[i].catFoodNumber, type: RewardLoginItem_1.rewardType.catFood });
}
if (cfg[i].cannedNumber !== 0 && cfg[i].cannedNumber) {
rewardSturcts.push({ numberOrId: cfg[i].cannedNumber, type: RewardLoginItem_1.rewardType.canned });
}
if (cfg[i].clothedId !== 0 && cfg[i].clothedId) {
rewardSturcts.push({ numberOrId: cfg[i].clothedId, type: RewardLoginItem_1.rewardType.clothes });
}
if (cfg[i].specialPlotId !== 0 && cfg[i].specialPlotId) {
rewardSturcts.push({ numberOrId: cfg[i].specialPlotId, type: RewardLoginItem_1.rewardType.item });
}
let btn = cc.instantiate(this.view.getRewardItemPrefabs()[tabbarId - 1]);
let callback = () => {
this.updateRedDot();
};
if (tabbarId == BedRoomCatModelManager_1.CatRewardConfigTpye.CatLoginRewardConfig) {
btn.getComponent(RewardLoginItem_1.default).setData(cfg[i].rewardTpye, i, cfg[i].rewardTaskDescription, rewardSturcts, catRewardStatus[i], callback);
}
else if (tabbarId == BedRoomCatModelManager_1.CatRewardConfigTpye.CatLevelRewardConfig) {
btn.getComponent(RewardLevelItem_1.default).setData(cfg[i].rewardTpye, i, cfg[i].rewardTaskDescription, rewardSturcts, catRewardStatus[i], callback);
}
else if (tabbarId == BedRoomCatModelManager_1.CatRewardConfigTpye.CatPlotRewardConfig) {
btn.getComponent(RewardPlotItem_1.default).setData(cfg[i].rewardTpye, i, cfg[i].rewardTaskDescription, rewardSturcts, catRewardStatus[i], callback);
}
btn.parent = this.view.getScrollViewContentNode();
rewardSturcts = [];
}
this.view.getScrollView().scrollToTop();
}
};
BedroomCatRewardViewPresenter.uuid = "BedroomCatRewardViewPresenter";
BedroomCatRewardViewPresenter = __decorate([
PresenterCCViewFactory_1.RegPresenter(BedroomCatRewardView_1.BedroomCatRewardViewType)
], BedroomCatRewardViewPresenter);
return BedroomCatRewardViewPresenter;
})();
exports.default = BedroomCatRewardViewPresenter;
cc._RF.pop();
\ 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.
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!